NW2: nw.App.crashRenderer() doesn't kill nw like NW1 does
See original GitHub issueNWJS Version : nw1 vs nw2 behaviour, seemingly independent of nw.js version Operating System : Ubuntu 16.4 LTS
Expected behavior
With nw1, when testing a renderer crash with nw.App.crashRenderer(), the whole nw process dies.
Actual behavior
With nw2, the nw process is not killed completely.
How to reproduce
-
Start the current nw.js version (0.44.2) with the chromium flag
--disable-features=nw2
. -
Execute
nw.App.crashRenderer();
-> nw completely dies -
Start the current nw.js version (0.44.2) without the chromium flag
--disable-features=nw2
. -
Execute
nw.App.crashRenderer();
-> nw doesn’t die, but shows an “Oh Snap” error screen
Related (future) thoughts:
There are probably 2 use cases when a nw renderer dies:
- don’t let the user decide on anything, immediately just kill the whole process.
- let the user interact & decide and what to do, e.g. let him write some text and allow him to send debugging logs etc.
Maybe it makes sense to handle crashing differently in the future, maybe based on a manifest file parameter, e.g. if kiosk is set, or to make it more explicit, a new parameter? Another idea would be to just execute some “renderer died” middleware code, to let the developer decide what to do.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (3 by maintainers)
Top GitHub Comments
Bumping.
Same behaviour still happening with current build nw.js Version: 0.60.0 tested OSes: ubuntu 16 LTS & ubuntu 20 LTS
@rogerwang, I just checked it with the following build on macOS: http://dl.nwjs.io/live-build/nw44/20200225-162000/f721a1faf/v0.44.3/ It still shows “Aw, Snap!” with Close button.