Coder Social home page Coder Social logo

Can't close frozen window about electron HOT 8 CLOSED

electron avatar electron commented on May 2, 2024
Can't close frozen window

from electron.

Comments (8)

zcbenz avatar zcbenz commented on May 2, 2024

Atom-shell guarantees that closing window would trigger beforeunload and unload event in javascript, so an infinite loop would block the close event. Simply make the x on window work would break this guarantee.

I'll add a way to make browser aware of the infinite loop in renderer, so users can choose to (1) force closing the window; (2) continue waiting; (3) interrupt the loop and report the stack trace.

from electron.

kevinsawicki avatar kevinsawicki commented on May 2, 2024

Yeah, a force close prompt would be great.

from electron.

nathansobo avatar nathansobo commented on May 2, 2024

This appears to have regressed.

from electron.

nathansobo avatar nathansobo commented on May 2, 2024

This appears to have regressed again.

from electron.

zcbenz avatar zcbenz commented on May 2, 2024

@nathansobo I can not reproduce with following steps:

  1. open devtools and run while(true);
  2. click window's close button
  3. wait for 5s and the Editor is not responding dialog shows

from electron.

nathansobo avatar nathansobo commented on May 2, 2024

@zcbenz Strange. It's happening for me in certain specs, I think in situations where the spec pretty printer is trying to print way more than it can handle. If you put an endless loop in specs and run them, is it possible to reproduce?

from electron.

zcbenz avatar zcbenz commented on May 2, 2024

Seems that the unresponsive dialog is suppressed in specs:
https://github.com/atom/atom/blob/master/src/browser/atom-window.coffee#L96

from electron.

nathansobo avatar nathansobo commented on May 2, 2024

Wow, sorry about that.

from electron.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.