playMaker

Author Topic: NullReference Error EVERYTIME I open the Playmaker FSM  (Read 4040 times)

Qbanyto

  • Full Member
  • ***
  • Posts: 138
  • Vista Larga, Paso corto
NullReference Error EVERYTIME I open the Playmaker FSM
« on: December 02, 2021, 09:18:02 PM »
As the subject reads,
Whenever click on "edit" for whatever FSM i want to work on, i get this error. Screenshot attached. any ideas?  Please see pasted error log below.

----------------------------------------------

NullReferenceException: Object reference not set to an instance of an object
Lightbug.CharacterControllerPro.Core.CharacterActor.ToString () (at Assets/Character Controller Pro/Core/Scripts/Character/CharacterActor.cs:580)
HutongGames.PlayMaker.ActionHelpers.GetValueLabel (HutongGames.PlayMaker.INamedVariable variable) (at Assets/PlayMaker/Actions/ActionHelpers.cs:643)
HutongGames.PlayMaker.Actions.SetProperty.AutoName () (at Assets/PlayMaker/Actions/UnityObject/SetProperty.cs:45)
HutongGames.PlayMakerEditor.StateInspector.UpdateAutoSummarize (HutongGames.PlayMaker.FsmStateAction action) (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/Menus.cs:618)
HutongGames.PlayMakerEditor.StateInspector.UpdateAutoSummarize () (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/VariableManager.cs:128)
HutongGames.PlayMakerEditor.StateInspector.Reset () (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/VariableManager.cs:345)
HutongGames.PlayMakerEditor.StateInspector.OnGUI () (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/VariableTypeMenu.cs:237)
HutongGames.PlayMakerEditor.InspectorPanel.DoInspectorPanelGUI (UnityEngine.Rect area) (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/TimelineControl.cs:52)
HutongGames.PlayMakerEditor.InspectorPanel.OnGUI (UnityEngine.Rect area) (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/TimelineControl.cs:31)
HutongGames.PlayMakerEditor.FsmEditor.OnGUI () (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/FsmEditorGUILayout.cs:1372)
HutongGames.PlayMakerEditor.FsmEditorWindow.DoGUI () (at Assets/PlayMaker/Editor/FsmEditorWindow.cs:214)
HutongGames.PlayMakerEditor.BaseEditorWindow.OnGUI () (at C:/Projects/Playmaker_1.9.1/Projects/Playmaker.source.unity/Assets/PlayMaker/Editor/Classes/CustomAttributeHelpers.cs:182)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at <ba030cc3475e41258f58c8c467eb72e2>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect dockAreaRect) (at <ba030cc3475e41258f58c8c467eb72e2>:0)
UnityEditor.DockArea.OldOnGUI () (at <ba030cc3475e41258f58c8c467eb72e2>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <79197d32789c42609feb5591f73dd778>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <79197d32789c42609feb5591f73dd778>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <79197d32789c42609feb5591f73dd778>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <79197d32789c42609feb5591f73dd778>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <79197d32789c42609feb5591f73dd778>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <79197d32789c42609feb5591f73dd778>:0)
UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <79197d32789c42609feb5591f73dd778>:0)
UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at <79197d32789c42609feb5591f73dd778>:0)
UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToRegularTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <79197d32789c42609feb5591f73dd778>:0)
UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <79197d32789c42609feb5591f73dd778>:0)
UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel iPanel) (at <79197d32789c42609feb5591f73dd778>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <79197d32789c42609feb5591f73dd778>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <79197d32789c42609feb5591f73dd778>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <79197d32789c42609feb5591f73dd778>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <79197d32789c42609feb5591f73dd778>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <79197d32789c42609feb5591f73dd778>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <79197d32789c42609feb5591f73dd778>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <79197d32789c42609feb5591f73dd778>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <79197d32789c42609feb5591f73dd778>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <79197d32789c42609feb5591f73dd778>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <79197d32789c42609feb5591f73dd778>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <79197d32789c42609feb5591f73dd778>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <79197d32789c42609feb5591f73dd778>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <eb58cc8d9f124fc8b338f7a2aa050b46>:0)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: NullReference Error EVERYTIME I open the Playmaker FSM
« Reply #1 on: December 03, 2021, 07:32:50 AM »
Hi.
It looks like some conflict with your 'CharacterControllerPro' and a Set Property Action.

A null reference means it can not find a object that supposed to be there.

More specifically on line 580 on the CharacterActor.cs script.


Qbanyto

  • Full Member
  • ***
  • Posts: 138
  • Vista Larga, Paso corto
Re: NullReference Error EVERYTIME I open the Playmaker FSM
« Reply #2 on: December 03, 2021, 09:08:59 PM »
Me and the asset dev have been trying to crack this. It started happening recently and I think it’s a Unity issue but it only happens when I click on the playmaker FSM component window

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: NullReference Error EVERYTIME I open the Playmaker FSM
« Reply #3 on: December 04, 2021, 09:28:45 AM »
Hi.
I will ping Alex.

