Search Issue Tracker
Won't Fix
Votes
0
Found in
2018.3.0b5
Issue ID
1098024
Regression
No
[IL2CPP] Build process fails with StackOverflowException when building for Standalone
To reproduce:
1. Download the attached project "TestUnity.zip" and open in Unity
2. Open "SampleScene" scene
3. Set Scripting Backend to IL2CPP
4. Build & Run project for PC, Mac & Standalone platform
5. Observe Build failing after some time with the Exception:
Either:
Process is terminated due to StackOverflowException when trying to build
Or:
fatal error C1060: compiler is out of heap space
Notes:
- This issue appears on both Windows and macOS
- Build only seems to fail when IL2CPP Scripting Backend enabled
- File it fails on is called PlayerSnapshotGenerated.cs. It has got 23k lines of code,
seems to be a size problem (as one of the exceptions complains about heap space issues)
- Could not check on newest Unity 2018.2 because my both Windows and macOS machines freeze up, but
Reproduced on Unity 2018.1.0f1, 2018.2.0f2, 2018.3.0b5, 2018.3.0b9 and 2019.1.0a8
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- HDRP project doesn't render in standalone player when using High stripping
- Editing serialized fields on script components gets interrupted by reimport when editing a prefab with auto save enabled
- Crash on Transform::EnsureCapacityIncrease when duplicating a prefabbed UI element
- Memoryless depth/stencil targets are allocated with Private storage when building for Metal Graphics API supporting devices
- Shortcut window searchbar loses edit mode when typing into searchbar after any action is made to any shortcut
Resolution Note:
We are going to fix the IL2CPP stack overflow exception in this case, but the C++ compiler will still crash because the generated method is too large. The user should change their code to use arrays instead of generating so many statements.