- Build: 101.101.39515.0
- Platform: Steam
- Operating System: Windows 10
I haven’t played the game in a few weeks. Today, when trying to launch the game, it got stuck in the splash screen while using a constant ~12% of CPU and a sparing amount of disk IO.
- Launching from the Desktop or Start Menu shortcuts
- Launching from Steam
- Run as administrator (cough), including running steam as administrator first, then launch the game from there
- Removing game folder (C:\Users<USERNAME>\Games\Age of Empires 2 DE)
- Verifying integrity of game files in Steam
- Uninstalling and re-installing the game from Steam, with or without the graphics pack DLC
None of these makes a difference.
The game remains stuck in the splash screen. I suppose it is possible that it will eventually be able get past that, but I have waited 10-20 minutes and it still wasn’t done launching.
Eventually, I got fed up with it. Being a developer myself I decided to dig in a little and observe what the game is doing that is taking so long.
First, I used Process Explorer to gather a stack trace of the active thread. It was actively spending time making IO-related system calls (reading/writing/stat-ing files and directories, etc).
Then, I used Process Monitor to investigate what files it was reading.
To my surprise, it was spending those CPU cycle and disk IO going through my personal files that the game absolutely should be accessing!
As far as I can tell, it was crawling through my entire drive indiscriminately. It just so happens that I recently cloned a Node.js project on this machine. Node.js projects tends to have a ton of small random files due to their node_modules structure. The game happened to have found its way there and got “stuck” churning through a ton of files. It is probably not much of an exaggeration to say it was behaving like a virus at this point.
After moving the project into Recycling Bin, I tried launching the game again. This time, it got stuck similarly but in the system temp folder (C:\Users<USERNAME>\AppData\Local\Temp), which is also very big for related reasons (it’s common for Node.js tools like yarn to put their cache files at that location).
After removing (almost) everything in that folder, the issue is “fixed” and the game finally launches in a reasonable amount of time.
Needless to say, I am not pleased. Fortunately this is a Shadow VM that doesn’t have a lot of sensitive or personal files on it, but still. WTF.
I am not going to assume malicious intent by the developers. Bug happens and I understand it. But this is not cool and please be a lot more careful going forward. Please look into putting in some safeguards to actively avoid this (accessing files the game should not be touching) going forward.
Here are some potentially related details and hypothesis of what happened:
Since the last time I played the game, I enabled developer mode for Windows. Among other things, it enables Symbolic Links.
I noticed the game creates some files in the system temp folder, the same one that has lots of files (yarn cache, etc) and possibly symlinks into other places. Perhaps there is a bug (perhaps an extra “…” in a path somewhere) that causes it to traverse the entire temp folder, following symlinks and upwards.
I hope this is not the case but perhaps the game uses some very aggressive anti-cheat or DRM that purposefully scans all the files on disk.
I hope we will get a response from the developers on this as this is quite alarming, especially when some of the most common suggest for “fixing” problems like this is “Run as Administrator” (I did it out of desperation and knowing that this is a dedicated gaming VM, but please don’t do it, it won’t fix this issue and just increases your exposure).