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
- Performance Markers Search window shows an empty entry in the list
- Enabling Deep Profiling in Performance Markers Search window breaks Inspector panel buttons when navigating through the marker items
- An "InvalidOperationException" error is thrown when TryRemoveItem is used with rebuildTree set to false
- Build fails with IL2CPP error when building on Android platform in a specific project
- Resize to Fit option for Import Activity window's Columns does nothing
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.