RubixDev / Inventorio

Inventorio - an inventory enhancement mod for Minecraft (Fabric / (Neo)Forge)
https://modrinth.com/mod/inventorio
57 stars 19 forks source link

Crash on 1.20.4 when hitting mobs #347

Open vlad8599 opened 2 months ago

vlad8599 commented 2 months ago

crash-2024-04-19_17.11.08-server.txt Here is a crash report. Its impossible to play! Every time when I am hitting mob with my netherite sword, game crashes with this log. If you will re-open world, then you will see that weapon was duplicated. Fix it, please!

offbeat-stuff commented 2 months ago

The error seems to be because of stack overflow (a method calling itself again and again).

Please send the log again with these things.

Also what you can do is perform a binary search (remove half the mods to find out which mod is causing the crash.

vlad8599 commented 2 months ago

Why should I remove Bedrockify? There also lot of other mods in log.

offbeat-stuff commented 2 months ago

it was in crash log, though i guess since its stackoverflow and bedrockify only had one method call. Doesn't matter as much.

vlad8599 commented 2 months ago

Game doesnt crashes anymore. I didnt changed anything, just added StackDeobf. What I can do, what happened?

offbeat-stuff commented 2 months ago

Hmm did the crash happen repeatedly when running the game before or was it a one off?

vlad8599 commented 2 months ago

It happened a few times before, sometimes when I was trying to play with my friend using RAdmin, sometimes when I was playing alone.

vlad8599 commented 2 months ago

crash-2024-04-19_19.34.45-server.txt Crash again. Both mods that you mentioned is installed, Bedrockify is not deleted(and wont be). Here is a log.

RubixDev commented 2 months ago

Translated stacktrace (using Linkie):

java.lang.StackOverflowError: Exception in server tick loop
    at com.google.common.collect.TransformedIterator.hasNext(TransformedIterator.java:46)
    at com.google.common.collect.Iterators.addAll(Iterators.java:366)
    at com.google.common.collect.Lists.newArrayList(Lists.java:146)
    at com.google.common.collect.Lists.newArrayList(Lists.java:132)
    at net.minecraft.util.shape.SimpleVoxelShape9.copy(NbtList.java:346)
    at net.minecraft.util.shape.SimpleVoxelShape9.copy(NbtList.java:13)
    at com.google.common.collect.Maps$9.transformEntry(Maps.java:2106)
    at com.google.common.collect.Maps$12.getValue(Maps.java:2154)
    at it.unimi.dsi.fastutil.objects.AbstractObject2ObjectMap.putAll(AbstractObject2ObjectMap.java:342)
    at it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap.putAll(Object2ObjectOpenHashMap.java:228)
    at it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap.<init>(Object2ObjectOpenHashMap.java:125)
    at it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap.<init>(Object2ObjectOpenHashMap.java:134)
    at net.minecraft.util.shape.FractionalPairList7.copy(NbtCompound.java:713)
    at net.minecraft.item.map.MapBannerMarker99.copy(ItemStack.java:466)
    at net.minecraft.loot.function.FurnaceSmeltLootFunction7.interact(PlayerEntity.java:1086)
    at net.minecraft.loot.function.FurnaceSmeltLootFunction7.handler$ceg000$fabrication$interact(PlayerEntity.java:17344)
    at net.minecraft.loot.function.FurnaceSmeltLootFunction7.interact(PlayerEntity.java:1110)
    at net.minecraft.loot.function.FurnaceSmeltLootFunction7.handler$ceg000$fabrication$interact(PlayerEntity.java:17344)
    at net.minecraft.loot.function.FurnaceSmeltLootFunction7.interact(PlayerEntity.java:1110)
    at net.minecraft.loot.function.FurnaceSmeltLootFunction7.handler$ceg000$fabrication$interact(PlayerEntity.java:17344)
    at net.minecraft.loot.function.FurnaceSmeltLootFunction7.interact(PlayerEntity.java:1110)
    at net.minecraft.loot.function.FurnaceSmeltLootFunction7.handler$ceg000$fabrication$interact(PlayerEntity.java:17344)
    at net.minecraft.loot.function.FurnaceSmeltLootFunction7.interact(PlayerEntity.java:1110)
    at net.minecraft.loot.function.FurnaceSmeltLootFunction7.handler$ceg000$fabrication$interact(PlayerEntity.java:17344)
    at net.minecraft.loot.function.FurnaceSmeltLootFunction7.interact(PlayerEntity.java:1110)
    at net.minecraft.loot.function.FurnaceSmeltLootFunction7.handler$ceg000$fabrication$interact(PlayerEntity.java:17344)
    at net.minecraft.loot.function.FurnaceSmeltLootFunction7.interact(PlayerEntity.java:1110)
    at net.minecraft.loot.function.FurnaceSmeltLootFunction7.handler$ceg000$fabrication$interact(PlayerEntity.java:17344)
    at net.minecraft.loot.function.FurnaceSmeltLootFunction7.interact(PlayerEntity.java:1110)
    at net.minecraft.loot.function.FurnaceSmeltLootFunction7.handler$ceg000$fabrication$interact(PlayerEntity.java:17344)
    at net.minecraft.loot.function.FurnaceSmeltLootFunction7.interact(PlayerEntity.java:1110)
    at net.minecraft.loot.function.FurnaceSmeltLootFunction7.handler$ceg000$fabrication$interact(PlayerEntity.java:17344)
    at net.minecraft.loot.function.FurnaceSmeltLootFunction7.interact(PlayerEntity.java:1110)
    ...
vlad8599 commented 2 months ago

A little update. I disabled function called "Using sword with Fire Aspect instead of flint and steel" and seems that game crashes stopped. I cant be sure, if this was a reason, but I must ask someone to check this.

RubixDev commented 2 months ago

Yes that feature is the cause for the crash. Even with it turned on however I have not yet been able to reproduce the crash. Here is the relevant code in Fabrication, and in that crash it doesn't get past the ActionResult ar = self.interact(e, hand); line. This presumably happens because the self.setStackInHand(hand, flintAndSteel); line just before doesn't actually set the stack in hand to a flint and steel because some other mod (this might be Inventorio) changes that behaviour. Inventorio does slightly alter that behaviour, for the utility belt as offhand and for the swapped hands feature.

So I have a few questions:

vlad8599 commented 2 months ago

I have my sword inside utility slot. Swapped hands mod is not enabled. Cant be sure about when exactly it happes, I can only say that game crashes sometimes if I mob was hitten with my sword, when this function is enabled. Maybe it happens, when I am trying to block attacks with my shield, but I believe that reason is hitting mob with this "wrongly enchanted" sword.