Playmaker Forum

PlayMaker News => General Discussion => Topic started by: szomaza on April 19, 2019, 06:17:49 AM

Title: How to find the source of an error message
Post by: szomaza 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
Title: Re: How to find the source of an error message
Post by: szomaza 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 (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.
Title: Re: How to find the source of an error message
Post by: PlaymakerNOOB 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.
Title: Re: How to find the source of an error message
Post by: djaydino 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
Title: Re: How to find the source of an error message
Post by: szomaza 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
Title: Re: How to find the source of an error message
Post by: Alex Chouls on May 11, 2019, 06:27:23 AM
I’ll get some extra info into the error messages in the next update.
Title: Re: How to find the source of an error message
Post by: djaydino on May 11, 2019, 08:40:01 AM
Hi.
No problem, you can ask away:)

That what the forum is for :)