Reply To: Iterate gets stuck when list Is changed

Forums 💬 NodeCanvas ⚙️ Support Iterate gets stuck when list Is changed Reply To: Iterate gets stuck when list Is changed

#16843
wanderfalke
Participant

    I just noticed that the iterator gets stuck if list.Count gets reduced after the iterator was executed.

    E.g. Iterator was executed -> element is removed from list -> interator is executed again.

    I added

    infront of the iterator’s for loop.

    made some small modification to currentIndex==maxIteration.value -1 aswell. MaxIteration could be changed during runtime. If currentIndex > maxIteration, I would expect the loop not to continue with its normal operation.