playMaker

Author Topic: Major Playmaker editor error after clicking a specific state  (Read 337 times)

lukew

  • Playmaker Newbie
  • *
  • Posts: 33
    • View Profile
Major Playmaker editor error after clicking a specific state
« on: March 04, 2019, 04:59:44 AM »
Playmaker version: 1.9.0.p10
Unity version: 2018.3.6f

EDIT: I've reporduced the error in a fresh FSM so it would be easier to catch it. It happens everytime when the state uses "Next Frame Event" action without any event set and it's folded in the action list.

Looks like it tries to create an 'auto name' for folded state bar name but there is no event and it throws an error after reopening the state. It won't happen if there is an event set for the action.

Looks like it's nothing big but it's allowed in the editor to use this action without an event (and it's sometimes useful, I'm using it for skipping a frame IN STATE [Action sequence mode]). Anyway at the moment it's not possible to edit/see the states that contains this action if it's folded and doesn't use any event. I have some states in my templates with this scenario.


It could be probably temporary fixed by commenting out/editing section of NextFrameEvent action script. Is it safe to do?

Code: [Select]
#if UNITY_EDITOR
        public override string AutoName()
        {
            return "Next Frame Event: " + sendEvent.Name;
        }
#endif

---

I was editing one of my FSM templates when I've got this error (code pasted below). I'm still getting this error when I try to click one state where I've added 'Next Frame Event' action some time before it started to happen. When the state is clicked and "State" tab is active, graph view become empty and the FSM is not visible. The error that is pasted below is spamming. It stops when other tab like FSM or Variables is selected. It's impossible to access this specific state and check what's inside. It had few standard actions like set name, set position, set rotation, set FSM GameObject, Create Object, Set Parent, Get Child and audio play before adding the "Next Frame Event". There was one outgoing event and it was just a standard "FINISHED".

I've reverted my template file so it works now but I just want to report that this happened. It could be related to fact that I've copy/pasted 'Play Sound' (with a referenced audio clip) action from other state to this state. I also have to add that the "Next frame event" was not sending any state. The state was set to 'Action sequence' mode. Another thing is that it wasn't possible to click on the transition event that was added to this state. Instead of switching it to the selected mode and highlighting it to a blue color along with an arrow, there was an error log message in the console and nothing happened in the FSM editor.

It would be probably possible to fix the template by deleting this one specific state instead of reverting the file but it's just a workaround.

Code: [Select]
GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced.
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

NullReferenceException: Object reference not set to an instance of an object
HutongGames.PlayMaker.Actions.NextFrameEvent.AutoName () (at Assets/PlayMaker/Actions/NextFrameEvent.cs:32)
HutongGames.PlayMakerEditor.StateInspector.UpdateAutoSummarize (HutongGames.PlayMaker.FsmStateAction action) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/StateInspector.cs:2050)
HutongGames.PlayMakerEditor.StateInspector.BuildIsOpenList () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/StateInspector.cs:201)
HutongGames.PlayMakerEditor.StateInspector.Reset () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/StateInspector.cs:141)
HutongGames.PlayMakerEditor.StateInspector.OnGUI () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/StateInspector.cs:322)
HutongGames.PlayMakerEditor.InspectorPanel.OnGUI (Rect area) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/InspectorPanel.cs:182)
HutongGames.PlayMakerEditor.FsmEditor.OnGUI () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/FsmEditor.cs:610)
HutongGames.PlayMakerEditor.FsmEditorWindow.DoGUI () (at Assets/PlayMaker/Editor/FsmEditorWindow.cs:136)
HutongGames.PlayMakerEditor.BaseEditorWindow.OnGUI () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/BaseEditorWindow.cs:117)
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/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
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/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:342)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:336)
UnityEditor.HostView.InvokeOnGUI (Rect onGUIPosition, Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:302)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)


NullReferenceException: Object reference not set to an instance of an object
HutongGames.PlayMaker.Actions.NextFrameEvent.AutoName () (at Assets/PlayMaker/Actions/NextFrameEvent.cs:32)
HutongGames.PlayMakerEditor.StateInspector.UpdateAutoSummarize (HutongGames.PlayMaker.FsmStateAction action) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/StateInspector.cs:2050)
HutongGames.PlayMakerEditor.StateInspector.BuildIsOpenList () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/StateInspector.cs:201)
HutongGames.PlayMakerEditor.StateInspector.Reset () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/StateInspector.cs:141)
HutongGames.PlayMakerEditor.StateInspector.OnGUI () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/StateInspector.cs:322)
HutongGames.PlayMakerEditor.InspectorPanel.OnGUI (Rect area) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/InspectorPanel.cs:182)
HutongGames.PlayMakerEditor.FsmEditor.OnGUI () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/FsmEditor.cs:610)
HutongGames.PlayMakerEditor.FsmEditorWindow.DoGUI () (at Assets/PlayMaker/Editor/FsmEditorWindow.cs:136)
HutongGames.PlayMakerEditor.BaseEditorWindow.OnGUI () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/BaseEditorWindow.cs:117)
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/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
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/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:342)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:336)
UnityEditor.HostView.InvokeOnGUI (Rect onGUIPosition, Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:302)

« Last Edit: March 04, 2019, 05:50:09 AM by lukew »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3632
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Major Playmaker editor error after clicking a specific state
« Reply #1 on: March 04, 2019, 07:32:11 AM »
Yes, it’s safe to delete the autoname method - I’ll get a fix into the next update! Sorry for the inconvenience and thanks for reporting!

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3632
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Major Playmaker editor error after clicking a specific state
« Reply #2 on: March 08, 2019, 01:21:44 PM »
This should be fixed in the latest update (1.9.0.p11).