Search Issue Tracker
Fixed
Fixed in 2020.3.37f1, 2021.3.5f1, 2022.1.6f1, 2022.2.0a10
Votes
0
Found in
2020.3.35f1
Issue ID
UUM-2746
Regression
Yes
Memory access violation in LightProbesManager when appending LightProbes objects with overlaps twice
Steps to reproduce:
1. Open the attached project (JapanOffice.zip);
2. In the opened popup window for prompting to change Project setting press Cancel button;
3. Ensure that in the Hierarchy there are several scenes loaded additively; if there are none, load those scenes manually;
4. In the Hierarchy select any scene other than the active scene (e.g. NoonB) and double-click on it;
5. Repeat step 4 5-6 times;
6. Enter Play mode.
Expected result: Play mode launches without crashes.
Actual result: Editor crashes
Reproducible with: 2021.2.0b15, 2021.2.4f, 2022.1.0a9, 2022.1.0a16
Not reproducible with: 2019.4.33f1, 2020.3.23f1, 2021.2.0b14, 2022.1.0a8
Notes:
- Reproducible on Windows (by following the repro steps) and macOS (after just opening the repro project);
- The crash might not reproduce every time; if it doesn't try exiting Play mode after step 6 or repeat the initial steps once again with different timings between actions;
- The crash might produce different stack traces on different versions.
- First few lines of a stacktrace:
0x00007ff76b9aed85 (Unity) `anonymous namespace'::CombineMeshFiltersForStaticBatching
0x00007ff76b9ae6f8 (Unity) StaticBatching::CombineAllStaticMeshesInSceneForStaticBatching
0x00007ff76b4174c9 (Unity) StaticBatchingEditorHelper_CUSTOM_CombineAllStaticMeshesForScenePostProcessing
0x000001a845246391 (Mono JIT Code) (wrapper managed-to-native) UnityEditor.StaticBatchingEditorHelper:CombineAllStaticMeshesForScenePostProcessing (ulong)
0x000001a845245983 (Mono JIT Code) UnityEditor.UnityBuildPostprocessor:OnProcessScene
Probable Root Cause:
When reproing this we found what seemed like random callstack at each crash. Further investigation suggests that this is because LightProbesManager#Append() can write beyond the range of its allocated memory (see the memcpy involving m_BakedCoefficients inside Append()). By doing this it effectively caused undefined behaviour (including sometimes crashing the editor).
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Choosing new HDR Colour using RGB values breaks colour on Intensity Selectors
- Rendering/Decal Layer Mask options are different inside Prefab Mode and outside Prefab Mode when the project is upgraded to Unity 6
- The Shortcuts window cannot be docked when it is invoked from the Shortcut Helper Bar
- Incorrect Realtime GI Light Probes baking when more than one Light Probe Group is used and "Baked Global Illumination" is enabled
- Hovering on the three-dot menu also highlights the tab header near it when not all tabs fit the bar
Add comment