Search Issue Tracker
Won't Fix
Votes
0
Found in
2021.3.20f1
Issue ID
UUM-30586
Regression
No
Crash on TerrainData_CUSTOM_Internal_SetDetailLayer when executing TerrainData.SetDetailLayer()
Reproduction steps:
1. Open the attached project “TerrainCrash”
2. Enter Play Mode
Expected result: Terrain is created at runtime
Actual result: Editor crashes
Reproducible with: 2020.3.45f1, 2021.3.20f1, 2022.1.24f1
Not reproducible with: 2022.2.0a1, 2022.2.9f1, 2023.1.0b5, 2023.2.0a4
Reproducible on: Windows 10, macOS 13.1
Notes:
On macOS 13.1 it freezes instead of crash.
With the 2020.3.45f1 version in “TestTerrainDetail.cs” replace line 20 with: new DetailPrototype()
{noformat}0x00007ff7323ab18b (Unity) TerrainData_CUSTOM_Internal_SetDetailLayer
0x00000211f89fe764 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.TerrainData:Internal_SetDetailLayer (UnityEngine.TerrainData,int,int,int,int,int,int[,])
0x00000211f89fe65b (Mono JIT Code) UnityEngine.TerrainData:SetDetailLayer (int,int,int,int[,])
0x00000211f89fccb3 (Mono JIT Code) [TestTerrainDetail.cs:44] TestTerrainDetail:Start ()
0x00000212c2dd8ce8 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr){noformat}
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
- Search field in UI Builder's Library has no character limit
- Changing the value in UI Builder by dragging increases it by a few thousand points when reaching the borders of the screen
- ARM64 architecture DLL incorrectly copied instead of x64 when building for Windows x64
- Crash on TypeTreeIterator::GetNode when opening a specific folder
- Crash on WriteSerializedAssetsV2 when (re)entering the Play Mode in a specific project when IEnumerator Start() is used
Resolution Note:
The project attached in there lists its a 2021 project, but the TerrainData seems to be serialized with a later version thus the there is no DetailPatch::numberOfObjects arrays (causing data inconsistency and crash like described in the report) - instead it serializes fine with the recent trunk with data popped into DetailPatch::coverage.