CoroUtil

CoroUtil

24M Downloads

Race condition in config loading

malte0811 opened this issue ยท 1 comments

commented

This code can cause other mods' common configs to be dropped from configSets due to Forge's parallel mod loading:

  • Configs added during the for loop may be skipped/missed (the iteration is not synchronized). So they aren't added to setBackup, lost in the first clear and never re-added.
  • Configs added while loading the single config are lost in the second clear call.

I suspect that this is what causes BluSunrize/ImmersiveEngineering#5515. The code is only present on 1.18, not on 1.19, so I don't know what the third user in that issue is running into.

See also the discussion in the Forgecraft bug channel, I pinged you there at the end of the discussion (so far).

commented

Damn, I didn't account for the parallelism, yeah that would do it, change is now reverted, 1.2.44 pushed to curse and available pending their approval. Thanks for bringing this to my attention.