Reproduction steps:
- Open the attached “ReproProj” project
- Go to Windows → Analysis → Memory Profiler
- In the Memory Profiler window select the “ReproSnap” snapshot
- In the Memory Profiler window select the “Unity Objects” tab
- Expand the Texture2D section
- Select the second “Inter - Regular Atlas” object after all objects that contain paths in their names
- In the References section of the Memory Profiler window right click on ““Inter - Regular Atlas” UniyEngine.Texture2D : Texture2D” and select “Truncate Managed Type Names”
- In the Details section of Memory Profiler window expand the “Texture2D[] “UnityEngine.Texture2D[][0]””
- Expand the “FontAsset””” section
- Expand “Character “[0x23c83372b70]”” section
- Select or expand and select any references in the previously expended section
Expected result: No IndexOutOfRangeException errors in the Console
Actual result: IndexOutOfRangeException errors in the Console
Reproducible with: 2023.1.0a20, 2023.1.0a21
Not reproducible with: 2020.3.42f1, 2021.3.15f1, 2022.1.23f1, 2022.2.0b16, 2023.1.0a19
Reproduced on: Windows 10
Note: there’s a possibility that the editor may crash while trying to reproduce the issue. Sometimes the editor will throw UnityEngine.GUIUtility:ProcessEvent error instead of an exception or crash, the behavior is intermittent. This case was originally reported as crash, however, it wasn’t reproduced during testing.
Part of possible stacktrace in case of a crash:
0x00007FF863E2DC0E (Unity) scripting_array_length
0x00007FF8644257D3 (Unity) TextRendering::TextCoreGeneratorGroup::Get
0x00007FF86446BDCF (Unity) GUIStyle::DrawContent
0x00007FF8631FFED0 (Unity) GUIStyle_CUSTOM_Internal_DrawContent_Injected