Why is Screeps Steam client leaving gigabytes of trash in Temp?



  • I've noticed that the Steam client is leaving lots and lots of temporary folders named nw2772_25710 and similar in windows Temp (normally C:\Users\<user>\AppData\Local\Temp) folder. Each folder contains nwjs executables and libraries, however, none of them appear to be launched by the actual Screeps client. Each folder weighs at about 26 to 28MiB, however, Screeps client appears to be generating a new unique folder every time you launch it, and never cleans up the mess after itself. This means that after a couple of days playing Screeps the Temp folder grows to a gigabyte or sometimes more!

    I am aware gigabyte of itself doesn't sound like a lot, however, this is a temp on system drive, and many of us have relatively small system SSD drives, which are a fair bit more expensive per gigabyte than HDD storage. And in the end it unnecessarily litters the drive with files that are being only used once. Not everyone of us monitors their Temp folder and if you are to check it now, you might be up for a pretty nasty surprise.

    Anyways, a question to the developers: why is this happening, and can it be rectified? Can't the client just use one folder for its temp trash and, maybe, be nice enough to clean up after itself?



  • No such files or folders in my windows\Temp folder. Using Windows 10 and the steam client.



  • These are in C:\Users\<user>\AppData\Local\Temp. Clarified that in the main post too.



  • Wow @Orlet I just took a look and I have about 3gb of these folders in the temp folder. As you said, I'm using an SSD on that drive and 3gb is fairly substantial considering. Windows 7, for the record, it it matters.

    Thanks for the heads up, clearing it out now.


  • Dev Team

    @orlet does it crash for you often? As far as I can see the client indeed is 'nice enough to clean up after itself' on normal shutdown (just checked it). As for leaving temp files on crashes, it's a known issue of the nw.js engine.



  • @o4kapuk That issue looks like it was fixed in nw.js 0.26.4. Would it be possible to get Screeps updated for it?



  • @o4kapuk said in Why is Screeps Steam client leaving gigabytes of trash in Temp?:

    @orlet does it crash for you often? As far as I can see the client indeed is 'nice enough to clean up after itself' on normal shutdown (just checked it). As for leaving temp files on crashes, it's a known issue of the nw.js engine.

    Nope, it doesn't crash often, if at all.

    The client has generated 11 new folders since I posted this thread. And I haven't been actually relaunching the client much. But it's about equal to 1 new folder per every new launch of the client. All of the exits were clean as far as I saw, i.e. I closed the client via the X button.



  • @manvsrice Windows 7 here too. And another friend has also confirmed this happening on their system as well, Windows 7. Could it be Win7-specific behaviour? Nvm.



  • Windows 10 here and I have 36 of these folders, taking up ~300MB of space