Search Issue Tracker
Fixed in 6.0.0-pre.2
Fixed in 3.0.15, 5.1.1
Votes
0
Found in [Package]
4.1.0, 4.0.3, 3.0.1, 2.0.1 - preview.2
Issue ID
1240514
Regression
Yes
[2D] InvalidOperationException thrown continuously on adding "Sprite Shape Controller" Component to a Sprite object
On adding "Sprite Shape Controller" Component to Sprite object causes the Editor to throw InvalidOperationException, refer the attached video
Steps to repro:
1. Create a new project with 2D Template.
2. Hierarchy > Create > 2D Object > Sprite
3. Inspector > Add Component > Sprite Shape Controller
Actual Result:
InvalidOperationException thrown continuously when the "Sprite Shape Controller" component is added to a Sprite object
Expected Result:
"Sprite Shape Controller" component is added to a Sprite object without any exception thrown in the console
Occurring in:
2020.2.0a8, 2020.1.0b6, 2019.3.10f1, 2019.2.13f1, 2019.1.11f1, 2019.1.0a1 with Package version: 4.1.0, 4.0.3, 3.0.1, 2.0.1 - preview.2
Working fine in:
2018.4.14f1 with Package version: 1.0.10 - preview.2
Environment:
Windows 10 & macOS 10.14
Stack trace:
InvalidOperationException: The previously scheduled job SpriteShapeGenerator writes to the Unity.Collections.NativeArray`1[Unity.Mathematics.float2] SpriteShapeGenerator.m_ColliderPoints. You must call JobHandle.Complete() on the job SpriteShapeGenerator, before you can deallocate the Unity.Collections.NativeArray`1[Unity.Mathematics.float2] safely.
Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.CheckDeallocateAndThrow (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle handle) (at <a5ea686b82cc4a51922915652b86a88b>:0)
Unity.Collections.LowLevel.Unsafe.DisposeSentinel.Dispose (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle& safety, Unity.Collections.LowLevel.Unsafe.DisposeSentinel& sentinel) (at <a5ea686b82cc4a51922915652b86a88b>:0)
Unity.Collections.NativeArray`1[T].Dispose () (at <a5ea686b82cc4a51922915652b86a88b>:0)
UnityEngine.U2D.SpriteShapeController.BakeCollider () (at library/packagecache/com.unity.2d.spriteshape@4.1.0/runtime/spriteshapecontroller.cs:512)
UnityEngine.U2D.SpriteShapeController.OnWillRenderObject () (at library/packagecache/com.unity.2d.spriteshape@4.1.0/runtime/spriteshapecontroller.cs:348)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
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
- Profiler - Taking you to the wrong section when using 'show'
- Draw Renderers custom pass doesn't work with SSGI
- WebCamTexture does not set the requested resolution when used in WebGL
- Editor default Stylesheet/Matching Selector buttons in Debugger don't do anything
- Graphics.DrawMeshNow stops rendering Render Texture after a few frames when viewed in the Player
Resolution Note (fix version 6.0.0-pre.2):
Fixed in Package 2D SpriteShape 6.0.0-pre.2
Resolution Note (fix version 3.0.15):
Fixed in 2D SpriteShape Version 3.0.12