Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NW.js (0.22.0+) "--in-process-gpu" Causes Severe Problems With Application Instancing #6059

Closed
TheRealDannyyy opened this issue Jul 27, 2017 · 24 comments
Assignees

Comments

@TheRealDannyyy
Copy link

TheRealDannyyy commented Jul 27, 2017

General Information:

  • Using NW.js version 0.22.0 & newer
  • Windows 7 with latest drivers
  • Package.nw (unzip before use)

Problem Description:
I'm running a packaged Construct 2 game (HTML5).
I've recently noticed an issue with the "--in-process-gpu" chromium arg, which started occurring using the mentioned versions above. This issue for an unknown reason causes NW.js to not run at all, when launched through 3rd party programs such as Steam or in Construct 2's Preview Mode.

I could figure out reliable ways to reproduce this issue, it seems like it's somehow related to application instancing (running multiple application instances at once, which shouldn't be possible by default).

Steps to reproduce (instance issue):
<1> Run the attached package.nw file using NW.js 0.22.0+
<2> Run more instances and notice that they all run in the background (this shouldn't be possible!)
<3> Notice that the other instances have growing memory use and close themselves after about 5-10sec.
(In rare cases some of these additional processes keep running and require to be closed manually.)

Steps to reproduce (3rd party "ghost process" issue):
<1> Put the attached package.nw file inside the same folder where your NW.js executable is
<2> Add "nw.exe" as a non-steam game into your Steam Library (?)
<3> Run "nw.exe" using Steam (this might require multiple attempts or not work at all)
<4> Notice that NW.js doesn't run at all because of processes that keep running in the background

Observed Result
Using the "--in-process-gpu" chromium arg in NW.js v0.22.0+, causes severe problems and sometimes even makes it impossible to run NW.js through 3rd party programs at all.

Since I couldn't reproduce these issues using NW.js v0.21.0, I assume that NW.js v0.22.0+ must have introduced some behind-the-scenes changes to application instancing, which don't seem to work in combination with the mentioned chromium arg.

I also wasn't able to reproduce these issues without using "--in-process-gpu", so it's save to assume that this particular chromium arg is at fault.

Expected Result
I expect it to work as it did in previous versions, since it is required in order to launch the Steam Overlay.

@Christywl
Copy link
Contributor

I can reproduce the issue(instance issue) on Windows with nwjs-sdk-v0.24.0.

@zydrone
Copy link

zydrone commented Aug 10, 2017

Any news on in which release this bug is expected to be fixed?
Both the problem with the steam overlay (--in-process-gpu) and the fact that more than more than one instance can be started seems to be deal-breakers for anything game related targeting Windows 7.
Before I found this open issue, I had reproed in both 0.23.7 and 0.24.0 on Windows 7.

@TheRealDannyyy
Copy link
Author

TheRealDannyyy commented Sep 3, 2017

@Christywl @rogerwang Any updates about this, will this be fixed in the next major NW.js release?
This is an impactful problem for everything videogame related, since those require this chromium arg in order to run on platforms like Steam.

@rogerwang
Copy link
Member

@TheRealDannyyy could you please provide a version than can run in the Chromium browser?

@TheRealDannyyy
Copy link
Author

TheRealDannyyy commented Sep 4, 2017

@rogerwang HERE is the Chromeapp version of it.
(I'm not sure how to add chromium args to it so it's missing --in-process-gpu.)

@rogerwang
Copy link
Member

I just fixed the instance issue in git. Let's wait for the next 0.25 build and see how it works for the 2nd issue.

@TheRealDannyyy
Copy link
Author

Thanks, I hope this will be back-ported to all previous versions as well (if possible).
No worries about reproducing the 2nd issue, I will test it on my end and post my results.

@rogerwang
Copy link
Member

rogerwang commented Sep 18, 2017 via email

@TheRealDannyyy
Copy link
Author

TheRealDannyyy commented Sep 19, 2017

The issue within NW.js itself seems to be fixed (when starting it directly), however there is still a bug when NW.js is being launched through another program. It either takes up to 5min to start up or doesn't start at all and leaves ghost processes behind.

Not sure how I could help with debugging and finding out what goes wrong.

@zydrone
Copy link

zydrone commented Sep 19, 2017

@TheRealDannyyy sorry to hear that. Was just about to get excited when I saw the potential fix posted. Still, thanks @rogerwang for taking a stab at this. I hope it is still possible to fix somehow.

@rogerwang
Copy link
Member

The 2nd issue works now.

@icesunx
Copy link

icesunx commented Oct 16, 2017

Has this bug been fixed?I just try the build from https://dl.nwjs.io/live-build/10-16-2017/nw26-744df00-edf758a-6de1a29-61e38b8/v0.26.0/
and it seem reproduce the “3rd party "ghost process" issue” on my friend's computer(launch through Steam ). nw.js always worked fine on my computers(win7-64 and win10-64). But some people( they use win7-64 or win7-32) launch my app from Steam with the arg "--in-process-gpu" will get "ghost process"...

@TheRealDannyyy
Copy link
Author

TheRealDannyyy commented Oct 19, 2017

@rogerwang This is defiantly not fixed, neither issue 1 nor issue 2.
You can still reproduce issue 1 by simply spam-clicking on nw.exe using NW.js v0.26.0 on Windows 7.

I would like to request to open this issue again!

@rogerwang
Copy link
Member

did you see it in 0.25.4?

@rogerwang rogerwang reopened this Oct 19, 2017
@TheRealDannyyy
Copy link
Author

TheRealDannyyy commented Oct 19, 2017

I cannot reproduce issue 1 using NW.js v0.25.4 but I can reproduce issue 2.
Launching NW.js through 3rd party programs to be specific.

Honestly, just fixing/adding support for Steam features (#5871) without any additional chromium-args would be better in my opinion. That way we won't have to deal with in-process-gpu at all.

@rogerwang
Copy link
Member

@Christywl please verify. Last time I tried, 0.25.4 is working for me in both cases.

@TheRealDannyyy that's the incompatibility that the assumption stream made on the applications and the multi-process architecture of Chromium. And in-process mode is not something that every applications want.

@Christywl
Copy link
Contributor

Christywl commented Oct 23, 2017

nwjs-sdk-v0.26.0, it works fine on my Windows 10.
image
image

@icesunx
Copy link

icesunx commented Oct 24, 2017

I can use nwjs(juse unzip the file "nwjs-v0.25.4-win-ia32.zip") without app file to reproduce the "ghost process" issue in my friend's computer, so I think the problem is not related to app files.
I find that about 1/10 people who bought my game reproduce the issue(with nw 0.22.4, win7) . The leader of us didn't allow me to update nw before it solve the problem, so we just remove the arg "--in-process-gpu". Now they can play my game but without steam overlay.
Maybe you need to find a environment which reproduce the "ghost process" issue, because it can't be reproduce in every computer .
To test the issue in Steam, you can add a "non-steam game".
If you need a steam key of my game to test the issue, please give me your contact information(maybe e-mail), I'll give you one.

@rogerwang
Copy link
Member

I can reproduce the steam issue now with one of our systems. Will look for a fix soon.

@rogerwang
Copy link
Member

The root cause is actually not in NW. While I'm still searching for a workaround, could you please try this build in your system? https://dl.nwjs.io/live-build/10-21-2017/nw27-50e9d4d-af7e38e-266ada3-0be98a3/v0.27.0-canary/

@TheRealDannyyy
Copy link
Author

The root cause is actually not in NW. While I'm still searching for a workaround, could you please try this build in your system? https://dl.nwjs.io/live-build/10-21-2017/nw27-50e9d4d-af7e38e-266ada3-0be98a3/v0.27.0-canary/

@rogerwang Can confirm that both issues are fixed using that version.
Tested on Windows 7 (64bit), latest version of Steam.

@rogerwang
Copy link
Member

Good to know it. Now the plan is to resolve this in in the 0.27 beta, which will be released soon. Working around it in 0.26 would be much harder due to it's a race condition in software from 3rd party vendor.

@TheRealDannyyy
Copy link
Author

It's alright for me if this is not getting backported, as long as it works in future versions of NWjs.
Thanks for the fix and everyone that participated in solving this issue!

@rogerwang
Copy link
Member

Release candidate: https://dl.nwjs.io/live-build/11-29-2017/nw27-4a542eb-d157415-665d7cd-c0569cf/v0.27.0/

It will be updated again after upstream refreshes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants