Search Issue Tracker

Fixed in 4.1.0

Votes

0

Found in [Package]

4.0.1, 4.0.0

Issue ID

1206338

Regression

Yes

[2D][Skinning Editor] MissingReferenceException thrown on closing Sprite Editor window after editing bone

Package: 2D Animation

-

When Bones are edited and Sprite editor window is closed, the editor throws MissingReferenceException. Refer attached video

Steps to repro:
1. Create a new project 2D template
2. Windows> Package Manager > 2D Animation
3. Import any sprite into the Unity project.
4. With the sprite selected in Assets, open Sprite Editor.
5. Sprite Editor > Skinning Editor > Create Bone > Add Bone
6. Edit Bone > Close Window > Click Apply / Revert

Actual Result:
MissingReferenceException is thrown in the console on editing bones and closing Sprite Editor window

Expected Result:
Sprite Editor Window close without any exceptions

Package found version: 4.0.1, 4.0.0.

Reproducible with: 2020.1.0a17, 2020.1.0a16, 2020.1.0a15

Working Fine with: 2019.3.0f4, 2020.1.0a14

Environment: Windows 10 and macOS 10.14

Stack trace:
MissingReferenceException: The object of type 'BoneCache' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.Object.get_name () (at <0d01204b437e47c1a78b600b597a89f4>:0)
UnityEditor.U2D.Animation.SkeletonTool.BoneNameChanged (System.String name) (at library/packagecache/com.unity.2d.animation@4.0.1/editor/skinningmodule/skeletontool/skeletontool.cs:162)
UnityEditor.U2D.Animation.SkeletonToolView.<.ctor>b__7_0 (System.String n) (at library/packagecache/com.unity.2d.animation@4.0.1/editor/skinningmodule/skeletontool/skeletontoolview.cs:16)
UnityEditor.U2D.Animation.BoneInspectorPanel.BoneNameChanged (UnityEngine.UIElements.ChangeEvent`1[T] evt) (at library/packagecache/com.unity.2d.animation@4.0.1/editor/skinningmodule/ui/boneinspectorpanel.cs:48)
UnityEngine.UIElements.EventCallbackFunctor`1[TEventType].Invoke (UnityEngine.UIElements.EventBase evt) (at <7bb8304a61014070b7f28db050747199>:0)
UnityEngine.UIElements.EventCallbackRegistry.InvokeCallbacks (UnityEngine.UIElements.EventBase evt) (at <7bb8304a61014070b7f28db050747199>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <7bb8304a61014070b7f28db050747199>:0)
UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at <7bb8304a61014070b7f28db050747199>:0)
UnityEngine.UIElements.DefaultDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <7bb8304a61014070b7f28db050747199>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <7bb8304a61014070b7f28db050747199>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <7bb8304a61014070b7f28db050747199>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <7bb8304a61014070b7f28db050747199>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <7bb8304a61014070b7f28db050747199>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <7bb8304a61014070b7f28db050747199>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <7bb8304a61014070b7f28db050747199>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <7bb8304a61014070b7f28db050747199>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <7bb8304a61014070b7f28db050747199>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <7bb8304a61014070b7f28db050747199>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <7bb8304a61014070b7f28db050747199>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <7bb8304a61014070b7f28db050747199>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <7bb8304a61014070b7f28db050747199>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <7bb8304a61014070b7f28db050747199>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <7bb8304a61014070b7f28db050747199>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <7bb8304a61014070b7f28db050747199>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <54db9c4262664587b9517297cb7f0116>:0)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.