playMaker

Author Topic: infinite loop > only 30 loops but 300 threshold reached?  (Read 2361 times)

amaranth

  • Full Member
  • ***
  • Posts: 172
infinite loop > only 30 loops but 300 threshold reached?
« on: August 10, 2012, 02:22:30 PM »
I'm not sure why this is, but I have a loop that loops 30 times, however, I get the infinite loop warning after the loop has completed 22 loops. My threshold is set at 300. When I change this threshold to 500, the loop completes properly.

I guess my question is this: What are the 300 things being tracked by the infinite loop? Does it count every action that happens inside the loop? Or is is supposed to only track how many times the loop is hit?

artician

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 318
Re: infinite loop > only 30 loops but 300 threshold reached?
« Reply #1 on: August 10, 2012, 04:18:21 PM »
For what it's worth, per JeanFabre's suggestion, I found a work around for this by adding a 0.1 time delay at the end of my ArrayListGet state.

amaranth

  • Full Member
  • ***
  • Posts: 172
Re: infinite loop > only 30 loops but 300 threshold reached?
« Reply #2 on: August 10, 2012, 05:16:55 PM »
I'm not using any array handling with this fsm. Are the arrays constantly looping in the background somehow?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: infinite loop > only 30 loops but 300 threshold reached?
« Reply #3 on: August 13, 2012, 03:45:19 AM »
Hi,
 
no, the looping doesn't occur in the background at all. the looping is simply a check in the action to maintain and redirect the proper events based on where we are in the loop.

bye,

 Jean