Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CME in universal cable recipe #8018

Closed
raoulvdberge opened this issue Mar 7, 2024 · 5 comments
Closed

CME in universal cable recipe #8018

raoulvdberge opened this issue Mar 7, 2024 · 5 comments

Comments

@raoulvdberge
Copy link

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)

@pupnewfster
Copy link
Member

pupnewfster commented Mar 7, 2024

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

@raoulvdberge
Copy link
Author

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.

@pupnewfster
Copy link
Member

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.

@Sandriell
Copy link

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

@Shadows-of-Fire
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants