pxt icon indicating copy to clipboard operation
pxt copied to clipboard

Chromium based browsers freeze when pxt is removed from DOM

Open barbero-oe opened this issue 4 years ago • 1 comments

The browser's tab freezes when pxt is removed from the DOM. This happens on chromium based browsers. It does not happen in firefox.

To Reproduce

  1. Clone pxt repository (https://github.com/microsoft/pxt.git)
  2. Clone pxt sample (https://github.com/microsoft/pxt-sample.git)
    • The folder structure should look like this:
    • bug-report/ |- pxt/ |- pxt-sample/
  3. Install pxt globally (npm install -g pxt)
  4. Install dependencies on both projects
  5. Build local pxt (cd pxt; npm run build)
  6. Link pxt-sample with local pxt (Deletion of pxt-sample/node_modules/pxt-core/ might be necessary)
    • cd pxt-sample; pxt link ../pxt
  7. Serve pxt-sample with custom pxt
    • pxt serve
  8. Open on Chrome the controller example
    • http://localhost:3232/controller.html
  9. Remove iframe node from browser console
document.getElementById('iframe').parentElement.removeChild(document.getElementById('iframe'))
  1. The browser window should be unresponsive at this moment

Desktop:

  • OS: macOS Big Sur Version 11.2.1
  • Browser:
    • Google Chrome Version 89.0.4389.90 (Official Build) (x86_64)
    • Brave Version 1.21.77 Chromium: 89.0.4389.90 (Official Build) (x86_64)

Additional questions

Should I send a message to pxt before closing? If so, which one?

barbero-oe avatar Mar 23 '21 14:03 barbero-oe

Are you sure this is not a bug in chrome devtools?
I definitely had some bad weather with freezing devtools for a few releases.

jfo8000 avatar Apr 21 '21 06:04 jfo8000