Search Unity

Exception: Il2cpp.exe Did Not Run Properly!

Discussion in 'Android' started by Serkode, Apr 10, 2019.

  1. NirmalGhadiya

    NirmalGhadiya

    Joined:
    Jan 24, 2018
    Posts:
    11
    @JoshPeterson

    I tried many times to reinstall unity. I also try with different system but all got same error.
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,905
    Did you try installing 2020 LTS, since 2019 is no longer supported?
     
  3. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    I wonder if this is a locale-related issue. Some tools have trouble with paths in non-English locales, unfortunately. If your OS is not using a Windows locale, could you try that?
     
  4. NirmalGhadiya

    NirmalGhadiya

    Joined:
    Jan 24, 2018
    Posts:
    11
    @Tomas1856

    Yes i tried with 2020 lts and 2021 lts version of unity
     
  5. NirmalGhadiya

    NirmalGhadiya

    Joined:
    Jan 24, 2018
    Posts:
    11
  6. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,905
    It's about Windows Display Language (is it set to English?), could you attach full Editor.log, I think that information is present at the top of the log.
     
  7. NirmalGhadiya

    NirmalGhadiya

    Joined:
    Jan 24, 2018
    Posts:
    11

    Attached Files:

  8. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,905
    It seems you're using unsupported Unity version - 2019.2, could switch to 2020 or 2021 LTS and see if the issue persists?
     
  9. Ddubz714

    Ddubz714

    Joined:
    Mar 13, 2021
    Posts:
    1
    I'm going through the Junior Programming training and I'm doing the ModtheCube section. I had to install the WebGL Publisher which was a task on its own. But when I try to build I get multiple errors, which mention the "new" modifier used in the script but I don't see why that would be an issue.

    Here is the error logs, if anyone has any idea? Thanks. Build 2020.3.40f1

    Exception: Unity.IL2CPP.Building.BuilderFailedException: In file included from C:\Users\Daniel\Desktop\Unity Projects\ModtheCube\Library\Il2cppBuildCache\WebGL\il2cppOutput\Il2CppCCalculateFieldValues.cpp:1:
    In file included from C:\Program Files\Unity\Hub\Editor\2020.3.40f1\Editor\Data\il2cpp\libil2cpp\pch\pch-cpp.hpp:7:
    In file included from C:\Program Files\Unity\Hub\Editor\2020.3.40f1\Editor\Data\il2cpp\libil2cpp\utils/StringUtils.h:24:
    In file included from C:\Program Files\Unity\Hub\Editor\2020.3.40f1\Editor\Data\il2cpp\libil2cpp\il2cpp-string-types.h:6:
    In file included from C:\Program Files\Emscripten\emscripten\1.35.0\system\include\libcxx\string:439:
    In file included from C:\Program Files\Emscripten\emscripten\1.35.0\system\include\libcxx\algorithm:628:
    In file included from C:\Program Files\Emscripten\emscripten\1.35.0\system\include\libcxx\memory:601:
    C:\Program Files\Emscripten\emscripten\1.35.0\system\include\libcxx\new:127:30: error: 'operator new' takes type size_t ('unsigned long') as first parameter
    _LIBCPP_NEW_DELETE_VIS void* operator new(std::size_t __sz)
    ^
    C:\Program Files\Emscripten\emscripten\1.35.0\system\include\libcxx\new:132:30: error: 'operator new' takes type size_t ('unsigned long') as first parameter
    _LIBCPP_NEW_DELETE_VIS void* operator new(std::size_t __sz, const std::nothrow_t&) _NOEXCEPT _NOALIAS;
    ^
    C:\Program Files\Emscripten\emscripten\1.35.0\system\include\libcxx\new:136:30: error: 'operator new[]' takes type size_t ('unsigned long') as first parameter
    _LIBCPP_NEW_DELETE_VIS void* operator new[](std::size_t __sz)
    ^
    C:\Program Files\Emscripten\emscripten\1.35.0\system\include\libcxx\new:141:30: error: 'operator new[]' takes type size_t ('unsigned long') as first parameter
    _LIBCPP_NEW_DELETE_VIS void* operator new[](std::size_t __sz, const std::nothrow_t&) _NOEXCEPT _NOALIAS;
    ^
    C:\Program Files\Emscripten\emscripten\1.35.0\system\include\libcxx\new:145:40: error: 'operator new' takes type size_t ('unsigned long') as first parameter
    inline _LIBCPP_INLINE_VISIBILITY void* operator new (std::size_t, void* __p) _NOEXCEPT {return __p;}
    ^
    C:\Program Files\Emscripten\emscripten\1.35.0\system\include\libcxx\new:146:40: error: 'operator new[]' takes type size_t ('unsigned long') as first parameter
    inline _LIBCPP_INLINE_VISIBILITY void* operator new[](std::size_t, void* __p) _NOEXCEPT {return __p;}
    ^
    In file included from C:\Users\Daniel\Desktop\Unity Projects\ModtheCube\Library\Il2cppBuildCache\WebGL\il2cppOutput\Il2CppCCalculateFieldValues.cpp:1:
    In file included from C:\Program Files\Unity\Hub\Editor\2020.3.40f1\Editor\Data\il2cpp\libil2cpp\pch\pch-cpp.hpp:7:
    In file included from C:\Program Files\Unity\Hub\Editor\2020.3.40f1\Editor\Data\il2cpp\libil2cpp\utils/StringUtils.h:24:
    In file included from C:\Program Files\Unity\Hub\Editor\2020.3.40f1\Editor\Data\il2cpp\libil2cpp\il2cpp-string-types.h:6:
    In file included from C:\Program Files\Emscripten\emscripten\1.35.0\system\include\libcxx\string:439:
    In file included from C:\Program Files\Emscripten\emscripten\1.35.0\system\include\libcxx\algorithm:628:
    C:\Program Files\Emscripten\emscripten\1.35.0\system\include\libcxx\memory:1833:73: error: too many arguments to function call, expected 1, have 2
    __r.first = static_cast<_Tp*>:):eek:perator new(__n * sizeof(_Tp), nothrow));
    ~~~~~~~~~~~~~~ ^~~~~~~
    note: 'operator new' declared here
    7 errors generated.
    ERROR:root:compiler frontend failed to generate LLVM bitcode, halting


    Invocation was: Executable: "C:\Program Files\Unity\Hub\Editor\2020.3.40f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe"
    Arguments: -E "C:\Program Files\Emscripten\emscripten\1.35.0\em++" -Wno-unused-value -Wno-invalid-offsetof -nostdinc -fno-strict-overflow -Wno-null-conversion -std=c++11 -O3 -Oz -DIL2CPP_EXCEPTION_DISABLED=1 -DNET_4_0 -DUNITY_AOT -DIL2CPP_MONO_DEBUGGER_DISABLED -DGC_NOT_DLL -DRUNTIME_IL2CPP -DBASELIB_INLINE_NAMESPACE=il2cpp_baselib -DNDEBUG -I"C:\Program Files\Unity\Hub\Editor\2020.3.40f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2020.3.40f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2020.3.40f1\Editor\Data\il2cpp\external\bdwgc\include" -I"C:\Program Files\Unity\Hub\Editor\2020.3.40f1\Editor\Data\il2cpp\external\xxHash" -I"C:\Program Files\Unity\Hub\Editor\2020.3.40f1\Editor\Data\il2cpp\external\baselib\Include" -I"C:\Program Files\Unity\Hub\Editor\2020.3.40f1\Editor\Data\il2cpp\external\baselib\Platforms\WebGL\Include" -I"C:\Program Files\Unity\Hub\Editor\2020.3.40f1\Editor\Data\il2cpp\libil2cpp\pch" -I"C:\Users\Daniel\Desktop\Unity Projects\ModtheCube\Library\Il2cppBuildCache\WebGL\il2cppOutput" "C:\Users\Daniel\Desktop\Unity Projects\ModtheCube\Library\Il2cppBuildCache\WebGL\il2cppOutput\Il2CppCCalculateFieldValues.cpp" -o "C:\Users\Daniel\Desktop\Unity Projects\ModtheCube\Library\il2cpp_cache\429532E9AEB63BAC381371A86621BECA.o"

    at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    at il2cpp.Compilation.CompilationDriver.Run(RuntimePlatform platform, BuildingOptions buildingOptions, ReadOnlyCollection`1 matchedAssemblyMethodSourceFiles)
    at il2cpp.Program.DoRun(String[] args, RuntimePlatform platform, BuildingOptions buildingOptions, Boolean throwExceptions)
    UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at <92e8e151ac2247a491cb6ca42a1bead9>:0)
    UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at <92e8e151ac2247a491cb6ca42a1bead9>:0)
    UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo) (at <92e8e151ac2247a491cb6ca42a1bead9>:0)
    UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data) (at <92e8e151ac2247a491cb6ca42a1bead9>:0)
    UnityEditorInternal.IL2CPPBuilder.Run () (at <92e8e151ac2247a491cb6ca42a1bead9>:0)
    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <92e8e151ac2247a491cb6ca42a1bead9>:0)
    UnityEditor.WebGL.WebGlBuildPostprocessor.CompileBuild (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/build/output/unity/unity/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:365)
    UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/build/output/unity/unity/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:913)
    UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <92e8e151ac2247a491cb6ca42a1bead9>:0)
    UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <92e8e151ac2247a491cb6ca42a1bead9>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)
     
  10. NirmalGhadiya

    NirmalGhadiya

    Joined:
    Jan 24, 2018
    Posts:
    11
    @Thomas1856 @JoshPeterson
    I am able to build with unity 2022 lts version.
    and after uploading to local server for testing it not working seems it only working with 2019.2.17

    upload_2022-10-19_18-4-28.png
     
  11. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    You may want to enable full stack trace information and try again. That might give you more details from this error message.
     
  12. nick-morhun

    nick-morhun

    Joined:
    May 12, 2015
    Posts:
    51
    Hi, we are using 2021.3.18f1, and NDK is r21d, however the issue persists.
     
  13. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    There is a lot going on in this thread. Can you post specific information about the error message you see? Or maybe even create a new thread for it and tag me. Thanks!
     
  14. nick-morhun

    nick-morhun

    Joined:
    May 12, 2015
    Posts:
    51
  15. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    Ahh yes, I think that I was mixed up earlier in this thread, sorry. We need the r23 NDK (not the r21 NDK) to use the lld linker, where this issue is corrected. So you will need to move to Unity 2022 to work around this.