Crash on server startup
Insane96 opened this issue ยท 6 comments
The strange thing is that randomly happens. Sometimes it does, sometimes doesn't.
This happens randomly with Quark and Charm too.
Full log: https://gist.github.com/Insane96/b9467a66fb60a2e62f8318afae8ae3b6
Stacktrace:
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextNode(HashMap.java:1442)
at java.util.HashMap$ValueIterator.next(HashMap.java:1471)
at net.minecraftforge.common.BiomeDictionary.listSupertypes(BiomeDictionary.java:360)
at net.minecraftforge.common.BiomeDictionary.addTypes(BiomeDictionary.java:200)
at com.bagel.atmospheric.core.registry.AtmosphericBiomes.registerBiomesToDictionary(AtmosphericBiomes.java:71)
at com.bagel.atmospheric.core.Atmospheric.setup(Atmospheric.java:53)
at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:212)
at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:204)
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:258)
at net.minecraftforge.fml.javafmlmod.FMLModContainer.fireEvent(FMLModContainer.java:106)
at java.util.function.Consumer.lambda$andThen$0(Consumer.java:65)
at java.util.function.Consumer.lambda$andThen$0(Consumer.java:65)
at net.minecraftforge.fml.ModContainer.transitionState(ModContainer.java:112)
at net.minecraftforge.fml.ModList.lambda$null$10(ModList.java:134)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
It isn't, but I'll submit a pull request to fix this and some other concurrency issues once I'm more awake. I've noticed a few mods that need some tweaks there. Basically, you can't modify biome features, compostables, flammables, biome types, etc. without some sort of thread safety, such as Forge's DeferredWorkQueue (which forces them to be added in the main thread). The reason is that Forge does the common setup phase in parallel now, so multiple mods might be modifying things at the same time (and you won't get consistent results, since it changes every launch).
But like I said, I'm happy enough to fix it for you and submit that later on today or tomorrow.
Submitted a fix here: #25
I've just been sent a crash report by somebody else having the same issue on the client. Because it's a ConcurrentModificationException it'll be hard to reproduce.
This is their crash report with the relevant line highlighted: https://gist.github.com/Vaelzan/1da1665ce3fe616807f35a2864b18780#file-gistfile1-txt-L390