Bug - Fixed Debug log produced when running the maximizer

ereinion

Member
Not really sure what happened here, but since it produced a debug-log, maybe one of you guys can figure out what it was that went wrong? Checking in the relay browser, the PPS is equipped. Could it have to do with the maximizer not expecting the familiar equipment to change when "-familiar" is included in the maximizer-string?

CLI:
Code:
[COLOR=olive]> maximize item, -pants, -back, -familiar, switch jung      man[/COLOR]

Maximizing (1st time may take a while)...
59308      combinations checked, best score 380.00
120933 combinations checked,      best score 380.00
182813 combinations checked, best score 380.00
245048      combinations checked, best score 380.00
307151 combinations checked,      best score 506.16
369219 combinations checked, best score 506.16
431493      combinations checked, best score 506.16
494879 combinations checked,      best score 506.16
544236 combinations checked, best score 506.16
Putting      on bounty-hunting helmet...
Equipment changed.
Wielding      bottle-rocket crossbow...
Equipment changed.
Holding hypnodisk...
Equipment      changed.
Putting on flaming pink shirt...
Equipment changed.
Putting      on Mayor Ghost's sash...
Equipment changed.
Putting on Jekyllin hide      belt...
Equipment changed.
Putting on Jekyllin hide belt...
Equipment      changed.
Putting Fenrir the Baby Bugged Bugbear back into terrarium...
Taking      Fenrir the Angry Jung Man out of terrarium...
plastic pumpkin bucket is      better than (none). Switching items...
Putting on plastic pumpkin      bucket...
Equipment changed.
Unexpected error, debug log printed.

Debug-log: View attachment DEBUG_20140910.txt
 

Darzil

Developer
I think you are on the right lines. I'll have a look tomorrow if no one else does.

It appears that something went wrong and somehow the best familiar item (which was not plastic pumpkin bucket, that I suspect was added by the switch familiar code), was not null, or EquipmentRequest.UNEQUIP, but could also not be cast to CheckedItem. Hopefully this is a reasonably repeatable failing and I can get it too. That isn't the way Evaluator handles conversion from Item to CheckedItem, so maybe that line is a bit weak.
 

ereinion

Member
Thanks for having a look at it! I am now running a more recent revision than r14610, and'll let you know if I see this pop up again. Not a huge issue at any rate, as the maximizer does what I want it too even if it throws the error.
 

Theraze

Active member
I did have a character that got a debug log with the maximizer on 14617 yesterday... doesn't look like the same bug, but this one is still officially open and the title is exactly what was experienced, so... if you want a separate post, let me know. :D Anyways, I got lots of debug bits when I tried to maximize with this character.
Code:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
         KoLmafia v16.4 r14617, Windows 8, Java 1.7.0_09
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Please note: do not post this log in the KoLmafia thread of KoL's
 Gameplay-Discussion forum. If you would like the KoLmafia dev team
 to look at it, please write a bug report at kolmafia.us. Include
 specific information about what you were doing when you made this
 and include this log as an attachment.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Timestamp: Thu Sep 11 19:17:41 PDT 2014
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Unexpected error, debug log printed.
class java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at java.util.ArrayList.rangeCheck(Unknown Source)
	at java.util.ArrayList.get(Unknown Source)
	at net.sourceforge.kolmafia.maximizer.Evaluator.enumerateEquipment(Evaluator.java:1622)
	at net.sourceforge.kolmafia.maximizer.Maximizer.maximize(Maximizer.java:168)
	at net.sourceforge.kolmafia.maximizer.Maximizer.maximize(Maximizer.java:114)
	at net.sourceforge.kolmafia.textui.command.ModifierMaximizeCommand.run(ModifierMaximizeCommand.java:62)
	at net.sourceforge.kolmafia.KoLmafiaCLI.doExecuteCommand(KoLmafiaCLI.java:596)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeCommand(KoLmafiaCLI.java:549)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeLine(KoLmafiaCLI.java:450)
	at net.sourceforge.kolmafia.textui.RuntimeLibrary.cli_execute(RuntimeLibrary.java:1923)
	at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.sourceforge.kolmafia.textui.parsetree.LibraryFunction.execute(LibraryFunction.java:106)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:154)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:435)
	at net.sourceforge.kolmafia.textui.parsetree.Switch.execute(Switch.java:156)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:435)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:153)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:154)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionReturn.execute(FunctionReturn.java:100)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:435)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:153)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:154)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:435)
	at net.sourceforge.kolmafia.textui.parsetree.Switch.execute(Switch.java:156)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:435)
	at net.sourceforge.kolmafia.textui.parsetree.Loop.execute(Loop.java:59)
	at net.sourceforge.kolmafia.textui.parsetree.WhileLoop.execute(WhileLoop.java:100)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:435)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:153)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:154)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:435)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:153)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:154)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:435)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:153)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:154)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:435)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:153)
	at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:154)
	at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:435)
	at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:153)
	at net.sourceforge.kolmafia.textui.Interpreter.executeScope(Interpreter.java:401)
	at net.sourceforge.kolmafia.textui.Interpreter.execute(Interpreter.java:325)
	at net.sourceforge.kolmafia.textui.Interpreter.execute(Interpreter.java:318)
	at net.sourceforge.kolmafia.textui.command.CallScriptCommand.call(CallScriptCommand.java:256)
	at net.sourceforge.kolmafia.KoLmafiaCLI.doExecuteCommand(KoLmafiaCLI.java:606)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeCommand(KoLmafiaCLI.java:549)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeLine(KoLmafiaCLI.java:450)
	at net.sourceforge.kolmafia.KoLmafiaCLI.executeLine(KoLmafiaCLI.java:318)
	at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.handleQueue(CommandDisplayFrame.java:190)
	at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.run(CommandDisplayFrame.java:164)
In the GUI, I was trying to run maximize adventures, -tie, but it had been crashing since ascending. It finally stopped crashing after I ran an outfit birthday suit and cleared everything out. All of my outfit slots had equipment in them before it ran, but I'm guessing that one of the hidden maximizer slots was causing the crash. Softcore in-ronin, if it matters.
 

Darzil

Developer
Interesting, I can see that line isn't safe, but I'm surprised it was failing there in with slots having stuff in them, especially as you were in ronin where +current applies. Still, simple fix.
 
Top