FlowCanvas Forums › Support › MissingReferenceException error after play mode in editor
I’m not sure why I get this error when I stop the play mode in editor:
MissingReferenceException: The object of type ‘MonoManager’ 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.MonoBehaviour.StopCoroutine (UnityEngine.Coroutine routine) (at <3dc54541a2574ac7826a004a212a4332>:0)
NodeCanvas.Framework.Node.StopCoroutine (UnityEngine.Coroutine routine) (at Assets/ParadoxNotion/CanvasCore/Framework/Runtime/Graphs/Node.cs:422)
FlowCanvas.Nodes.LatentActionNodeBase.BreakAll (System.Boolean callFinish) (at Assets/ParadoxNotion/FlowCanvas/Modules/FlowGraphs/Nodes/Functions/Implemented/LatentActionNode.cs:67)
FlowCanvas.Nodes.LatentActionNodeBase.OnGraphStoped () (at Assets/ParadoxNotion/FlowCanvas/Modules/FlowGraphs/Nodes/Functions/Implemented/LatentActionNode.cs:46)
FlowCanvas.Nodes.SimplexNodeWrapper`1[T].OnGraphStoped () (at Assets/ParadoxNotion/FlowCanvas/Modules/FlowGraphs/Nodes/Functions/Implemented/SimplexNodeWrapper.cs:71)
NodeCanvas.Framework.Graph.Stop (System.Boolean success) (at Assets/ParadoxNotion/CanvasCore/Framework/Runtime/Graphs/Graph.cs:603)
NodeCanvas.Framework.GraphOwner.StopBehaviour (System.Boolean success) (at Assets/ParadoxNotion/CanvasCore/Framework/Runtime/Graphs/GraphOwner.cs:234)
NodeCanvas.Framework.GraphOwner.OnDisable () (at Assets/ParadoxNotion/CanvasCore/Framework/Runtime/Graphs/GraphOwner.cs:393)
<br style=”color: #dcddde; font-family: Whitney, ‘Helvetica Neue’, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: break-spaces; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgba(4, 4, 5, 0.07); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;” />
The FlowCanvas ->
Hello there,
You are right. This can happen is certain cases. To fix this null reference error, please open up Node.cs file and change lines #415 – 423, to be like this:
1 2 3 4 5 6 7 8 9 10 11 | ///Nodes can use coroutine as normal through MonoManager. public Coroutine StartCoroutine(IEnumerator routine) { return MonoManager.current?.StartCoroutine(routine); } ///Nodes can use coroutine as normal through MonoManager. public void StopCoroutine(Coroutine routine) { MonoManager.current?.StopCoroutine(routine); } |
A new version will also be sent later today or tomorrow which will also include this fix of course.
Let me know if the above works for you.
Thank you.
Confirmed,
Your latest update fixes this.
Thank you
Thank you for confirming! I am glad this is fixed 🙂