Apotheosis

Apotheosis

70M Downloads

Putting any Redstone Arsenal tool into the reforging table causes a crash

Branjoman opened this issue ยท 12 comments

commented

When you try and put any Redstone Arsenal flux infused tool inside the reforging table, the game will crash to desktop. Note that the crash only occurs once the reforging options are displayed (or try to be displayed) i.e. when both the tool and the reforging material are placed inside the table.

Crash report: https://pastebin.com/HeKjBfvV

commented

Can you reproduce it after grinding them? Likely a problem about enchantments on them, I guess.

commented

When I was testing the tools had no enchantment on them, they were straight from the creative menu.

commented

I don't believe java 18 is a supported platform. You have to use java 17.

commented

I just tried downloading and changing to java 17, and the exact same crash occured, so the java version disparity isn't the issue here. Here's the new crash log when using java 17: https://pastebin.com/W656THSY

commented

Alright that's weird. This only happens with RA items? This crash shouldn't be unique to any particular item since it's a linkage error, though the source and target classloaders are the same. However this code path being invoked means an exception was thrown but eventbus is exploding trying to log the error (which is... not really my fault). I'll have to see if it's possible to debug the error somehow.

commented

So far I've only seen this happen with RA items, though I haven't done a full test of every tool present in the pack I'm playing (as that would take quite a while).

commented

I also have a try, and result is below.
1, only armors, axe, hammer, trident can be put into reforging table, others can't.
2, axe and hammer cause crash.

commented

On a related note, is the reforging table only accepting fluxed armour, axe, hammer, and trident normal/intended behaviour? I would expect that all the fluxed tools (except probably the elytra controller) can be reforged.

commented

We encountered this in FTB skies too. During debugging in a minimal setup (RA, apotheosis and a charging mod) it "seems" to be caused by a recursive call of related "getEnchantmentLevel" functions (roughly RA -> minecraft -> forge -> apotheosis's getEnchantmentLevelSpecific -> RA), leading to stack overflow which is not the same as normal game's crash report. Not sure why but for debugging and normal gameplay the behaviors are the same (powered RA sword crash, powered RA chestplate no crash)

commented

Do you have the stacktrace of the stack overflow? The one here has event bus swallowing the exception

commented

crash-2023-04-21_23.20.42-client.txt

For a quick overview this is one "cycle":

	at shadows.placebo.events.PlaceboEventFactory.getEnchantmentLevelSpecific(PlaceboEventFactory.java:31) ~[Placebo-1.19.2-7.1.7-dev.jar%23187!/:7.1.7] {re:mixin,re:classloading}
	at net.minecraftforge.common.extensions.IForgeItemStack.getEnchantmentLevel(IForgeItemStack.java:178) ~[forge-1.19.2-43.2.0_mapped_parchment_2022.10.09-1.19.2.jar%23179%23186!/:?] {re:mixin,xf:fml:placebo:placebo_get_ench_level_event_specific,xf:fml:placebo:placebo_get_ench_level_event,re:computing_frames,xf:fml:placebo:placebo_get_ench_level_event_specific,xf:fml:placebo:placebo_get_ench_level_event,re:classloading,xf:fml:placebo:placebo_get_ench_level_event_specific,xf:fml:placebo:placebo_get_ench_level_event,pl:mixin:APP:apotheosis.mixins.json:IForgeItemStackMixin,pl:mixin:A}
	at net.minecraft.world.item.enchantment.EnchantmentHelper.getItemEnchantmentLevel(EnchantmentHelper.java:65) ~[forge-1.19.2-43.2.0_mapped_parchment_2022.10.09-1.19.2.jar%23180!/:?] {re:mixin,re:classloading,pl:mixin:APP:apotheosis.mixins.json:EnchantmentHelperMixin,pl:mixin:A}
	at cofh.lib.util.Utils.getItemEnchantmentLevel(Utils.java:396) ~[cofh_core-1.19.2-10.2.1.40_mapped_parchment_2022.10.09-1.19.2.jar%23196!/:10.2.1] {re:classloading}
	at cofh.lib.api.item.IContainerItem.getMaxStored(IContainerItem.java:19) ~[cofh_core-1.19.2-10.2.1.40_mapped_parchment_2022.10.09-1.19.2.jar%23196!/:10.2.1] {re:classloading}
	at cofh.redstonearsenal.item.FluxSwordItem.getMaxEnergyStored(FluxSwordItem.java:182) ~[redstone_arsenal-1.19.2-7.2.0.15_mapped_parchment_2022.10.09-1.19.2.jar%23197!/:7.2.0.15] {re:classloading}
	at cofh.lib.api.item.IEnergyContainerItem.getEnergyStored(IEnergyContainerItem.java:44) ~[cofh_core-1.19.2-10.2.1.40_mapped_parchment_2022.10.09-1.19.2.jar%23196!/:10.2.1] {re:classloading}
	at cofh.redstonearsenal.item.IFluxItem.hasEnergy(IFluxItem.java:48) ~[redstone_arsenal-1.19.2-7.2.0.15_mapped_parchment_2022.10.09-1.19.2.jar%23197!/:7.2.0.15] {re:classloading}
	at cofh.redstonearsenal.item.IFluxItem.hasEnergy(IFluxItem.java:53) ~[redstone_arsenal-1.19.2-7.2.0.15_mapped_parchment_2022.10.09-1.19.2.jar%23197!/:7.2.0.15] {re:classloading}
	at cofh.redstonearsenal.item.FluxSwordItem.canPerformAction(FluxSwordItem.java:82) ~[redstone_arsenal-1.19.2-7.2.0.15_mapped_parchment_2022.10.09-1.19.2.jar%23197!/:7.2.0.15] {re:classloading}
	at net.minecraftforge.common.extensions.IForgeItemStack.canPerformAction(IForgeItemStack.java:117) ~[forge-1.19.2-43.2.0_mapped_parchment_2022.10.09-1.19.2.jar%23179%23186!/:?] {re:mixin,xf:fml:placebo:placebo_get_ench_level_event_specific,xf:fml:placebo:placebo_get_ench_level_event,re:computing_frames,xf:fml:placebo:placebo_get_ench_level_event_specific,xf:fml:placebo:placebo_get_ench_level_event,re:classloading,xf:fml:placebo:placebo_get_ench_level_event_specific,xf:fml:placebo:placebo_get_ench_level_event,pl:mixin:APP:apotheosis.mixins.json:IForgeItemStackMixin,pl:mixin:A}
	at shadows.apotheosis.adventure.loot.LootCategory.lambda$static$4(LootCategory.java:49) ~[%23185!/:?] {re:classloading}
	at shadows.apotheosis.adventure.loot.LootCategory.isValid(LootCategory.java:92) ~[%23185!/:?] {re:classloading}
	at shadows.apotheosis.adventure.loot.LootCategory.forItem(LootCategory.java:181) ~[%23185!/:?] {re:classloading}
	at shadows.apotheosis.adventure.affix.AttributeAffix.canApplyTo(AttributeAffix.java:88) ~[%23185!/:?] {re:classloading}
	at shadows.apotheosis.adventure.affix.AffixHelper.getAffixes(AffixHelper.java:77) ~[%23185!/:?] {re:mixin,re:classloading}
	at shadows.apotheosis.adventure.affix.AffixHelper.streamAffixes(AffixHelper.java:86) ~[%23185!/:?] {re:mixin,re:classloading}
	at shadows.apotheosis.adventure.AdventureEvents.enchLevels(AdventureEvents.java:412) ~[%23185!/:?] {re:classloading}
	at shadows.apotheosis.adventure.__AdventureEvents_enchLevels_GetEnchantmentLevelEvent.invoke(.dynamic) ~[%23185!/:?] {re:classloading,pl:eventbus:B}
	at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:73) ~[eventbus-6.0.3.jar%23102!/:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) ~[eventbus-6.0.3.jar%23102!/:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) ~[eventbus-6.0.3.jar%23102!/:?] {}
	at shadows.placebo.events.PlaceboEventFactory.getEnchantmentLevelSpecific(PlaceboEventFactory.java:31) ~[Placebo-1.19.2-7.1.7-dev.jar%23187!/:7.1.7] {re:mixin,re:classloading}
commented

Should be resolved in 6.2.0