Search Issue Tracker
Duplicate
Votes
0
Found in
2019.3.0b1
2019.3.2f1
2020.1
2020.2
Issue ID
1224967
Regression
No
Editor crashes on Mesh::UpdateSubMeshVertexRange when calling Mesh.SetSubMesh
How to reproduce:
1. Open the attached "SubmeshBug.zip" project
2. Load the "SampleScene"
3. Select the "Mesh" GameObject in the Hierarchy window
4. Set MeshFilter component's Mesh field to None
5. Right-click on the "Bug" component in the Inspector window to open the context menu
6. Select "CRASH"
--Observe the crash
Reproducible with: 2019.3.0b1, 2019.3.4f1, 2020.1.0a26, 2020.2.0a2
Could not test with 2019.3.0a12 and earlier versions due to multiple compilation errors (e.g. "The type or namespace name 'SubMeshDescriptor' does not exist in the namespace 'UnityEngine.Rendering'")
Note: the crash is caused by line 45 in the "bug.cs" script
First lines of the stack trace:
0x00007FF69B4F7382 (Unity) Mesh::UpdateSubMeshVertexRange
0x00007FF69B50F4EC (Unity) MeshScripting::SetSubMesh
0x00007FF69BD90944 (Unity) Mesh_CUSTOM_SetSubMesh_Injected
0x000002102D25FC1D (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Mesh:SetSubMesh_Injected (UnityEngine.Mesh,int,UnityEngine.Rendering.SubMeshDescriptor&,UnityEngine.Rendering.MeshUpdateFlags)
0x000002102D25FA6B (Mono JIT Code) UnityEngine.Mesh:SetSubMesh (int,UnityEngine.Rendering.SubMeshDescriptor,UnityEngine.Rendering.MeshUpdateFlags)
<...>
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
This is a duplicate of issue #1224151