dart-pad icon indicating copy to clipboard operation
dart-pad copied to clipboard

UI hangs on infinite loops

Open adanilo opened this issue 3 years ago • 0 comments

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

  1. Load up DartPad in a browser tab.
  2. Write an infinite loop, e.g.: void main() { int i = 0; while (i < 5) { print('Hello $i'); } }
  3. 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

adanilo avatar Jun 16 '22 02:06 adanilo