Bug - Fixed NPE when using maximize command

fxer

Member
Just started happening today, I could roll back a few builds if necessary and find where it starts. Currently using r18140.jar. NPEs happen both from the gCLI and from the maximize() command within scripts for me.

From the 'birthday suit' outfit while using a jumpsuited hound dog:

Code:
> maximize item

Maximizing...
32 combinations checked, best score 322.92
Putting on bounty-hunting helmet...
Equipment changed.
Wielding bounty-hunting rifle...
Equipment changed.
Putting on makeshift cape...
Equipment changed.
Putting on BGE 'cuddly critter' shirt...
Equipment changed.
Putting on bounty-hunting pants...
Equipment changed.
Putting on lucky rabbit's foot...
Equipment changed.
Putting on lucky rabbit's foot...
Equipment changed.
Putting on lucky rabbit's foot...
Equipment changed.
Putting on blue suede shoes...
Equipment changed.
Unexpected error, debug log printed.

Running the command again while already maximized as above spits out the error again.

Code:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
        KoLmafia v17.6 r18140, Windows 10, Java 1.8.0_131
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 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: Fri Jul 07 11:52:10 PDT 2017
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Unexpected error, debug log printed.
class java.lang.NullPointerException: null
java.lang.NullPointerException
	at net.sourceforge.kolmafia.maximizer.Maximizer.maximize(Maximizer.java:1400)
	at net.sourceforge.kolmafia.maximizer.Maximizer.maximize(Maximizer.java:126)
	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.KoLmafiaCLI.executeLine(KoLmafiaCLI.java:318)
	at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.handleQueue(CommandDisplayFrame.java:187)
	at net.sourceforge.kolmafia.swingui.CommandDisplayFrame$CommandQueueHandler.run(CommandDisplayFrame.java:163)
 

Darzil

Developer
Odd, see if it works anyway. Maybe for some reason it hadn't seen your Workshed, but should fix impact of CampgroundRequest.getCurrentWorkshedItem() returning null.
 
Top