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
- The Scene View becomes gray and "NullReferenceException" errors are thrown when attaching the Unity Editor process to RenderDoc
- Memory usage rapidly rises when changing colors in the color wheel
- Physically Based Sky's Horizon and Zenith Tint Color Selection Bars don't have immediate access to color pickers
- EmptyAdditionalLightShadowmapTexture leaks from memory when URP quality level is changed using QualitySettings.SetQualityLevel
- Referenced ScriptableObject field does not get updated and cannot be set to "None" when there are no Objects of that type
Add comment