Repurposed Structures (Neoforge/Forge)

Repurposed Structures (Neoforge/Forge)

58M Downloads

Mod Causing Exception caught during firing event: null

dreckz opened this issue ยท 5 comments

commented

MC: 1.15.2
Forge: 31.1.25
Mod version: 1.0.0

Upon loading up the mod, it has an error attempting to load. This is the block of info found in my log:
[23:04:35] [modloading-worker-10/ERROR]: Exception caught during firing event: null
Index: 1
Listeners:
0: NORMAL
1: net.minecraftforge.eventbus.EventBus$$Lambda$2117/346807870@6c4b6276
java.util.ConcurrentModificationException
at java.util.ArrayList.removeIf(ArrayList.java:1411)
at com.telepathicgrunt.repurposedstructures.RSAddFeatures.addStronghold(RSAddFeatures.java:305)
at com.telepathicgrunt.repurposedstructures.RepurposedStructures.setup(RepurposedStructures.java:54)
at com.telepathicgrunt.repurposedstructures.RepurposedStructures$$Lambda$3345/1310012246.accept(Unknown Source)
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$$Lambda$2117/346807870.invoke(Unknown Source)
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:258)
at net.minecraftforge.fml.javafmlmod.FMLModContainer.fireEvent(FMLModContainer.java:106)
at net.minecraftforge.fml.javafmlmod.FMLModContainer$$Lambda$2233/1599909541.accept(Unknown Source)
at java.util.function.Consumer.lambda$andThen$14(Consumer.java:65)
at java.util.function.Consumer$$Lambda$2222/781593836.accept(Unknown Source)
at java.util.function.Consumer.lambda$andThen$14(Consumer.java:65)
at java.util.function.Consumer$$Lambda$2222/781593836.accept(Unknown Source)
at net.minecraftforge.fml.ModContainer.transitionState(ModContainer.java:112)
at net.minecraftforge.fml.ModList.lambda$null$10(ModList.java:134)
at net.minecraftforge.fml.ModList$$Lambda$2577/2143163510.accept(Unknown Source)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512)
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:1689)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

Mod is used with many other mods that worked together before adding this one.
Log:
latest.log

commented

Also having this issue.

You need to wrap any code that modifies biome feature lists in a DeferredWorkQueue.runLater, as it is not thread safe.

commented

Oof. Yeah I screwed up lol. @Shadows-of-Fire Thank you for telling me about DeferredWorkQueue.runLater! I added it in and now I just need either you or @dreckz to test v1.0.1b to see if the crash is indeed resolved. Or if either of you know which mod is causing my mod to crash, I can then check it myself to make sure the patch is working before releasing it on CurseForge.

repurposedstructures-1.15.2-1.0.1b.zip

Thank you for reporting this crash!

commented

Awesome thank you! v1.1.0 is now released and approved on CurseForge with this patch and new Well variants. I'll close this issue now.

commented

No mod in particular is causing yours to crash, it just happens that both you and another mod are unsafely adding features to biomes, and sometimes, due to thread scheduling, both of you do it at once, which causes a CME.

commented

As for this jar, it does appear to adequately fix the problem, but I'll report back if it happens again.