Search Issue Tracker
Won't Fix
Votes
0
Found in
5.2.1p1
Issue ID
731020
Regression
No
Editor crashes with a very long multidimensional array
If there is a script that has a very long multidimensional array, Editor crashes on starting the play mode.
For example, the attached project has a long two-dimensional array, which looks like the following:
string [,] test = {
{“x”, “y”, “z”, “w”},
{“x”, “y”, “z”, “w”},
{“x”, “y”, “z”, “w”},
(repeat 4,000 times)
};
Although the system has enough amount of memory for storing the array, it crashes immediately.
Update: This code evaluates down to a large single method doing each string allocation then storing it into the array. The mono JIT generates a method using a fairly large amount of stack space, but with the IL2CPP backend it crashes on the PreLoad thread since it has a 512k stack. Just bumping the stack would likely hide the issue, but it will eventually crash when the method gets even larger.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Add comment