BadOptimizations

BadOptimizations

18M Downloads

BadOptimizations causes persistent crashes due to overwriting "enable_sky_color_caching" config line in badoptimizations.txt

ryanxjacques opened this issue ยท 5 comments

commented

Problem

When I first installed this mod, it worked fine. However, subsequent attempts to open Minecraft resulted in the following error from latest.log:

[20:33:52] [main/ERROR]: Failed to load config from C:\Users\ryanw\AppData\Roaming\.minecraft\config\badoptimizations.txt. If you need to, you can delete the file to generate a new one.
java.lang.IllegalStateException: Config option enable_sky_color_caching not found.

After inspecting the badoptimizations.txt file, I noticed that the enable_sky_color_caching statement was truncated weirdly and probably broke the formatting and subsequent ingestion of the file on startup.

# Whether the sky's color should be cached unless you're on a biome border.
enable_sky_color_cachinalse

If I fix the formatting, I cannot reproduce the crash!

# Whether the sky's color should be cached unless you're on a biome border.
enable_sky_color_caching : false
# now this works well :)

However, even after the manual intervention, all subsequent launches will crash with the same error.

Quick Fix

Changing permissions to Read-Only fixed the invalid writing.

commented

Still present in 2.2.3

Image

Image

snippet.log

commented

Weird that's it's specifically enable_sky_color_caching, it's the same as all the others:
Image

commented

Though Java string blocks always have weird indentation, so I may just move it to a file in the jar

commented

Been juggling like 3 side projects, sorry. Will do when 1.21.6 is out.

commented

Probably fixed in 2.2.3