Build crashes instantly with IL2CPP in 2021.3.10f1

Hi there, I made a build of our isometric game and the build is successful. But, the game immediately crashes after running, even as administrator. I attached the dmp and the log file from the crashes folder.

Versions:

  • Unity 2021.3.10f1
  • Burst 1.7.3
  • Entities 0.51.0-preview.32
  • Jobs 0.51.0-preview.32
  • Roslyn Compiler 0.2.2-preview
  • Shader Graph 12.1.7
  • URP 12.1.7

Build Settings:

  • For Windows
  • Architecture Intel 64-bit
  • IL2CPP Code Generation Faster Runtime
  • Compression Method Default (also tested the other 2, but failed)
  • Stripping Backend IL2CPP
  • API Compatibility .NET Standard 2.1
  • C++ Compiler Configuration Master
  • Managed Stripping Level High
  • No “Always Included Shaders” in the Graphics Settings

8515052–1135073–Crash_2022-10-15_052000702.zip (28.8 KB)

There should be a folder called “_BackUpThisFolder_ButDontShipItWithTheGame”. Can you zip the contents, upload the zip file to some cloud storage (like google drive or dropbox) and send me the link to it? The crash dump is unreadable without those files. I’ll also need GameAssembly.dll from within the game directory.

Make sure that the files you send me are the exact ones that the crash dump was generated from. If you don’t have the original build available anymore, make it crash again and send me a new dump that matches the other files.

Hi there! Thank you for the quick response. I made a separate build again and here’s the link:

https://drive.google.com/file/d/1gwzr7CmcxArOWPQ2azCznj0aQSCY9lqL/view?usp=sharing

Note: I managed to make a successful build that doesn’t crash but with Mono and not IL2CPP.

What version of the entities package are you using? The crash seems to originate from it, and I suspect you’re using an older version that required building through “Build Configuration” file instead of the normal build window.

Oh right. The build configuration file slipped my mind. I’m using these versions:

  • Unity 2021.3.10f1
  • Burst 1.7.3
  • Entities 0.51.0-preview.32
  • Jobs 0.51.0-preview.32
  • Roslyn Compiler 0.2.2-preview
  • Shader Graph 12.1.7
  • URP 12.1.7

Yeah, so if you build using the build configuration file, the build should start working.

Hi there @Tautvydas-Zilys ! I tried building using a configuration file but now receive this error:

Note: I redacted the game’s name due to NDA. Game’s not announced yet

Building Library\Bee\artifacts\WinPlayerBuildProgram\7xiog\i4sm_ricMethods.obj failed with output:
GenericMethods.cpp
D:\Neil\Work\General Interactive\{Redacted}\{Redacted}\{Redacted}\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\GenericMethods.cpp(23927): error C2440: 'type cast': cannot convert from 'Option_1_t63C82431524886089E69D7DBF46644B9CA536957' to 'Option_1_t320C196F72A850BB34BCD1697FD9F627E4E03387'
D:\Neil\Work\General Interactive\{Redacted}\{Redacted}\{Redacted}\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\GenericMethods.cpp(23927): note: No constructor could take the source type, or constructor overload resolution was ambiguous
D:\Neil\Work\General Interactive\{Redacted}\{Redacted}\{Redacted}\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\GenericMethods.cpp(23936): error C2440: 'type cast': cannot convert from 'Option_1_t63C82431524886089E69D7DBF46644B9CA536957' to 'Option_1_t320C196F72A850BB34BCD1697FD9F627E4E03387'
D:\Neil\Work\General Interactive\{Redacted}\{Redacted}\{Redacted}\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\GenericMethods.cpp(23936): note: No constructor could take the source type, or constructor overload resolution was ambiguous
UnityEditor.BuildPipeline:BuildPlayer (UnityEditor.BuildPlayerOptions)
Unity.Build.Classic.Private.BuildPlayerStep:Run (Unity.Build.BuildContext) (at Library/PackageCache/com.unity.platforms@0.51.0-preview.31/Editor/Unity.Build.Classic.Private/NonIncremental/Steps/BuildPlayerStep.cs:64)
Unity.Build.BuildStepCollection:Run (Unity.Build.BuildContext) (at Library/PackageCache/com.unity.platforms@0.51.0-preview.31/Editor/Unity.Build/BuildStepCollection.cs:77)
Unity.Build.Classic.Private.MissingClassicNonIncrementalPipeline:OnBuild (Unity.Build.BuildContext) (at Library/PackageCache/com.unity.platforms@0.51.0-preview.31/Editor/Unity.Build.Classic.Private/NonIncremental/MissingClassicNonIncrementalPipeline.cs:66)
Unity.Build.BuildProcess:Update () (at Library/PackageCache/com.unity.platforms@0.51.0-preview.31/Editor/Unity.Build/BuildProcess.cs:54)
Unity.Build.BuildPipelineBase:Build (Unity.Build.BuildConfiguration,Unity.Build.BuildProgress) (at Library/PackageCache/com.unity.platforms@0.51.0-preview.31/Editor/Unity.Build/BuildPipelineBase.cs:111)
Unity.Build.BuildConfiguration:Build () (at Library/PackageCache/com.unity.platforms@0.51.0-preview.31/Editor/Unity.Build/BuildConfiguration.cs:157)
Unity.Build.Editor.BuildConfigurationInspector:Build (Unity.Build.BuildConfiguration) (at Library/PackageCache/com.unity.platforms@0.51.0-preview.31/Editor/Unity.Build.Editor/BuildConfigurationInspector.cs:157)
Unity.Build.Editor.BuildConfigurationInspector/BuildAction:Execute (Unity.Build.BuildConfiguration) (at Library/PackageCache/com.unity.platforms@0.51.0-preview.31/Editor/Unity.Build.Editor/BuildConfigurationInspector.cs:36)
Unity.Build.Editor.BuildConfigurationInspector/<>c__DisplayClass48_1:<Build>b__13 () (at Library/PackageCache/com.unity.platforms@0.51.0-preview.31/Editor/Unity.Build.Editor/BuildConfigurationInspector.cs:239)
UnityEditor.EditorApplication:Internal_CallDelayFunctions ()

I also had this error last week when trying to build using the Build Settings with IL2CPP on.

Here’s my build configuration:

Can you post to DOTS forum about this error?

Hi there, will do. Thank you for the assistance!

hello @Neil-Corre ,
I’m experiencing the same isssue with IL2CPP “type cast” on Unity 2022.3.10 LTS. Did you found a resolution to this?

many thanks

Hi there! Sorry for the late reply. Right now, I resorted to using Mono for now, just for our MVP and alpha builds. I’ll update the thread when I use IL2CPP again.

I got the same crash after the build, I guess we have to use the 2022 with DOTS 1.0 version