How do I make nw.exe to close completely when exiting?

0 favourites
  • 9 posts
  • Several other Steam C2 developers have reported the same issue of the game's process remaining in task manager after closing the game. This makes it so you can't close steam or restart the game without ending the steam task. This happens with version nwjs-for-c2-v0-13-0-beta4 but did not happen before that.

    It would be too difficult for me to export the game using an older version of C2. Is there some kind of work around for this?

    Thanks!

  • Have you found a solution for this yet? Or will we have to wait for a new nw.js version?

    I have the same problem.

  • My solution might not work for everyone, but it solved my issues today, I had nw.exe refusing to unload if and only if I launcher the game from inside Steam, if I launched from the steamapps/common folder I had no issues and retained all steam integration... For me it had everything to do with appData/Local/TEMP decompression of package.nw and steam file logs and I am kind of happy I had this issue because for me I can see the benefits of not decompressing package.nw each time I launch the game, instead loading from the install directory. I could waffle on about it all but in the end these 4 simple steps fixed my problem and I now have everything back to normal , zero bugs and no ghost instances of nw.exe in my task manager, steam agrees with me when I window.close.

    If someone would like to try the same process and share the result that'd be great! I have a feeling though it's not a one-size-fits all kinda' deal.

    Basically, we're loading package contents directly from install folder instead of decompressing them to a TEMP folder.

    1. rename package.nw to package.zip

    2. extract to package/

    3. inside package folder cut package.json out and paste in root folder next to nw.exe

    4. open package.json and change at the top "index.html" to "package/index.html"

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • First I'll come out and say right away that I haven't actually tried with a "steam" version of the game. Even without steam, I already have the issue of nw.exe staying in the task manager when you close the game even if just starting the nw.exe manually to launch.

    I still tried your fix in case it would work, but unfortunately it doesn't work for me.

  • I've also observed that nw.exe doesn't kill it's own process in the task manager for non-Steam versions of C2, either.

  • The new beta release mentions this:

    NW.js: work around a bug that could leave ghost processes behind in apps that were upgraded from NW.js 0.12

    So it seems it might be fixed! (Haven't tested yet)

  • Quick update: Now the issue is really fixed when running nw.js (yay!), but still occurs when running the build from inside Construct 2 with "Run Layout".

    Still... good enough for me. It means the final product doesn't have the issue. It's only me that has to manually close nw.js from the task manager when testing it out, but the players won't be affected.

  • Hi guys, what does all this mean in conclusion for steam games made with C2 ? Are there issues or not ?

  • As far as I know, I can't test exactly what it will be like when running the game directly from steam as long as I don't pass my steam Greenlight. But I'm pretty sure all steam does is run the .exe (that we create by exporting with nw.js), which means it's most probably fixed (since it's fixed when running that .exe file).

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)