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
- Certain textures are incorrectly marked in the render pass list when observed through Render Graph Viewer
- "Assertion failed on expression" error occurs when multiple Animation Components are instantiated after changing the Culling Type
- MacOS persistentDataPath uses old path when built compared to Editor Play mode
- Crash on RaiseException when entering Play Mode in a specific project
- Debug Console does not reappear when disabling and re-enabling Debug.developerConsoleEnabled
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.