-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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 v0.14.0-rc3 only starting as hidden processes after running once #4674
Comments
What exactly was changed? |
I did some more testing and it appears that sometimes the nw.exe continues to run as a background process when X is used to close the nw window. It is possible that the saved data might not be the cause of this bug report. I'm doing some more testing and will post my results here. |
OK, I've been able to reduce my game so that I can provide you with a copy of the package.nw that repeatedly reproduces the bug on my machine. After the first run, the app closes down correctly, but it does not restart unless the User/Local/AppData/App folder has ben deleted from the previous run (it does start nw.exe background processes though). The runtime script is minified so I hope it doesn't prevent you from identifying the problem. Please use this link https://dl.dropboxusercontent.com/u/184657779/nwjs%20bug/nw_bug_PackageNW.zip to download the package.nw (2 Mb). If you wish to check the whole app, in case it's a download error etc, then you can download the complete export using this link https://dl.dropboxusercontent.com/u/184657779/nwjs%20bug/nw_Bug_Whole.zip (47 Mb - construct 2 export). I'll leave these links up for a couple of days and then remove them. I hope this helps!! |
I didn't reproduce the issue you described. But it crashed with the debug version. I'll fix it and see if it makes difference for you. |
This should be caused by a bug in nw.App.clearCache() where it hangs the app. |
Cool. I'm ready to test at any time to confirm the fix. Cheers. |
Unfortunately that appears to have not fixed the problem... I have created a more robust package.nw file that hopefully will let you reproduce the bug this time.https://dl.dropboxusercontent.com/u/184657779/nwjs%20bug/packageNW_v2.zip. I did some more testing and found that if I run win32 export then the bug consistently occurs as described above - the game runs first time, thereafter it only opens into a background nw.exe process (and the only way to get it to run again is to delete the user/appdata/game folder). However, if I run the win64 version the bug never occurs and then if I then run the win32 export the bug never occurs and the win32 can repeatedly run correctly (ie something in the win64 cache process is negating the bug in the win32 export). |
Is this bug in 0.13 nightly build? http://dl.nwjs.io/live-build/04-10-2016/723bab6-897a464-c2a3dcf-65b297d |
And with win32 version, the first time you run it well and after quitting the game, does all 'nw.exe' process end successfully? Is there any process left in the system? It might be stalling the 2nd run by a lock file in the user data dir |
Using the nightly build 0.13 from your link above, the bug does not exist - I can open and close correctly multiple times.
Yes. All processes appear to close correctly with no background nw.exe processes after the first run of the game. On 2nd+ runs I see a brief glimpse of a nw.exe window but that disappears and then multiple nw.exe processes run (usually 2 or 3 with one of them using up 30% cpu). Closing them and trying to run the nw.exe again results in the same unless the appdata folder is cleared. |
What's your OS version? Can you send me a copy of the buggy user data dir after the first run? |
Sure thing. Here's the user data file after a first run - https://dl.dropboxusercontent.com/u/184657779/nwjs%20bug/nwjsstarthiddenbug.zip. I noted a bug file inside the win32 folder - this only happened occasionally during my tests (I just noticed it and, after removing the file, it didn't happen again); it contained:
My system details: Windows 10 Pro |
It starts well here with the data on a win10. Could you follow the steps here and send me the log ? https://www.chromium.org/for-testers/enable-logging |
I might not be doing this correctly, but I think this is right.... I added |
Thanks. Could you please run it again with argument: '--trace-startup --trace-startup-file=C:\trace.json --trace-startup-duration=7' and send the trace.json file? Note that it'd be better to add this to the command line argument when you launch the exe from console. |
I'm a bit of an amateur at this.... How do I run from command line - is there a set of steps I can follow or can I get away with putting that command in the package.json? Thanks. |
|
I can run the app using cmd prompt but the step 5 does not cause a .json file to be saved anywhere on the C: drive. So I started nw.exe and debugged it with visual studio (this was also new to me) and obtained the following from Debug - I hope this is of use, if not, please let me know what to try next (or an alternative way to run internal debug logging). https://dl.dropboxusercontent.com/u/184657779/nwjs%20bug/nw_debug_vs_output.txt |
I try to reproduce this issue, but the sample links are '404'. Could you please upload a sample again? |
If an image asset is changed and then nw.js is started again, nw.js does not appear to run; although it opens in a number of background processes, the app window does not display. The fix is to delete the nwjs and app folders in User/AppData. This was produced using the win32 version of the nightly.
The text was updated successfully, but these errors were encountered: