Bug: Editor locks up entirely on occasion

  • A* version: 5.2.5
  • Unity version: 6000.0.30f1

I suspect there’s a bug in a* that’s causing my editor to lock-up when in play mode, forcing me to end process.

The issue seems to be related to PathProcessor.locks containing a lockId ahead of the maximum lock number. When it checks for lock with id 5 (for example), PathProcessor.locks contains only ‘6’, and thus the .Contains(5) returns false (executed by GraphUpdateLock.Held, checked in AStarPath.PerformBlockingActions).

This causes AstarPath.BlockUntilCalculated to hang perpetually.

Happy to supply information, but I’m not doing anything exciting other than starting some paths (via Seeker) shortly after the graph has been rescanned when entering play mode. I also don’t know how to provoke this, I’ve yet to identify when/why this happens.

If I start VS’ debugger and break around AstarPath.PerformBlockingActions, I am able to manually remove the ‘6’ lock Id from the PathProcessor.locks list, manually add in a ‘5’ and everything works and the program recovers.

Thanks,
Andrew

Hi

Are you able to reliably replicate this issue?

Sadly, not yet. If I do I will certainly post replication steps.

1 Like