playMaker

Author Topic: PoolManager (More Null Ref Exceptions)  (Read 2900 times)

Horror

  • Junior Playmaker
  • **
  • Posts: 79
    • View Profile
PoolManager (More Null Ref Exceptions)
« on: June 13, 2013, 04:21:25 AM »
I just updated playMaker and PoolManager (and actions) and it looks as though trying to spawn something after reaching the maximum instance cap will cause the FSM to be locked in the Spawn state (even when there is an output for both Success and Failure).

The error is...
NullReferenceException: Object reference not set to an instance of an object
HutongGames.PlayMaker.Actions.PmtSpawn.DoSpawn () (at Assets/PlayMakerCustomActions/Path-o-logical/PoolManager2/PmtSpawn.cs:87)
HutongGames.PlayMaker.Actions.PmtSpawn.OnEnter () (at Assets/PlayMakerCustomActions/Path-o-logical/PoolManager2/PmtSpawn.cs:55)
HutongGames.PlayMaker.FsmState.OnEnter ()
HutongGames.PlayMaker.Fsm.EnterState (HutongGames.PlayMaker.FsmState state)
HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState)
HutongGames.PlayMaker.Fsm.UpdateStateChanges ()
HutongGames.PlayMaker.Fsm.UpdateState (HutongGames.PlayMaker.FsmState state)
HutongGames.PlayMaker.Fsm.Update ()
PlayMakerFSM.Update ()

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15371
  • Official Playmaker Support
    • View Profile
Re: PoolManager (More Null Ref Exceptions)
« Reply #1 on: June 13, 2013, 10:40:50 PM »
Hi,

 Can you simply comment this line, it's a debug line, but this is odd, it should return the spawned transform. I'll run some tests, but last week I tested, and it worked, odd.

bye,

 Jean

VictorRayDev

  • Playmaker Newbie
  • *
  • Posts: 35
    • View Profile
Re: PoolManager (More Null Ref Exceptions)
« Reply #2 on: July 09, 2013, 05:13:32 AM »
same prob here. This is my last update bug everything else is now ok.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15371
  • Official Playmaker Support
    • View Profile
Re: PoolManager (More Null Ref Exceptions)
« Reply #3 on: July 09, 2013, 06:34:03 AM »
Hi,

 I haven't been able to reproduce these... could you send me a repro?

bye,

 Jean

Horror

  • Junior Playmaker
  • **
  • Posts: 79
    • View Profile
Re: PoolManager (More Null Ref Exceptions)
« Reply #4 on: July 09, 2013, 07:06:16 AM »
Here's a repro project. The spawner creates 3 balls (the instance cap) and then gets stuck in the spawn state rather than firing the Success or Failure outputs.

As you said, you can get around this by commenting out the debug line.

[ADMIN: Link removed. Please do not share projects that contain Playmaker dlls]

[HORROR: Removed the file as well!]
« Last Edit: July 09, 2013, 02:53:06 PM by Horror »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3639
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: PoolManager (More Null Ref Exceptions)
« Reply #5 on: July 09, 2013, 12:22:44 PM »
It looks like the debug statement should be moved to after this line:

if ( result != null){

Then everything should work as expected. Jean, can you update the unitypackage?

Cheers,
Alex

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15371
  • Official Playmaker Support
    • View Profile
Re: PoolManager (More Null Ref Exceptions)
« Reply #6 on: July 10, 2013, 02:57:45 AM »
d'oh...

I just could not see this. sorry :)

package updated on the wiki

bye,

 Jean