Mekanism Tools

Mekanism Tools

77M Downloads

CME in universal cable recipe

raoulvdberge opened this issue ยท 5 comments

commented

Issue description

Caused by: java.util.ConcurrentModificationException
	at java.util.HashMap.computeIfAbsent(HashMap.java:1221) ~[?:?]
	at mekanism.common.block.attribute.AttributeTier.getPassthroughType(AttributeTier.java:16) ~[Mekanism-1.20.1-10.4.2.16.jar%23764!/:10.4.2]
	at mekanism.common.block.transmitter.BlockUniversalCable.getType(BlockUniversalCable.java:29) ~[Mekanism-1.20.1-10.4.2.16.jar%23764!/:10.4.2]
	at mekanism.common.block.attribute.Attribute.has(Attribute.java:31) ~[Mekanism-1.20.1-10.4.2.16.jar%23764!/:10.4.2]
	at mekanism.common.item.block.ItemBlockMekanism.exposesEnergyCap(ItemBlockMekanism.java:114) ~[Mekanism-1.20.1-10.4.2.16.jar%23764!/:10.4.2]
	at mekanism.common.item.block.ItemBlockMekanism.areCapabilityConfigsLoaded(ItemBlockMekanism.java:118) ~[Mekanism-1.20.1-10.4.2.16.jar%23764!/:10.4.2]
	at mekanism.common.item.block.ItemBlockMekanism.initCapabilities(ItemBlockMekanism.java:126) ~[Mekanism-1.20.1-10.4.2.16.jar%23764!/:10.4.2]
	at net.minecraft.world.item.ItemStack.lambda$forgeInit$10(ItemStack.java:992) ~[client-1.20.1-20230612.114412-srg.jar%23918!/:?]
	at net.minecraftforge.common.capabilities.CapabilityProvider.getCapabilities(CapabilityProvider.java:87) ~[forge-1.20.1-47.1.3-universal.jar%23923!/:?]
	at net.minecraftforge.common.capabilities.CapabilityProvider.getCapability(CapabilityProvider.java:182) ~[forge-1.20.1-47.1.3-universal.jar%23923!/:?]
	at net.minecraftforge.common.capabilities.ICapabilityProvider.getCapability(ICapabilityProvider.java:33) ~[forge-1.20.1-47.1.3-universal.jar%23923!/:?]
	at com.enderio.base.common.recipe.ShapedEntityStorageRecipe.getInputEntityStorage(ShapedEntityStorageRecipe.java:61) ~[EnderIO-1.20.1-6.0.21-alpha.jar%23659!/:6.0.21-alpha]
	at com.enderio.base.common.recipe.ShapedEntityStorageRecipe.m_5818_(ShapedEntityStorageRecipe.java:54) ~[EnderIO-1.20.1-6.0.21-alpha.jar%23659!/:6.0.21-alpha]
	at com.enderio.base.common.recipe.ShapedEntityStorageRecipe.m_5818_(ShapedEntityStorageRecipe.java:24) ~[EnderIO-1.20.1-6.0.21-alpha.jar%23659!/:6.0.21-alpha]
	at dev.shadowsoffire.fastsuite.AuxRecipeManager.lambda$getRecipeFor$0(AuxRecipeManager.java:45) ~[FastSuite-1.20.1-5.0.1.jar%23681!/:5.0.1]
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:178) ~[?:?]
	at java.util.HashMap$ValueSpliterator.tryAdvance(HashMap.java:1800) ~[?:?]
	at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129) ~[?:?]
	at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527) ~[?:?]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513) ~[?:?]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
	at java.util.stream.FindOps$FindTask.doLeaf(FindOps.java:319) ~[?:?]
	at java.util.stream.AbstractShortCircuitTask.compute(AbstractShortCircuitTask.java:115) ~[?:?]
	at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754) ~[?:?]
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?]
	at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?]
	at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?]
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?]
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?]

This appears to cause the issue where Mekanism patterns disappear from Refined Storage crafters.

(I'm not 100% sure about above statement since we had a lot of people complaining Mekanism crafting patterns disappear but could never provide us with logs - this is the first instance we had of such a log - FYI)

Steps to reproduce

Not exactly sure. See linked issue:

Minecraft version

1.20.1 or earlier (No longer being developed)

NeoForge version

Not sure - re-reporting for user

Mekanism version

Older

Other relevant versions

The issue is not for 1.20.4, sorry about that, but we only got 1 log for 1.20.1.
The issue might still be present in 1.20.4.

If a (crash)log is relevant for this issue, link it here: (It's almost always relevant)

Edivad99/ExtraStorage#72 (comment)

commented

I have a feeling this is related to fastsuite and if I had to guess multithreaded recipes being enabled?

That being said how capabilities are initialized is different in 1.20.4 so this might not be a problem, though I will leave it open for now as a reminder that it is probably worth looking at this TODO so that it isn't required

commented

Yes, sorry, I only pasted a portion of the crashlog in this issue report and forgot to include fastsuite part.
Original crash here: Edivad99/ExtraStorage#72 (comment)

Could definitely be related to fastsuite, indeed.

commented

Yeah, my suggestion would be to try without fastsuite (or if they have a config option, try disabling multithreaded recipes). As vanilla is single threaded for how it checks for recipe matches, so while I will try to look at for 1.20.4 and forward addressing a TODO in our codebase that should hopefully as a side effect make that not be a problem... it isn't necessarily something that is "urgent" in regards to supporting mods that turn things that vanilla does single threaded into being multithreaded.

commented

FYI: This was previously reported to FastSuite: Shadows-of-Fire/FastSuite#30

commented

FS's granularity for disabling threading is currently limited to per-recipe-type rules, which unfortunately means to get around stateful crafting recipes users have to disable threading for the entire crafting recipe type. I've been trying to get recipe authors to ensure their recipes are stateless whenever issues are encountered, but I probably just need to implement Shadows-of-Fire/FastSuite#27 for compatibility reasons.