Random Crash with 2 seperate weapon swings [1.19.2 Fabric]
gamerpotion opened this issue ยท 4 comments
Minecraft version - 1.19.2
Mod loader - Fabric 0.14.11
Mod version - 1.5.2+1.19
Used on the DarkRPG Modpack
Describe the bug
A player has reported a crash when equipping Runic Longsword from Simply Swords in main hand and Dragonslayer Swordspear from Marium's Soulslike Weaponry in offhand and attacking mobs on their private server
Crashlog
// You should try our sister game, Minceraft!
Time: 2022-12-19 17:23:08
Description: Unexpected error
java.lang.ArrayIndexOutOfBoundsException: Index -2 out of bounds for length 2
at it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap.findKey(Object2ObjectArrayMap.java:322)
at it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap.remove(Object2ObjectArrayMap.java:389)
at net.minecraft.class_1324.method_6202(class_1324.java:96)
at net.minecraft.class_5131.method_26843(class_5131.java:90)
at com.google.common.collect.AbstractMapBasedMultimap.lambda$forEach$2(AbstractMapBasedMultimap.java:1322)
at com.google.common.collect.LinkedHashMultimap$ValueSet.forEach(LinkedHashMultimap.java:460)
at com.google.common.collect.AbstractMapBasedMultimap.lambda$forEach$3(AbstractMapBasedMultimap.java:1322)
at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:721)
at com.google.common.collect.AbstractMapBasedMultimap.forEach(AbstractMapBasedMultimap.java:1321)
at com.google.common.collect.LinkedHashMultimap.forEach(LinkedHashMultimap.java:86)
at net.minecraft.class_5131.method_26854(class_5131.java:86)
at net.bettercombat.logic.PlayerAttackHelper.setAttributesForOffHandAttack(PlayerAttackHelper.java:159)
at net.minecraft.class_1309.handler$bbk000$getAttributeValue_Inject(class_1309.java:17663)
at net.minecraft.class_1309.method_26825(class_1309.java)
at net.minecraft.class_1309.method_6063(class_1309.java:1697)
at net.minecraft.class_1657.method_7317(class_1657.java:1891)
at com.nhoryzon.mc.farmersdelight.client.gui.NourishmentHungerOverlay.renderNourishmentOverlay(NourishmentHungerOverlay.java:54)
at com.nhoryzon.mc.farmersdelight.client.gui.NourishmentHungerOverlay.onRender(NourishmentHungerOverlay.java:38)
at net.minecraft.class_329.handler$eih001$renderFoodPost(class_329.java:7982)
at net.minecraft.class_329.method_1760(class_329.java:896)
at net.minecraft.class_329.method_1753(class_329.java:225)
at net.minecraft.class_757.method_3192(class_757.java:862)
at net.minecraft.class_310.method_1523(class_310.java:1177)
at net.minecraft.class_310.method_1514(class_310.java:768)
at net.minecraft.client.main.Main.method_44604(Main.java:244)
at net.minecraft.client.main.Main.main(Main.java:51)
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:461)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Thread: Render thread
Stacktrace:
at it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap.findKey(Object2ObjectArrayMap.java:322)
at it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap.remove(Object2ObjectArrayMap.java:389)
at net.minecraft.class_1324.method_6202(class_1324.java:96)
at net.minecraft.class_5131.method_26843(class_5131.java:90)
at com.google.common.collect.AbstractMapBasedMultimap.lambda$forEach$2(AbstractMapBasedMultimap.java:1322)
at com.google.common.collect.LinkedHashMultimap$ValueSet.forEach(LinkedHashMultimap.java:460)
at com.google.common.collect.AbstractMapBasedMultimap.lambda$forEach$3(AbstractMapBasedMultimap.java:1322)
at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:721)
at com.google.common.collect.AbstractMapBasedMultimap.forEach(AbstractMapBasedMultimap.java:1321)
at com.google.common.collect.LinkedHashMultimap.forEach(LinkedHashMultimap.java:86)
at net.minecraft.class_5131.method_26854(class_5131.java:86)
at net.bettercombat.logic.PlayerAttackHelper.setAttributesForOffHandAttack(PlayerAttackHelper.java:159)
at net.minecraft.class_1309.handler$bbk000$getAttributeValue_Inject(class_1309.java:17663)
at net.minecraft.class_1309.method_26825(class_1309.java)
at net.minecraft.class_1309.method_6063(class_1309.java:1697)
at net.minecraft.class_1657.method_7317(class_1657.java:1891)
at com.nhoryzon.mc.farmersdelight.client.gui.NourishmentHungerOverlay.renderNourishmentOverlay(NourishmentHungerOverlay.java:54)
at com.nhoryzon.mc.farmersdelight.client.gui.NourishmentHungerOverlay.onRender(NourishmentHungerOverlay.java:38)
at net.minecraft.class_329.handler$eih001$renderFoodPost(class_329.java:7982)
at net.minecraft.class_329.method_1760(class_329.java:896)
at net.minecraft.class_329.method_1753(class_329.java:225)
-- Affected level --
Details:
All players: 1 total; [class_746['kubukisilong'/239939, l='ClientLevel', x=-170.78, y=32.00, z=-170.82]]
Chunk stats: 346, 346
Level dimension: minecraft:the_nether
Level spawn location: World: (-211,70,-1546), Section: (at 13,6,6 in -14,4,-97; chunk contains blocks -224,0,-1552 to -209,255,-1537), Region: (-1,-4; contains chunks -32,-128 to -1,-97, blocks -512,0,-2048 to -1,255,-1537)
Level time: 4714760 game time, 5087382 day time
Server brand: fabric
Server type: Non-integrated multiplayer server
Stacktrace:
at net.minecraft.class_638.method_8538(class_638.java:453)
at net.minecraft.class_310.method_1587(class_310.java:2341)
at net.minecraft.class_310.method_1514(class_310.java:792)
at net.minecraft.client.main.Main.method_44604(Main.java:244)
at net.minecraft.client.main.Main.main(Main.java:51)
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:461)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)```
This is a major issue I have never managed to reproduce.
Better Combat invokes Minecraft to perform some attribute changes (with perfectly valid argument), but vanilla Minecraft attribute manager fails in the process.
I can think of the following sources:
- Concurrent modification
- buggy JVM
- some other mod causing this
Can you guys try to update JVM to the latest version and see if the crash still happens?
What mod have you installed recently?
I've run into the same bug, using version 1.7.1 on Minecraft 1.19.2 Fabric, using an Iron Longsword from Simply Swords:
crash-2023-10-07_14.46.36-client.txt
I was holding a torch in my off-hand while swinging. However, a friend on the same server experienced the same crash while not holding anything in her off-hand.
Edit: Other people playing the same modpack as I seem to have similar crashes, but not always involving Better Combat. It seems possible that this is a bad interaction with another mod and not caused by Better Combat.