Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: DeathByRhino on September 07, 2015, 02:05:30 AM

Title: Playmaker Null Reference Exception
Post by: DeathByRhino on September 07, 2015, 02:05:30 AM
Hi, I was just putting in a melee system and hit animation for my character when it started freezing up at runtime due to Null Reference Exception. The exact console message is below.
Help! It was such smooth sailing up until now.



NullReferenceException: Object reference not set to an instance of an object
HutongGames.PlayMakerEditor.FsmGraphView.DrawGlobalArrow (HutongGames.PlayMaker.FsmState state, Color color)
HutongGames.PlayMakerEditor.FsmGraphView.DrawTransitionHistory (Single currentTime, Single timeWindow)
HutongGames.PlayMakerEditor.FsmGraphView.DoFsmGraph (Rect area)
HutongGames.PlayMakerEditor.FsmGraphView.DoCanvasView ()
HutongGames.PlayMakerEditor.FsmGraphView.OnGUI (Rect area)
HutongGames.PlayMakerEditor.FsmEditor.OnGUI ()
HutongGames.PlayMakerEditor.FsmEditorWindow.DoGUI () (at Assets/PlayMaker/Editor/FsmEditorWindow.cs:96)
HutongGames.PlayMakerEditor.BaseEditorWindow.OnGUI ()
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Title: Re: Playmaker Null Reference Exception
Post by: djaydino on September 08, 2015, 01:36:50 AM
Quote
NullReferenceException: Object reference not set to an instance of an object
HutongGames.PlayMakerEditor.FsmGraphView.DrawGlobalArrow (HutongGames.PlayMaker.FsmState state, Color color)
HutongGames.PlayMakerEditor.FsmGraphView.DrawTransitionHistory (Single currentTime, Single timeWindow)
HutongGames.PlayMakerEditor.FsmGraphView.DoFsmGraph (Rect area)
HutongGames.PlayMakerEditor.FsmGraphView.DoCanvasView ()
HutongGames.PlayMakerEditor.FsmGraphView.OnGUI (Rect area)
HutongGames.PlayMakerEditor.FsmEditor.OnGUI ()
HutongGames.PlayMakerEditor.FsmEditorWindow.DoGUI () (at Assets/PlayMaker/Editor/FsmEditorWindow.cs:96)
HutongGames.PlayMakerEditor.BaseEditorWindow.OnGUI ()
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

Hi,
try finding this state, that one probably is not set correctly.
Title: Re: Playmaker Null Reference Exception
Post by: Alex Chouls on September 08, 2015, 02:35:54 AM
I haven't seen this error before. Even if a state has an error the graph view should handle it... Are you deleting an object at runtime maybe? Can you share the project? If so, please email me directly (don't post it on the forums since it would include Playmaker for anyone to download).