Search Issue Tracker
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)
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Standard Unity Materials and Shaders become corrupted after importing specific Asset Packages
- [Linux][OpenGL][Vulkan] Draw calls are not shown in the Event List when taking a capture of a frame with RenderDoc
- Inaccurate collision detections when Rigidbody Collision Detection is set to "Continuous" or "Continuous Dynamic"
- Crash on Object::IncrementPersistentDirtyIndex when upgrading project version
- [iOS] Multiple Xcode project instances created before opens up when performing Build and Run for iOS Platform