Closed magicus closed 1 year ago
To be fair, the crashes we see can also come from someone running the fork at https://github.com/PhoenixOrigin/anode-fabric; unfortunately we cannot tell.
FWIW, there is also two other separate crashes we have seen:
java.lang.NumberFormatException: For input string: "❤"
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
at java.base/java.lang.Long.parseLong(Long.java:711)
at java.base/java.lang.Long.parseLong(Long.java:836)
at xyz.andw.anode.war.Tower.fromBossString(Tower.java:67)
at xyz.andw.anode.listener.WarChatListener.lambda$init$3(WarChatListener.java:59)
at xyz.andw.anode.event.ChatCallback.lambda$static$0(ChatCallback.java:12)
at net.minecraft.class_338.handler$zzb000$anode$addMessage(class_338.java:560)
and
java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
at xyz.andw.anode.war.Tower.fromBossString(Tower.java:66)
at xyz.andw.anode.listener.WarChatListener.lambda$init$3(WarChatListener.java:59)
at xyz.andw.anode.event.ChatCallback.lambda$static$0(ChatCallback.java:12)
at net.minecraft.class_338.handler$zzb000$anode$addMessage(class_338.java:560)
Hey magicus, you're correct. The client will see two boss bars only when they are in a war. However, the code was being run even when the player is not in a war whenever a "war has begun" message is received.
This is fixed now in the latest release.
Let me know if you are seeing anymore related crashes.
Hi, I am a developer of Wynntils. We are seeing multiple crashes that involve your mod. I believe it might be due to a bad interaction between our respective mods (or possibly that one of your assumptions about Wynncraft do not hold.)
The crash stack trace looks like this:
In WarChatListener, you have the following piece of code that is causing trouble:
This assumption that the boss bars always come in pairs do not hold. We do boss bar manipulations in Wynntils; I can't say in the particular cases that the crash has occurred if there were more bars that has been removed/blocked by us, or if it is Wynncraft that did not create two bars (and thus your assumption is invalid).
In any case, you can make your mod more robust by checking if there really is an additional bar before trying to get it from the iterator.