playMaker

Author Topic: ArrayListGetNext Error: Proxy is Null Issue[SOLVED]  (Read 316 times)

Athin

  • Full Member
  • ***
  • Posts: 102
    • View Profile
ArrayListGetNext Error: Proxy is Null Issue[SOLVED]
« on: November 11, 2018, 05:00:54 AM »
Hey guys

I've been banging my head on this error and I'm not sure whats causing it to trip up.

Without going into to much of what the FSM is doing (As its pretty complicated now) I tried to do a work around since I can't find a cause.  I place a Array List Exist action above the Get Next action but I STILL get this error.  The Exist action fires off the Does Exist even but then imminently after tells me the proxy is NULL?  Odd still is if I play the scene after I get the error the Get Next action runs perfect fine. It is as if its out of sync by a frame or something silly like that.  I'm completely stumped on this one and I'm hoping its just something simple I'm missing or someone knows a workaround/cause of it.

thanks
« Last Edit: November 12, 2018, 10:45:21 PM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14316
  • Official Playmaker Support
    • View Profile
Re: ArrayListGetNext Error: Proxy is Null Issue
« Reply #1 on: November 11, 2018, 10:46:14 PM »
Hi,

 What do you do inside the loop? maybe you delete the object?

Bye,

 Jean

Athin

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Re: ArrayListGetNext Error: Proxy is Null Issue
« Reply #2 on: November 12, 2018, 03:57:35 AM »
Hey Jeanfabre,

No nothing gets deleted in the loop.  Basically the action is checking 5 spots on an array that is preassigned on a game object. The Get Next action checks the next object in the list and the loop state simply checks if the object is tagged "Free" and if not it shoots back up to the get next.  If the get next action finishes then it fires off no free spots event which then basically starts the whole process again.  At no point does that array get deleted nor does the objects in the array change at all. 

The weird part is if I unpause the editor once the error stops it, the action works fine firing off the FINISH event in the action.  I thought maybe something is somehow misaligned or something wacky happening so I tried a Next Frame event before getting to the Get next action but same result.  I'm honestly lost what is causing it. 

Nothing in the project changes/destroys that array or the objects in it.

Athin

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Re: ArrayListGetNext Error: Proxy is Null Issue
« Reply #3 on: November 12, 2018, 04:18:58 AM »
Posting here in case others have issues as I stumbled onto a fix.

All I simply did was use a reset flag and set it to true before the Get net action.  I'm not exactly sure though why that fixed the issue.  Maybe someone else can respond to tell me the why/how it fix it?

Thanks

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14316
  • Official Playmaker Support
    • View Profile
Re: ArrayListGetNext Error: Proxy is Null Issue
« Reply #4 on: November 12, 2018, 10:45:00 PM »
Hi,

yes, likely because you where using this action for something else in your fsm, and this action needs a reset before using it for the first time ( so that it iterates from the start).

Bye,

 Jean