geheur / weapon-animation-replacer

BSD 2-Clause "Simplified" License
4 stars 3 forks source link

Crash when swapping certain items while equipment screen or maybe when bank is open. #5

Closed geheur closed 2 years ago

geheur commented 3 years ago

Using rune crossbow with kbow animations and taking my arma dhide shield off and on has a chance to crash the game. Have seen this happen with other weapons/items as well.

image

geheur commented 2 years ago

This is the stacktrace for that:

java.lang.ArrayIndexOutOfBoundsException: Index 12 out of bounds for length 12
    at fz.km(fz.java:6553)
    at ih.gc(ih.java:217)
    at bb.t(bb.java:2502)
    at et.ig(et.java:9857)
    at et.ig(et.java:9656)
    at et.ig(et.java:9656)
    at at.ia(at.java:9514)
    at et.ig(et.java:9660)
    at et.ig(et.java:9656)
    at et.ig(et.java:9656)
    at at.ia(at.java:9514)
    at client.gc(client.java:4581)
    at client.ab(client.java:1678)
    at c.ie(c.java:400)
    at c.run(c.java:354)
    at java.base/java.lang.Thread.run(Thread.java:829)
Error: fz.l() ih.f() bb.t() et.ig() et.ig() et.ig() at.ia() et.ig() et.ig() et.ig() at.ia() client.gp() client.ab() c.b() | fz:6553 ih:217 bb:2502 et:9857 et:9656 et:9656 at:9514 et:9660 et:9656 et:9656 at:9514 client:4581 client:1678 c:400 c:354 Thread:829 | java.lang.ArrayIndexOutOfBoundsException: Index 12 out of bounds for length 12
fz.l() ih.f() bb.t() et.ig() et.ig() et.ig() at.ia() et.ig() et.ig() et.ig() at.ia() client.gp() client.ab() c.b() | fz:6553 ih:217 bb:2502 et:9857 et:9656 et:9656 at:9514 et:9660 et:9656 et:9656 at:9514 client:4581 client:1678 c:400 c:354 Thread:829 | java.lang.ArrayIndexOutOfBoundsException: Index 12 out of bounds for length 12

iirc I produced this by swapping blurite sword with regular crossbow, using all animations swapped to crossbow regardless of equipped weapon.

geheur commented 2 years ago
with sword equipped, animations swapped to crossbow:
crossbow equipped, animations swapped to crossbow:
(both same)

anim -1: 0 (0) pose 2074: 0 (0-21)
anim -1: 0 (0) pose 2074: 1 (1-21)
anim -1: 0 (0) pose 2074: 2 (1-21)
anim -1: 0 (0) pose 2074: 3 (1-21)
anim -1: 0 (0) pose 2074: 4 (1-21)
anim -1: 0 (0) pose 2074: 5 (1-21)
anim -1: 0 (0) pose 2074: 6 (1-21)
anim -1: 0 (0) pose 2074: 7 (1-21)
anim -1: 0 (0) pose 2074: 8 (1-21)
anim -1: 0 (0) pose 2074: 9 (1-21)
anim -1: 0 (0) pose 2074: 10 (1-21)
anim -1: 0 (0) pose 2074: 11 (1-21)

just blurite sword, no animations swapped:

anim -1: 0 (0) pose 809: 0 (0-20)
anim -1: 0 (0) pose 809: 1 (1-20)
anim -1: 0 (0) pose 809: 2 (1-20)
anim -1: 0 (0) pose 809: 3 (1-20)
anim -1: 0 (0) pose 809: 4 (1-20)
anim -1: 0 (0) pose 809: 5 (1-20)
anim -1: 0 (0) pose 809: 6 (1-20)
anim -1: 0 (0) pose 809: 7 (1-20)
anim -1: 0 (0) pose 809: 8 (1-20)
anim -1: 0 (0) pose 809: 9 (1-20)
anim -1: 0 (0) pose 809: 10 (1-20)
anim -1: 0 (0) pose 809: 11 (1-20)

just crossbow, no animations swapped:

anim -1: 0 (0) pose 4591: 0 (0-20)
anim -1: 0 (0) pose 4591: 1 (1-20)
anim -1: 0 (0) pose 4591: 2 (1-20)
anim -1: 0 (0) pose 4591: 3 (1-20)
anim -1: 0 (0) pose 4591: 4 (1-20)
anim -1: 0 (0) pose 4591: 5 (1-20)
anim -1: 0 (0) pose 4591: 6 (1-20)
anim -1: 0 (0) pose 4591: 7 (1-20)
anim -1: 0 (0) pose 4591: 8 (1-15)
anim -1: 0 (0) pose 4591: 9 (1-10)
anim -1: 0 (0) pose 4591: 10 (1-10)
anim -1: 0 (0) pose 4591: 11 (1-10)
anim -1: 0 (0) pose 4591: 12 (1-10)
anim -1: 0 (0) pose 4591: 13 (1-10)
anim -1: 0 (0) pose 4591: 14 (1-10)
anim -1: 0 (0) pose 4591: 15 (1-10)

it happened when swapping to crossbow

anim -1: 0 (0) pose 2074: 11 (18)
anim -1: 0 (0) pose 4591: 12 (1)

another example:
anim -1: 0 (0) pose 2074 (kbow): 11 (17) <-- My guess is that 17 immediately goes to the next one (12) because frame 11 for the crossbow idle pose (4591) maxes at 10.
anim -1: 0 (0) pose 4591 (crossbow): 12 (1) <-- this is bad.
geheur commented 2 years ago

I haven't seen this issue for a long time, and the code that sets pose animations has been changed fundamentally so I doubt this bug still exists.