Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

[5.2] Setting a transition in the base layer to the exit node crashes animator window

Discussion in 'Animation' started by HarryCodder, Sep 11, 2015.

  1. HarryCodder

    HarryCodder

    Joined:
    Feb 20, 2015
    Posts:
    84
    Hello everyone,

    Pretty big problem in the newest 5.2 and it's so simple it baffles me a thing like that could pass QA.

    Anyway, here how to reproduce :
    1. Create an animator
    2. Create a sub state machine
    3. Create a transition from this sub state machine to the exit node.
    4. Enter the sub state machine.
    At this point, the editor triggers null pointers errors every repaint and the animator window doesn't work anymore.You have to open another controller to reset it.

    Here the stack trace :
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. UnityEditor.Graphs.AnimationStateMachine.Graph.CreateSelectorEdges (UnityEditor.Animations.AnimatorTransition transition, UnityEditor.Animations.AnimatorStateMachine owner, UnityEditor.Animations.AnimatorStateMachine sourceStateMachine) (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/AnimationStateMachine/Graph.cs:125)
    3. UnityEditor.Graphs.AnimationStateMachine.Graph.CreateEdges () (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/AnimationStateMachine/Graph.cs:241)
    4. UnityEditor.Graphs.AnimationStateMachine.Graph.BuildGraphFromStateMachine (UnityEditor.Animations.AnimatorStateMachine stateMachine) (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/AnimationStateMachine/Graph.cs:76)
    5. UnityEditor.Graphs.AnimationStateMachine.Graph.RebuildGraph () (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/AnimationStateMachine/Graph.cs:57)
    6. UnityEditor.Graphs.AnimationStateMachine.GraphGUI.OnGraphGUI () (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/AnimationStateMachine/GraphGUI.cs:268)
    7. UnityEditor.Graphs.AnimatorControllerTool.StateMachineView (Rect position) (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/Animation/AnimatorControllerTool.cs:943)
    8. UnityEditor.Graphs.AnimatorControllerTool.OnGUIGraph (Rect paneRect) (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/Animation/AnimatorControllerTool.cs:876)
    9. UnityEditor.Graphs.AnimatorControllerTool.OnGUI () (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/Animation/AnimatorControllerTool.cs:833)
    10. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    I've tested several configurations, it does not matter what's before or inside the sub state machine, just transitioning it to the exit node is the culprit here.
    You don't even need actual animations in your animator controller to cause the bug (I've tested with and without, the problem happens everytime).

    Bug case #726767.
     
    Last edited: Sep 11, 2015
  2. IvoBe

    IvoBe

    Joined:
    Sep 14, 2014
    Posts:
    2
    I have the same problem. I found that it was reported in the beta - 5.2.0b6 (not by me):
    http://issuetracker.unity3d.com/iss...sitioning-from-sub-state-machine-to-exit-node

    It says fixed in Unity 5.2.1. This is realy bad, because we either have to wait for 5.2.1 to be released ( who knows when ) or revert to Unity 5.1.3. The thing is that 5.2 "fixed" some other Mecanim bugs and we are now stuck with completеly unusable version.
     
  3. HarryCodder

    HarryCodder

    Joined:
    Feb 20, 2015
    Posts:
    84
    In response to my bug, Unity QA just informed me that this should be fixed in 5.2.1
     
  4. artaka

    artaka

    Joined:
    Feb 19, 2013
    Posts:
    128
    I just came across this issue in 2018.3.7f1. The only way I got it to work again is to revert the animation controller back to the previous version and redo all the new changes.