Repurposed Structures (Neoforge/Forge)

Repurposed Structures (Neoforge/Forge)

66M Downloads

1.20.1 - ConcurrentModificationException on feature placement due to another mod changing processor list

Lyuu17 opened this issue ยท 3 comments

commented

Description: Feature placement
java.util.ConcurrentModificationException
	at java.base/java.util.ArrayList$Itr.checkForComodification(ArrayList.java:1013)
	at java.base/java.util.ArrayList$Itr.next(ArrayList.java:967)
	at knot//net.minecraft.class_3499.method_16446(class_3499.java:380)
	at knot//net.minecraft.class_3499.method_15172(class_3499.java:225)
	at knot//com.telepathicgrunt.repurposedstructures.world.features.NbtFeature.method_13151(NbtFeature.java:98)

Full crash log: https://gist.github.com/Lyuu17/6f50c850a8e845c588a5e8630147bf2c

commented
java.util.ConcurrentModificationException
	at java.base/java.util.ArrayList$Itr.checkForComodification(ArrayList.java:1013)
	at java.base/java.util.ArrayList$Itr.next(ArrayList.java:967)
	at knot//net.minecraft.structure.StructureTemplate.process(StructureTemplate.java:380)
	at knot//net.minecraft.structure.StructureTemplate.place(StructureTemplate.java:225)
	at knot//com.telepathicgrunt.repurposedstructures.world.features.NbtFeature.generate(NbtFeature.java:98)

So the crash is not in my code. It is actually in vanilla's code for when the structure nbt file is being placed into the world. Now, despite it looking like it is because I called this code, vanilla also calls this same code and places structure
nbt files in world during worldgen when generating structures (or fossil features). Because of the vanilla examples, my code is doing exactly what vanilla does.

This means if say, you remove my mod, it is likely you would eventually get this same exact crash with only vanilla code.

HOWEVER, the code that is crashing, I think is the processor list loop here:

Image

And this list should never be changing at runtime. Which makes me believe another mod is doing unsafe modifications of the processor list. Why? I too, would like to know lol.

Can you export your modding profile so I can download the whole thing with all the mods? Would make it easier for me to export the modified vanilla class and see what mod has added mixins to the class.

commented

And this list should never be changing at runtime. Which makes me believe another mod is doing unsafe modifications of the processor list. Why? I too, would like to know lol.

Can you export your modding profile so I can download the whole thing with all the mods? Would make it easier for me to export the modified vanilla class and see what mod has added mixins to the class.

here: https://drive.google.com/file/d/1kH23kg5UXbR98Zw6aD5-08seA5bpMwlu/view?usp=drive_link

thank you for your effort

commented

I haven't been able to reproduce the issue or find what mod could be doing the issue, sorry.

I do feel it is another mod doing unsafe modifications at runtime to a list but no way to track down who without huge amounts of effort involved