playMaker

Author Topic: NullReferenceException  (Read 1130 times)

jz87

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
NullReferenceException
« on: May 15, 2011, 04:36:43 PM »
I'm getting this following exception. I have a GUITexture with an attached state machine. When on mouse down it goes to a new state which loads a new level, destroying everything on the current level. Then I get this exception in the console screen. I have this counter object in the new level that basically waits for 5 seconds and then loads the previous level. If I disable the DrawStateLabels option on the PlayMakerGUI in the new level then this exception does not happen. Can someone explain what are the assumptions that PlayMakerGUI make about the scene?

NullReferenceException: Object reference not set to an instance of an object
PlayMakerGUI.<DrawStateLabels>b__0 (HutongGames.PlayMaker.Fsm x, HutongGames.PlayMaker.Fsm y)
System.Array.qsort[Fsm] (HutongGames.PlayMaker.Fsm[] array, Int32 low0, Int32 high0, System.Comparison`1 comparison)
System.Array.Sort[Fsm] (HutongGames.PlayMaker.Fsm[] array, Int32 length, System.Comparison`1 comparison)
Rethrow as InvalidOperationException: Comparison threw an exception.
System.Array.Sort[Fsm] (HutongGames.PlayMaker.Fsm[] array, Int32 length, System.Comparison`1 comparison)
System.Collections.Generic.List`1[HutongGames.PlayMaker.Fsm].Sort (System.Comparison`1 comparison)
PlayMakerGUI.DrawStateLabels ()
PlayMakerGUI.OnGUI ()