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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
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)