[0.4.14] Sophisticated Backpacks & Tetra interactions causing crashes
SlyCedix opened this issue · 9 comments
Modpack version
0.4.14
Describe the bug
Whenever a tetra tool interacts with a sophisticated backpack upgrade, the game crashes immediately. Specifically, I've had the game crash when the tool was accidentally shift clicked into a filter slot for an upgrade, and when the pickup upgrade placed a dropped tool in the backpack.
Logs
These two were caused by accidentally shift clicking the tool into a filter for an upgrade
crash-2021-05-31_01.57.24-server.txt
crash-2021-05-31_01.45.08-server.txt
This one was caused by the pickup upgrade placing a dropped tool into the backpack
crash-2021-05-31_20.03.36-server.txt
These two were caused when trying to reopen the world after the game crashed from the dropped tool pickup, I will have to NBT edit the tool out of the backpack
crash-2021-05-31_20.08.03-server.txt
crash-2021-05-31_20.17.12-server.txt
Tested some more, it would appear that the minimum set of mods are as follows:
Botania
Sophisticated Backpacks
Tetra
Curios (Botania dependency)
Patchouli (Botania dependency)
mgui (Tetra dependency)
This is the crash report from that minimal setup:
crash-2021-05-31_22.13.15-server.txt
Exact steps taken:
Equip diamond backpack into curios slotThis step is not necessary- Place advanced compacting upgrade into backpack upgrade slot
- Enable GUI mode on compacting upgrade
- Close the compacting upgrade configuration panel
- Place tetra tool into backpack slot (I used a default wooden hammer)
Alternatively, you can trigger a similar crash by simply placing the tetra tool into one of the filter slots for the compacting upgrade instead of doing the last 3 steps.
Thanks for the detailed report, nice work!
@P3pp3rF1y I have an interesting compat bug for you ^ 😄
Was able to access the world again by NBT editing all of the upgrades off the backpack, based on the crash report, I believe the culprit was specifically the compacting upgrade.
Also, the pickaxe was duplicated every time the game crashed, I now have three pickaxes in the backpack, and one in my
inventory from after I NBT edited out the upgrades.
Tested with just the pickup upgrade and no crash occurred.
Looking at this it looks like something is adding code in isEnchanted method of ItemStack and that code fails for some reason when Botania's Spell cloth tries to find out if the tetra tool is enchanted.
Based on at net.minecraft.item.ItemStack.handler$zza000$isEnchanted(ItemStack.java:1093) ~[?:?] {re:mixin,re:classloading,xf:fml:forge:filled_map.4,xf:fml:forge:itemstack,pl:mixin:APP:tetra.mixins.json:MixinItemStack,pl:mixin:A}
tetra actually adds something in there, but I can't find the code for that mixin anywhere, probably because I don't use mixins so don't know of all the places where they could be found.
There's also issue open on Tetra tracker for this exact case mickelus/tetra#406
After speaking to mickelus about this it appears the issue is that he's expecting tetra tools to have nbt at all times where my logic only sends stacks without NBT when figuring out compacting recipes. I will actually ban any items that have nbt from even trying to figure if there are recipes that could be used to compact those, which will fix this. Mickelus may also add a check for nbt on his side, but that may not be necessary after my fix.
New version that fixes this issue is on curseforge. It also enables quark buttons in backpack gui again as Quark now has the fix for what caused dupe bug before, but that is in the latest Quark version so mentioning it as well to prevent that dupe bug from reappearing.
New version that fixes this issue is on curseforge. It also enables quark buttons in backpack gui again as Quark now has the fix for what caused dupe bug before, but that is in the latest Quark version so mentioning it as well to prevent that dupe bug from reappearing.
What new version of what?