dart-pad
dart-pad copied to clipboard
UI hangs on infinite loops
What happened?
Naive user codes an infinite loop and clicks 'Run' causes the entire UI to lock up. It should be possible to click reset or similar to get back to a usable state.
Steps to reproduce problem
- Load up DartPad in a browser tab.
- Write an infinite loop, e.g.: void main() { int i = 0; while (i < 5) { print('Hello $i'); } }
- Click 'Run'.
Expected result: The string 'Hello 0' should get printed continuously.
Actual result: DartPad hangs, user can't click 'Reset' or anything, must reload the browser tab to recover.
Browser
Browser: Chrome
Version: 102.0.5005.61 (stable)
Machine
Operating system: OS X
Version: 12.4