What Playmaker / Unity version are you using?

Qbanyto

  • Full Member
  • ***
  • Posts: 138
  • Vista Larga, Paso corto
Re: NullReference Error EVERYTIME I open the Playmaker FSM
« Reply #4 on: December 04, 2021, 04:19:12 PM »
I’m using the latest playmaker and latest unity.

Fwiw:
I DONT get the error if I open this FSM while in game mode.
But if I open it edit mode, it won’t load my fsm.

In other words I have to make changes during play mode, copy component while in play mode. Then exit play mode. Then in edit mode, I have to “paste component as new” to add all my
Changes. Delete the old fsm. Restart unity. And THEN i see the changes. But if I anytime I try to open the same fsm during edit mode, I get the bull reference error. And when I’m getting this errors, it throws off all the triggers to open doors. It disables my attack button.it just renders the project unusable 

A real pain since unity takes 4738 million years to load lol

Also this just started happening NOW.
I’ve been using  these assets for over a year now since I’ve started working on this project. 
« Last Edit: December 04, 2021, 04:25:16 PM by Qbanyto »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: NullReference Error EVERYTIME I open the Playmaker FSM
« Reply #5 on: December 04, 2021, 05:53:47 PM »
Hi.
Since you are in contact with the author, he might be interested making some dedicated actions so his asset supports Playmaker.
(which is faster that get/set properties actions as get/set properties actions use reflection)

Here is a link to the Playmaker API

Qbanyto

  • Full Member
  • ***
  • Posts: 138
  • Vista Larga, Paso corto
Re: NullReference Error EVERYTIME I open the Playmaker FSM
« Reply #6 on: December 04, 2021, 06:09:18 PM »
That’s the thing. I’ve been using playmaker and the character controller pro for about 11 months now. No issues. Now all the sudden I am getting these errors.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: NullReference Error EVERYTIME I open the Playmaker FSM
« Reply #7 on: December 05, 2021, 09:35:22 AM »
Hi.
Oh, did you recently update unity and or playmaker?
or some assets?

Qbanyto

  • Full Member
  • ***
  • Posts: 138
  • Vista Larga, Paso corto
Re: NullReference Error EVERYTIME I open the Playmaker FSM
« Reply #8 on: December 05, 2021, 09:54:34 AM »
Yes I did. Could that be the issue ? Triggerss are not being detected on some items either. Timers (wait) don’t work either (as posted on another thread ) and get/set property isn’t working for me. Man, I should of never updated but I had a unity crashing bug that only got  fixed when I updated unity.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: NullReference Error EVERYTIME I open the Playmaker FSM
« Reply #9 on: December 05, 2021, 09:58:41 AM »
Hi.
Can you see which version you updated to?
did you update both or only unity?


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: NullReference Error EVERYTIME I open the Playmaker FSM
« Reply #10 on: December 05, 2021, 10:00:19 AM »
Hi
are you on discord?

Qbanyto

  • Full Member
  • ***
  • Posts: 138
  • Vista Larga, Paso corto
Re: NullReference Error EVERYTIME I open the Playmaker FSM
« Reply #11 on: December 05, 2021, 11:06:12 AM »
Yes with the same screen name too

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4141
  • Official Playmaker Support
    • LinkedIn
Re: NullReference Error EVERYTIME I open the Playmaker FSM
« Reply #12 on: December 08, 2021, 01:20:46 PM »
It looks like Lightbug.CharacterControllerPro.Core.CharacterActor.ToString() needs to guard against a null reference exception. Has the author taken a look at that method?

PlayMaker calls ToString() when auto-summarizing an action when collapsed. So a possible workaround (for now) would be to try turning off Auto Summarize Folded Actions in PlayMaker Editor > Preferences > Experimental

Qbanyto

  • Full Member
  • ***
  • Posts: 138
  • Vista Larga, Paso corto
Re: NullReference Error EVERYTIME I open the Playmaker FSM
« Reply #13 on: December 08, 2021, 04:24:55 PM »
We were able to "comment out" the toString sections and that fixed the Null message from being displayed but the actual bug still remains.

whenever i open the fsm that contains the main controls to my character using this third-party asset in conjunction with playmaker, then the triggers stop working. the input manager won't work. etc. it breaks all the logic for some reason. ONLY happens if i open that fsm. that specific one. and this didn't happen before. I've been working on this game for about a year now and all the sudden i have this issue.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4141
  • Official Playmaker Support
    • LinkedIn
Re: NullReference Error EVERYTIME I open the Playmaker FSM
« Reply #14 on: December 13, 2021, 01:11:15 PM »
Can you share your project so I can take a look? If so please PM me a link.