Resolution: Cannot Reproduce
Affects Version/s: Minecraft 1.11.2, Minecraft 1.12, Minecraft 1.13.1
Fix Version/s: None
Environment:Windows 10, on a hard drive encrypted with SecureDoc data-at-rest encryption software
This crash occurs whenever the game auto-saves.
Steps to reproduce:
- Have your .minecraft folder pointed at a drive encrypted with SecureDoc. In my case, the .minecraft folder was in its usual place on the C drive, and that drive was the one encrypted.
- Open the game, and load a singleplayer world.
- Soon after starting a world, it will attempt to auto-save – and will crash.
- Or, you could press the Esc key (attempting to get the Options screen), and it will crash at that point as well.
- This happens in the net.minecraft.stats.StatisticsManagerServer.saveStatFile() method. (using MCP 9.37 naming).
- It's a NoSuchMethodError This means that while org.apache.commons.io.FileUtils.writeStringToFile(Ljava/io/File;Ljava/lang/String;) was available at compile time, it's not available at runtime in this case. Given that this environment has a full-disk-encryption suite on it, it kinda makes sense that it would be choking off access to FileUtils.
- Importantly, this is the only usage of that writeStringToFile method in the whole game, as evidenced in MCP 9.37.
- Other file-writes use different methods, and do succeed before and after this one fails: player data, and the crash report.
Notably this issue does depend on some external software messing with the system, and I understand often that takes it out of the developer's hands, but naively I can think of ways to remedy this, and I leave it to those who know better whether they are reasonable or not.
- Attempt another way to write the stats file: avoid that writeStringToFile method, and opt for something else, like whatever's used to write the crash report or the player data.
- Silently fail to write the stats file: There is already a catch block for an IOException, so adding a catch block for the NoSuchMethodError would silently prevent the crash.
On this same machine, with the same disk encryption software, using the old launcher, I used to encounter
MCL-1274, which was this same NoSuchMethodError, also not finding org.apache.commons.io.FileUtils.writeStringToFile.