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

Get help using Construct 2

Post » Fri Jan 29, 2016 7:44 pm

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!
B
20
S
2
Posts: 70
Reputation: 1,466

Post » Fri Mar 04, 2016 10:39 pm

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.
B
10
S
3
G
1
Posts: 25
Reputation: 803

Post » Sat Mar 05, 2016 1:34 pm

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"
B
9
S
2
Posts: 26
Reputation: 586

Post » Mon Mar 07, 2016 9:04 pm

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.
B
10
S
3
G
1
Posts: 25
Reputation: 803

Post » Mon Mar 07, 2016 10:09 pm

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.
Zelda Gamekit (my project)



Example capxs:

Zelda-Style Inventory

Zelda Health

3-saveslot system

[url=https://www.dropbox.com/s/d4396pwak0oh7q6/ZeldaDialogueSystem.capx?dl=0]Zelda-like Dialogue[
B
51
S
24
G
30
Posts: 521
Reputation: 19,592

Post » Wed Mar 23, 2016 8:40 pm

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)
B
10
S
3
G
1
Posts: 25
Reputation: 803

Post » Fri Apr 22, 2016 7:52 pm

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.
B
10
S
3
G
1
Posts: 25
Reputation: 803

Post » Wed May 25, 2016 9:55 am

Hi guys, what does all this mean in conclusion for steam games made with C2 ? Are there issues or not ?
B
37
S
16
G
2
Posts: 447
Reputation: 4,865

Post » Wed May 25, 2016 8:09 pm

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).
B
10
S
3
G
1
Posts: 25
Reputation: 803


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 8 guests