Nw.js: Crash closing popup window after opening dev tools

Created on 19 Jun 2019  路  11Comments  路  Source: nwjs/nw.js

NWJS Version : 0.39.1
Operating System : Windows 10 x64

Expected behavior

No crash

Actual behavior

Sometimes NW.js appears to crash after closing a popup window.

When it crashes, the following line is written to debug.log:

[0619/151916.352:ERROR:http_transport_win.cc(178)] WinHttpCrackUrl: The operation completed successfully. (0x0)

How to reproduce

Our web app Construct 3 has a desktop download based on NW.js. You can find it here: https://downloads.scirra.com/c3-desktop/win64/construct3-win64-c75-beta.zip
You can test other versions simply by extracting a newer NW.js version over that. The zip uses NW.js 0.39.0 but I also verified it reproduces with NW.js 0.39.1. This issue was originally discovered by a Construct 3 user who reported it to us at https://github.com/Scirra/Construct-3-bugs/issues/2962 and it seems to have affected the last several versions of NW.js.

The following steps reliably reproduce the issue for me:

  1. Launch the C3 app
  2. On the start page press Alt+N, which creates a new empty project
  3. Press F5, which starts a preview, opening a popup window
  4. Press F12, which opens dev tools for the popup window
  5. Focus the popup window again, and resize it a bit (for some reason the window must be resized to reproduce the problem)
  6. Close the popup window. At this point the main app closes as well, which appears to be because NW.js crashed.

If it doesn't happen the first time, repeat steps 3-6. For me it always happens by the second time round. It works fine in Chrome, so it appears to be specific to NW.js.

All 11 comments

Same problem in 0.37.4 (and lower)

It sounds like this issue is occurring with other types of popup window, such as a popup for a Dropbox login, which is much more serious than just affecting dev tools. A similar sounding issue was mentioned on our forum here: https://www.construct.net/en/forum/construct-3/general-discussion-7/dropbox-login-construct-144931

I couldn't reproduce it here. Could you please provide the crash dump file?

Here's a crash dump from following the original reproduction steps:
036e66d6-4d75-4076-b055-192554df1158.zip

I pushed a fix. Let's wait for the next build after the current one and see how it would work.

Thanks, let me know when it's live and I'll try it out again.

Nice!

Looks like it's working now - tried repro steps 5 times and it didn't crash with 0.39.2.

Could the fix have affected other kinds of popup windows too, e.g. a Dropbox login prompt?

It should fix potential similar case.

Great, thanks.

Was this page helpful?
0 / 5 - 0 ratings