You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NWJS Version : 0.32.1
Operating System : macOS High Sierra 10.13.6
Expected behaviour
When the DevTools have been opened and shall be opened again via win.openDevTools() then the already opened DevTools window should be focused.
Actual behaviour
The application crashes, similar to the description of issue #6687
There is also another issue, but it does not get triggered by the reproduction method below. When I use a huge application of mine and the app crashes due to the DevTool related issue, then sometimes the helper app does not get killed and uses a very high amount of cpu, similar to issue #6662
Additionally: The issue can not be prevented trough the usage of win.isDevToolsOpen(), because that method does not seem to exist.
How to reproduce
<!DOCTYPE html>
<html>
<head>
<script>
// get the current window
const win = nw.Window.get();
// automatically open the dev tools when an error occurs
win.window.process.on("uncaughtException", (e) => {
win.showDevTools();
});
// open the dev tools
win.showDevTools();
// this will trigger the uncaught exception whichs triggers the dev tools
// to be opened (which will crash the application if the dev tools have
// already been opened)
function crashMe() {
const hallo = 3;
hallo = 4;
}
// this will crash as well, because reopening the already opened dev tools
// crashs the application
function crashMe2() {
win.showDevTools();
}
// preventing the issue trough detecting if the dev tools are already
// opened is also not possible, because the method isDevToolsOpen() does
// not exist
function notWorkingInfo() {
console.log(win.isDevToolsOpen());
}
console.log(win);
// outputs the following, not including the method isDevToolsOpen():
/*
NWWindow
frameId: (...)
height: (...)
isAlwaysOnTop: (...)
isFullscreen: (...)
isKioskMode: (...)
isTransparent: (...)
menu: (...)
title: (...)
width: (...)
window: (...)
x: (...)
y: (...)
zoomLevel: (...)
__proto__: NWWindow
*/
</script>
</head>
<body>
<input type="button" onclick="crashMe();" value="crash me">
<input type="button" onclick="crashMe2();" value="crash me 2">
<input type="button" onclick="notWorkingInfo();" value="not working is-dev-tools-open">
</body>
</html>
Error code through running nwjs from the Terminal:
NWJS Version : 0.32.1
Operating System : macOS High Sierra 10.13.6
Expected behaviour
When the DevTools have been opened and shall be opened again via win.openDevTools() then the already opened DevTools window should be focused.
Actual behaviour
The application crashes, similar to the description of issue #6687
There is also another issue, but it does not get triggered by the reproduction method below. When I use a huge application of mine and the app crashes due to the DevTool related issue, then sometimes the helper app does not get killed and uses a very high amount of cpu, similar to issue #6662
Additionally: The issue can not be prevented trough the usage of win.isDevToolsOpen(), because that method does not seem to exist.
How to reproduce
Error code through running nwjs from the Terminal:
Last words
Thank you for looking into these issues and also for developing nwjs, which is a great tool!
Happy Striker
The text was updated successfully, but these errors were encountered: