playMaker

Author Topic: Enter called twice before exit.[SOLVED]  (Read 1896 times)

Hoesterey

  • Playmaker Newbie
  • *
  • Posts: 3
Enter called twice before exit.[SOLVED]
« on: August 25, 2017, 01:45:33 AM »
I can't submit a bug report due to the window crashing when I try.

Enter is called twice on a node before it exits!

I proved this with the commented out code below:   
Expect that enter is not called twice.
public override void OnEnter()
        {
            //if (!m_Entered)
            //{
                DialogueManager.PushStatementToDialoguePanel(m_LevelEvent);
                DialogueManager.StatementFinishedEvent += OnStatementFinishedEvent;
            //}
        }

        public override void OnExit()
        {
            //m_Entered = false;
            base.OnExit();
        }

1st Call callstack:
1st call
UnityEngine.Debug:Assert(Boolean, String)
TribeSDK.TribeLevel.Playmaker.PushDialogueToPanel:OnEnter() (at Assets/TribeSDK/Code/Level/LevelEvent/TribePlaymaker/Dialogue/PushDialogueToPanel.cs:31)
HutongGames.PlayMaker.FsmState:ActivateActions(Int32) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:201)
HutongGames.PlayMaker.FsmState:OnEnter() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:169)
HutongGames.PlayMaker.Fsm:EnterState(FsmState) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2603)
HutongGames.PlayMaker.Fsm:SwitchState(FsmState) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2561)
HutongGames.PlayMaker.Fsm:UpdateStateChanges() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2489)
HutongGames.PlayMaker.Fsm:Start() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1796)
PlayMakerFSM:Start() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:478)


2nd Call callstack:
UnityEngine.Debug:Assert(Boolean, String)
TribeSDK.DialogueSystem.DialogueManager:PushStatementToDialoguePanel(LevelEvent) (at Assets/TribeSDK/Code/Dialogue/DialogueManager.cs:636)
TribeSDK.TribeLevel.Playmaker.PushDialogueToPanel:OnEnter() (at Assets/TribeSDK/Code/Level/LevelEvent/TribePlaymaker/Dialogue/PushDialogueToPanel.cs:32)
HutongGames.PlayMaker.FsmState:ActivateActions(Int32) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:201)
HutongGames.PlayMaker.FsmState:OnEnter() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:169)
HutongGames.PlayMaker.Fsm:EnterState(FsmState) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2603)
HutongGames.PlayMaker.Fsm:SwitchState(FsmState) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2561)
HutongGames.PlayMaker.Fsm:UpdateStateChanges() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2489)
HutongGames.PlayMaker.Fsm:UpdateState(FsmState) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2619)
HutongGames.PlayMaker.Fsm:Update() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1865)
PlayMakerFSM:Update() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:509)



« Last Edit: August 28, 2017, 03:04:17 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Enter called twice before exit.
« Reply #1 on: August 25, 2017, 04:59:05 AM »
Hi,

 the two logs are different and leads back to some other places.

 Can you repro with a simple scene with just one fsm, one action and one log inside that action on Enter?

 else, it could be many many things including logic flow issues where another fsm is calling that state again when it exits or something like that.

 Bye,

 Jean

Hoesterey

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Enter called twice before exit.
« Reply #2 on: August 25, 2017, 01:52:52 PM »
Thanks for the reply it was on our side.  We had an async loading issue where two FSMs were loaded at the same time running.  Thanks for the pointer.


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Enter called twice before exit.
« Reply #3 on: August 28, 2017, 03:04:07 AM »
Hi,

 Cool, I am glad you found the issue :)

 Bye,

 Jean