-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
editor crashing with infinite loops, and edge cases - update loop-protect
to use jsbin/loop-protect
#698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
thanks for reporting! there's a library included in this project to prevent infinite loops from crashing the editor, which should prevent this. however, i noticed that for (var i = 0; ;) {
} is caught and stopped by the for (let i = 0; ; ) {
} is not caught and handled by the loop protect code. |
i was looking at the |
loop-protect
to use jsbin/loop-protect
i started to work on this, following the instructions here, but keep getting the following error from Babel: |
switching this to high priority—seems like it's causing a lot of bugs and frustration. |
loop-protect
to use jsbin/loop-protect
loop-protect
to use jsbin/loop-protect
@catarak can you help me with this. |
I have made some progress but not able to catch the infinite loop , I have asked the developer of this library to help me with it . I will send a PR soon to close this. |
I have made some progress and its running with var and while loops but for (let) loops are still not working |
Not sure if this is happening but I feel that we need to transpile down to es5 and then createa the transformed code , I converted it to use jsbin/loop-protect but it still stucks on for(let) loop #947 |
Though this thread is old, I wanted to upvote this significant problem in which an accidental infinite loop essentially leaves us doomed to have to close the window (and lose all saved work, though issue #1405 is separately addressing that). What would be great is if there was a way for user to interrupt the script, even when stuck in an infinite loop. There is still a visible play/stop button in the editor GUI so it would be great if the thread that is running the sketch could have some intentionally yielding so the GUI has a chance to detect the stop button and stop the sketch thread from running. That would be ideal way to stop the loop while not having to close the window and lose code or crash the entire browser. |
Nature of issue?
Details about the bug: When auto-refresh is enabled and I'm typing a for loop, the editor crashes.
The text was updated successfully, but these errors were encountered: