Zalgo bugs #26

Closed
mikolalysenko opened this Issue Apr 25, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@mikolalysenko

I'm trying to benchmark easystarjs for an experiment, but keep running into Zalgo bugs due to easystar.js not implementing asynchronous calls correctly.

For example, in some executions of easystar it is possible for the callback to be called synchronously (!!!). See the following line for reference:

https://github.com/prettymuchbryce/easystarjs/blob/master/src/easystar.js#L149-L152

This can cause terrible problems if you aren't expecting the callback to execute until all calls to easystar have been dispatched. A simple fix would be to wrap these calls in a setTimeout, for example.

@prettymuchbryce

This comment has been minimized.

Show comment
Hide comment
@prettymuchbryce

prettymuchbryce Apr 25, 2015

Owner

Hi Mikola. Thanks for bringing this issue to my attention. I agree that the callbacks should always be asynchronous. I will take a look.

Owner

prettymuchbryce commented Apr 25, 2015

Hi Mikola. Thanks for bringing this issue to my attention. I agree that the callbacks should always be asynchronous. I will take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment