Bug - Fixed Array index out of bounds, possibly related to equipment slots or autoscend

fronobulax

Developer
Staff member
autoscend would not run with r27186 today.

The debug log includes

java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 26
at net.sourceforge.kolmafia.equipment.Slot.byOrdinal(Slot.java:75)
at net.sourceforge.kolmafia.textui.RuntimeLibrary.equipped_item(RuntimeLibrary.java:6687)

and it looks like auto_util.ash, line 377 and/or auto_post_adv.ash, line 1128 may be involved.

I reverted back, arbitrarily, to r27179 and autoscend is performing as expected.

At the moment I'm not in a position to debug because I'm not sure whether it is the script or mafia that needs to be fixed but I figure I should report this in case someone else has ideas or routinely monitors the LASS discord channel.
 
Last edited by a moderator:

Ryo_Sangnoir

Developer
Staff member
It's my slot refactor, so it's a Mafia problem.

Somehow -1 is getting passed to byOrdinal. I couldn't find a way to construct a slot with -1, but clearly there is some way.

I can reproduce with
Code:
ash equipped_item($slot[none])
 
Last edited:
Top