Search Issue Tracker
Won't Fix
Votes
0
Found in
2017.4
2018.4
2019.3
2020.1
2020.1.0b2
2020.2
Issue ID
1230182
Regression
No
Crash on UnityEngine.TerrainData.set_detailPrototypes when adding Terrain Detail Mesh
Reproduction steps:
1. Open the attached project ("1230182.zip")
2. Open "SampleScene"
3. Select "Terrain" in the Hierarchy
4. Open the Paint Details tab in the Terrain Component
5. Click "Edit Details..." and select "Add Detail Mesh"
6. Drag the "ToBeDetailMeshGO" to the "Detail" field and click "Add" button
Reproducible with: 2017.4.38f1, 2018.4.19f1, 2019.3.7f1, 2020.1.0b3, 2020.2.0a5
First lines of the stacktraces:
at (wrapper managed-to-native) UnityEngine.TerrainData.set_detailPrototypes (UnityEngine.TerrainData,UnityEngine.DetailPrototype[]) [0x00014] in <f7066d1ad92d45278e45462c4d1030bc>:0
at UnityEditor.DetailMeshWizard.DoApply () [0x0016e] in <89faf899e9c14826b38ffd64a0c1974d>:0
at UnityEditor.DetailMeshWizard.OnWizardCreate () [0x00002] in <89faf899e9c14826b38ffd64a0c1974d>:0
at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x0004f] in <fb001e01371b4adca20013e0ac763896>:0
0x00007FF6B2809F3E (Unity) std::vector<Vector3f,std::allocator<Vector3f> >::_Assign_range<StrideIterator<Vector3f> >
0x00007FF6B2817490 (Unity) DetailDatabase::RefreshPrototypesStep1
0x00007FF6B28167FE (Unity) DetailDatabase::RefreshPrototypes
0x00007FF6B281E9D0 (Unity) DetailDatabase::SetDetailPrototypes
0x00007FF6B2802996 (Unity) TerrainDataScriptingInterface::SetDetailPrototypes
Note:
- The GameObject added as the Terrain Detail Mesh contains a Mesh Filter with a mesh that doesn't have normals, a Mesh Renderer and a default shader
- There's always an assertion failure before the crash: "Assertion failed on expression: 'm_Stride != 0 && "Stide must not be zero"'"
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
- Inconsistent help box font size in Project Settings window
- Local package MonoBehaviour scripts appear as missing after updating the project when the project and package paths share the same prefix
- AssetBundle Variants do not switch when a Sprite (2D and UI) texture is referenced from a Material
- Location tooltip in the Viewport of UI Builder window does not update when the UI Document Asset is moved to a different location
- Audio Clip Volume and Avoid Repeating Last fields values cannot be changed in Audio Random Container window
Resolution Note:
Reproduces only in an edge case scenario which is not a valid use case. (Assigning a mesh that has 0 verts and 0 indices)