Is there a solution to the issue with hanging nwjs processes in test play?

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
4,969
Reaction score
4,552
First Language
English
Primarily Uses
RMMZ
This happened with MV as well. Intermittently (though more often than not), after exiting a game in test play, an nwjs process is left behind that uses up all my CPU cycles. Has anyone else experienced this or found a solution to it?1642594422810.png

I used to think it was to do with closing it via the "X" button in the menu bar rather than exiting the game via menu, but it happens even if I go the menu route.
 

Shaden

Phoenix of darkness.
Veteran
Joined
Sep 4, 2019
Messages
173
Reaction score
137
First Language
French
Primarily Uses
RMMV
This happened with MV as well. Intermittently (though more often than not), after exiting a game in test play, an nwjs process is left behind that uses up all my CPU cycles. Has anyone else experienced this or found a solution to it?
Just opened taskmgr and no. Tho I do recall seeing the process persisting after closing a playtest. I think the process ends up closing itself just later on (maybe few seconds/minutes after).

EDIT : Tho if it persists on your side, you could always try to check the proprieties of the process and what not. If you're on Windows, install the program Sysinternals Process Explorer from Microsoft, it'll allows you to see way more details about every process active on your computer.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
4,969
Reaction score
4,552
First Language
English
Primarily Uses
RMMZ
Just opened taskmgr and no. Tho I do recall seeing the process persisting after closing a playtest. I think the process ends up closing itself just later on (maybe few seconds/minutes after).
Mine doesn't. It stays there until I manually end it. I've occasionally forgotten to check task manager and had rogue processes last for days, wondering why my PC is performing badly until I remember. :p
 

Shaden

Phoenix of darkness.
Veteran
Joined
Sep 4, 2019
Messages
173
Reaction score
137
First Language
French
Primarily Uses
RMMV
What version of NWJS do you use ?

I seem to use 0.29.4

It might be due to a plugin in your project, or the version of NWJS, or something like this. Anyway it doesn't persist as a process on my side when I close a playtest.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
4,969
Reaction score
4,552
First Language
English
Primarily Uses
RMMZ
1642594788648.png
This didn't really help my understanding. XD

It happens in a blank project with no plugins, using MZ 1.4.3.
 

Shaden

Phoenix of darkness.
Veteran
Joined
Sep 4, 2019
Messages
173
Reaction score
137
First Language
French
Primarily Uses
RMMV
Try to type this on the console: console.log(process.versions);

Also if you right-click a process, you can see the proprieties. You can see what the process is doing there.1642594985350.png

If you use a newer version of NWJS, it might have to do with your game not closing properly, thus leaving a process of NWJS behind.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
4,969
Reaction score
4,552
First Language
English
Primarily Uses
RMMZ
I've figured it out. It happens if you close test play with the developer console open (which opens automatically on boot with VisuStella Core Engine with one of the parameters, which explains why I was seeing it so often). It should stop happening if I remember to always close the console first before the test play window.
 

Shaden

Phoenix of darkness.
Veteran
Joined
Sep 4, 2019
Messages
173
Reaction score
137
First Language
French
Primarily Uses
RMMV
I've figured it out. It happens if you close test play with the developer console open (which happens automatically with VisuStella Core Engine with one of the parameters, which explains why I was seeing it so often). It should stop happening if I remember to always close the console first before the test play window.
Oh alright ahah. Now that you mention this, I think it might happen on my side if I leave the Super Tool Engine window of SRD opened while playtest. Tho the console of the game (the basic one) doesn't make a process persist if I close the playtest while letting it open, it just closes with it, without leaving something behind.

Anyway glad you figured out. It probably mean that the window of your plugin doesn't close itself afterwards if the game is closed (if it's related to VisuStella).
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
4,969
Reaction score
4,552
First Language
English
Primarily Uses
RMMZ
Oh alright ahah. Now that you mention this, I think it might happen on my side if I leave the Super Tool Engine window of SRD opened while playtest. Tho the console of the game (the basic one) doesn't make a process persist if I close the playtest while letting it open, it just closes with it, without leaving something behind.

Anyway glad you figured out. It probably mean that the window of your plugin doesn't close itself afterwards if the game is closed (if it's related to VisuStella).
It's not specifically related to VisuStella, I was just seeing it often because I always had the console automatically opening on boot. If I open the console manually with no plugins, it happens then as well.
 

Shaden

Phoenix of darkness.
Veteran
Joined
Sep 4, 2019
Messages
173
Reaction score
137
First Language
French
Primarily Uses
RMMV
It's not specifically related to VisuStella, I was just seeing it often because I always had the console automatically opening on boot. If I open the console manually with no plugins, it happens then as well.
Maybe it has to do with NWJS or MZ. I'm on MV, and I can't reproduce this issue if I close the game without closing the console beforehand. The console closes with the game and its process also closes.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
4,969
Reaction score
4,552
First Language
English
Primarily Uses
RMMZ
Maybe it has to do with NWJS or MZ. I'm on MV, and I can't reproduce this issue if I close the game without closing the console beforehand. The console closes with the game and its process also closes.
Interestingly I can no longer replicate it on MV, so maybe the cause of it happening there was something else.

Ah well, I've figured out why it's happening in MZ so I know how to avoid it now.
 

Htlaets

Veteran
Veteran
Joined
Feb 1, 2017
Messages
321
Reaction score
174
First Language
English
Primarily Uses
Yeah, this happened to me both in MZ and MV too. Good finding the reason it's happening, though.
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
3,514
Reaction score
2,643
First Language
EN
Primarily Uses
RMMZ
I've noticed this occasionally as well. However, leaving the console open when closing the playtest window (even if the editor has been closed before doing so) is not sufficient to reproduce the problem for me, with or without the VisuStella MZ library.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
4,969
Reaction score
4,552
First Language
English
Primarily Uses
RMMZ
I've noticed this occasionally as well. However, leaving the console open when closing the playtest window (even if the editor has been closed before doing so) is not sufficient to reproduce the problem for me, with or without the VisuStella MZ library.
Hmm, interesting. On my end at least, 100% of the reproducible occurrences have had the console open when I closed the game window, so I can't see it being anything else in my case.
 

Latest Threads

Latest Posts

Latest Profile Posts

Come join us for 2 more hours of the fabulous Kindred Novel by BirdBunch! We had a lot of fun yesterday and look forward to exploring more of this compelling game :LZSjoy:
steamdemo_scr.png

I am happy to announce that a date for the release of the demo on Steam has been decided: On may 26th at 18:00 GMT, the demo will be available for download! One week later, on april 21st, the demo will also be available on other platforms such as Itch.io and other supported platforms.
Cool.png
"Young boy... I can tell that you've been feeling lonely for years. Blow this candle, make a wish, and you'll make a lot of friends." - Someone to Wish (IMAGINE: Roleplay Club)
I think after I get this game done, I'm going to take a long vacation from game development. It feels great to see the coding skills get better and it is fun - but god it is also so exhausting.
Just advertising that I released version 0.9 of my game yesterday, for feedback purposes. My first game or creative endeavor ever :D Would be cool if someone tries it out!

Forum statistics

Threads
121,975
Messages
1,145,598
Members
160,254
Latest member
Ucojugetsu
Top