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
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
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)