playMaker

Author Topic: Debug build error: The object of type 'PlayMakerFSM' has been destroyed[SOLVED]  (Read 2623 times)

Alatriste

  • Full Member
  • ***
  • Posts: 193
Hi, I'm getting the following error when I build the game:

Quote
The object of type 'PlayMakerFSM' has been destroyed but you are still trying to access it.

I don't get the error during the normal walkthrough so I have no clue about what can be the issue. I kind of imagine maybe something related with prefabs but again, I'm running out of ideas about how to track what is causing the problem here.

Any ideas?
« Last Edit: April 02, 2019, 11:28:16 AM by jeanfabre »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Are you getting this error when making the build?
Or when running the build?
Can you past the full error? It should have more info.

Alatriste

  • Full Member
  • ***
  • Posts: 193
I'm getting this error while making the build. The build is done successfully though.

Code: [Select]
MissingReferenceException: The object of type 'PlayMakerFSM' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.Component.GetComponent[T] () (at C:/buildslave/unity/build/Runtime/Export/Component.bindings.cs:42)
HutongGames.PlayMaker.FsmProcessor.AddUiEventHandler[T] (PlayMakerFSM fsm) (at Assets/PlayMaker/FsmProcessor.cs:63)
HutongGames.PlayMaker.FsmProcessor.HandleUiEvent[T] (PlayMakerFSM fsm, HutongGames.PlayMaker.UiEvents uiEvent) (at Assets/PlayMaker/FsmProcessor.cs:57)
HutongGames.PlayMaker.FsmProcessor.OnPreprocess (PlayMakerFSM fsm) (at Assets/PlayMaker/FsmProcessor.cs:38)
PlayMakerFSM.AddEventHandlerComponents () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:425)
PlayMakerFSM.Preprocess () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:225)
HutongGames.PlayMakerEditor.PlayMakerBuildCallbacks.OnPostprocessScene () (at Assets/PlayMaker/Editor/PlayMakerBuildCallbacks.cs:57)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
UnityEditor.Build.BuildPipelineInterfaces+AttributeCallbackWrapper.OnProcessScene (UnityEngine.SceneManagement.Scene scene, UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:163)
UnityEditor.Build.BuildPipelineInterfaces+<OnSceneProcess>c__AnonStorey1.<>m__1 (UnityEditor.Build.IProcessSceneWithReport spp) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:387)
UnityEditor.Build.BuildPipelineInterfaces.InvokeCallbackInterfacesPair[T1,T2] (System.Collections.Generic.List`1[T] oneInterfaces, System.Action`1[T] invocationOne, System.Collections.Generic.List`1[T] twoInterfaces, System.Action`1[T] invocationTwo, System.Boolean exitOnFailure) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:356)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

I'm trying to figure out whether this is due to an FSM that is attached to an instanciated gameObject that is not controlled by Playmaker, but for another addon, which may destroy it before the FSM runs. But even disabling the FSM I still get the error, which is what confuses me and makes me think that this might not be the cause of the error.  :o

Running Unity 2018.3.0f2 & Playmaker 1.9.0

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
What's the full PlayMaker version info? e.g., 1.9.0.p13

Alatriste

  • Full Member
  • ***
  • Posts: 193
Correct. I have 1.9.0 P13

adrian

  • Junior Playmaker
  • **
  • Posts: 52
Hi I am getting the same error and cannot build, any suggestions?
Running Unity 2018.3.9f1 and Playmaker 1.9.0.p13

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
There’s an update, 1.9.0.p14, that should fix this issue.

adrian

  • Junior Playmaker
  • **
  • Posts: 52
All sorted, thank you very much!

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Thanks for letting us know :)

shamo

  • Playmaker Newbie
  • *
  • Posts: 39
Hi, was having the same problem and could not build to Android with the same reported error. Updated to p14 and that seemed to fix it but now I'm getting crashes whenever trying to edit prefabs? The editor slows right down then brings up crash reporter  :-[ Totally unworkable now?

shamo

  • Playmaker Newbie
  • *
  • Posts: 39
Hold that thought...ran 'update all FSM's in build' and it all seems good now. :P