playMaker

Author Topic: How to find the source of an error message  (Read 2684 times)

szomaza

  • Sr. Member
  • ****
  • Posts: 253
How to find the source of an error message
« on: April 19, 2019, 06:17:49 AM »
When I get an error message like

Could not find FSM: name of fsm

How do I find the source that tried to send an event?
Could the name of the game object be in the error message which tried to send the Send Event action to the FSM which was not found and resulted in the error?
Without this info it is quite hard to find out what is the cause of the problem. Right?

Code: [Select]
Could not find FSM: FSM - Reset Platform
UnityEngine.Debug:LogWarning(Object)
HutongGames.PlayMaker.ActionHelpers:GetGameObjectFsm(GameObject, String) (at Assets/PlayMaker/Actions/ActionHelpers.cs:107)
HutongGames.PlayMaker.Actions.GetFsmString:DoGetFsmString() (at Assets/PlayMaker/Actions/StateMachine/GetFsmString.cs:61)
HutongGames.PlayMaker.Actions.GetFsmString:OnEnter() (at Assets/PlayMaker/Actions/StateMachine/GetFsmString.cs:38)
HutongGames.PlayMaker.FsmState:ActivateActions(Int32) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:205)
HutongGames.PlayMaker.FsmState:OnEnter() (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:175)
HutongGames.PlayMaker.Fsm:EnterState(FsmState) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2768)
HutongGames.PlayMaker.Fsm:SwitchState(FsmState) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2715)
HutongGames.PlayMaker.Fsm:UpdateStateChanges() (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2643)
HutongGames.PlayMaker.Fsm:DoTransition(FsmTransition, Boolean) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2682)
HutongGames.PlayMaker.Fsm:ProcessEvent(FsmEvent, FsmEventData) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2253)
HutongGames.PlayMaker.Fsm:SendEventToFsmOnGameObject(GameObject, String, FsmEvent) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2622)
HutongGames.PlayMaker.Fsm:Event(FsmEventTarget, FsmEvent) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2389)
HutongGames.PlayMaker.Actions.SendEvent:OnEnter() (at Assets/PlayMaker/Actions/StateMachine/SendEvent.cs:42)
HutongGames.PlayMaker.FsmState:ActivateActions(Int32) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:205)
HutongGames.PlayMaker.FsmState:OnEnter() (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:175)
HutongGames.PlayMaker.Fsm:EnterState(FsmState) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2768)
HutongGames.PlayMaker.Fsm:SwitchState(FsmState) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2715)
HutongGames.PlayMaker.Fsm:UpdateStateChanges() (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2643)
HutongGames.PlayMaker.Fsm:UpdateState(FsmState) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2784)
HutongGames.PlayMaker.Fsm:Update() (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1995)
PlayMakerFSM:Update() (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:579)

I am probably missing something and don't know the tools which I should be using to debug such a problem.
Please help with any suggestion I should check.

Br,
szomaza

szomaza

  • Sr. Member
  • ****
  • Posts: 253
Re: How to find the source of an error message
« Reply #1 on: May 04, 2019, 06:25:06 AM »
Debugging playmaker is quite a gray area for me.
Is there a tutorial explaining all the possibilities there are?

I checked: https://hutonggames.fogbugz.com/default.asp?W116
and all sub-pages but did not find how I could find the game object which tried to send an event to a not found FSM.
« Last Edit: May 04, 2019, 06:35:18 AM by szomaza »

PlaymakerNOOB

  • Full Member
  • ***
  • Posts: 219
Re: How to find the source of an error message
« Reply #2 on: May 08, 2019, 04:47:29 PM »
If you dont know the game object, you can select game objects one by one in the Hierarchy and then look at your actions list.  It should have numbers next to the actions that are on that object.  Presumably you should have numbers in the State Machine section (for send event) and then can narrow it down right clicking the action in the action list and selecting "find action" and it should show you where they are in that game object.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: How to find the source of an error message
« Reply #3 on: May 09, 2019, 03:05:17 AM »
Hi.
From the error i can see that its a 'Get Fsm String' that has the issue.

Try right clicking the action on the action list, you should get a list of where the action is used.
When you click on them, it should redirect you to the fsm/state

szomaza

  • Sr. Member
  • ****
  • Posts: 253
Re: How to find the source of an error message
« Reply #4 on: May 11, 2019, 05:26:00 AM »
Thank you djaydino.
That helped me narrow it down (as I did not use the 'Get Fsm String' in many places) and I found the error I made.
Which was that I use multiple different platforms and in the case of the moving type the parent hierarchy was different so the Get Parent action was not getting the proper object so it: 'Could not find FSM'

Also I'll put more effort into deciphering error messages to be able to get to this same result in the future, without asking.

Br,
szomaza

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: How to find the source of an error message
« Reply #5 on: May 11, 2019, 06:27:23 AM »
I’ll get some extra info into the error messages in the next update.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: How to find the source of an error message
« Reply #6 on: May 11, 2019, 08:40:01 AM »
Hi.
No problem, you can ask away:)

That what the forum is for :)