Bug - Fixed Parsing problems with Hobo Marketplace effects

GValko

Member
Since getting the hookah, Mafia's been throwing a fit whenever I get either "Educated (Kinda)" or "Educated (Sorta)" effects. (Both are acquired from the Hobopolis Marketplace)

It's not actually breaking out of automated adventuring and aborting, but it is filling up debug logs.

Code:
Unexpected error, debug log printed.
class java.lang.NumberFormatException: Kinda
java.lang.NumberFormatException: Kinda
	at net.sourceforge.kolmafia.utilities.StringUtilities.parseIntInternal1(StringUtilities.java:711)

Unexpected error, debug log printed.
class java.lang.NumberFormatException: Sorta
java.lang.NumberFormatException: Sorta
	at net.sourceforge.kolmafia.utilities.StringUtilities.parseIntInternal1(StringUtilities.java:711)


Seems like Mafia is parsing the effect name and when it hits the parentheses in the effect name, it treats them as delimiters and tries to use it as a number.

Unfortunately, I just noticed this now, and the follow up question on whether or not this has any issue with debuffing effects will have to wait until I/someone else gets one of the effects again. Somewhat trivial right now, as far as I can tell those are the only 2 effects that actually have parenthesis in the name.

also I forgot r8288
 
Last edited:

Veracity

Developer
Staff member
I've seen this too, but I deleted my debug log. Can you give us a couple more lines of the stack trace, please, so we can see just where it's trying to parse "Sorta" as a number? Thanks.
 

GValko

Member
Here's the full log of the event:
Code:
Unexpected error, debug log printed.
class java.lang.NumberFormatException: Sorta
java.lang.NumberFormatException: Sorta
	at net.sourceforge.kolmafia.utilities.StringUtilities.parseIntInternal1(StringUtilities.java:711)
	at net.sourceforge.kolmafia.utilities.StringUtilities.parseInt(StringUtilities.java:656)
	at net.sourceforge.kolmafia.session.ResultProcessor.parseEffect(ResultProcessor.java:579)
	at net.sourceforge.kolmafia.session.ResultProcessor.processEffect(ResultProcessor.java:420)
	at net.sourceforge.kolmafia.request.FightRequest.processNode(FightRequest.java:3395)
	at net.sourceforge.kolmafia.request.FightRequest.processNode(FightRequest.java:3647)
	at net.sourceforge.kolmafia.request.FightRequest.processNode(FightRequest.java:3647)
	at net.sourceforge.kolmafia.request.FightRequest.processNode(FightRequest.java:3647)
	at net.sourceforge.kolmafia.request.FightRequest.processNormalResults(FightRequest.java:3250)
	at net.sourceforge.kolmafia.request.FightRequest.updateCombatData(FightRequest.java:1729)
	at net.sourceforge.kolmafia.request.GenericRequest.processResponse(GenericRequest.java:1729)
	at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:1693)
	at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:1390)
	at net.sourceforge.kolmafia.request.GenericRequest.execute(GenericRequest.java:1128)
	at net.sourceforge.kolmafia.request.GenericRequest.run(GenericRequest.java:1019)
	at net.sourceforge.kolmafia.request.FightRequest.runOnce(FightRequest.java:1088)
	at net.sourceforge.kolmafia.request.FightRequest.run(FightRequest.java:1109)
	at net.sourceforge.kolmafia.request.GenericRequest.handleServerRedirect(GenericRequest.java:1564)
	at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:1412)
	at net.sourceforge.kolmafia.request.GenericRequest.execute(GenericRequest.java:1128)
	at net.sourceforge.kolmafia.request.GenericRequest.run(GenericRequest.java:1019)
	at net.sourceforge.kolmafia.request.AdventureRequest.run(AdventureRequest.java:208)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:73)
	at net.sourceforge.kolmafia.KoLAdventure.run(KoLAdventure.java:918)
	at net.sourceforge.foxtrot.AbstractWorkerThread$AbstractWorkerAction.run(AbstractWorkerThread.java:84)
	at java.security.AccessController.doPrivileged(Native Method)
	at net.sourceforge.foxtrot.AbstractWorkerThread.runTask(AbstractWorkerThread.java:41)
	at net.sourceforge.foxtrot.workers.SingleWorkerThread.run(SingleWorkerThread.java:235)
	at net.sourceforge.foxtrot.workers.SingleWorkerThread.run(SingleWorkerThread.java:216)
	at java.lang.Thread.run(Unknown Source)

Hope this helps.
 

jasonharper

Developer
Should be fixed in r8293, but I've only been able to test it as far as verifying that normal effects still work - no telling how long it will be before my hookah coughs up one of the parenthetical effects.
 

GValko

Member
Might want to reopen this. Just got it again.

Code:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
           KoLmafia r8294, Windows Vista, Java 1.6.0_17
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Please note: do not post this log in the KoLmafia thread. If you
 would like the dev team to look at it, please create a bug report
 at kolmafia.us. Include specific information about what you were 
 doing when you made this log and attach it to the report. 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Timestamp: Thu Mar 18 16:13:30 EDT 2010
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Unexpected error, debug log printed.
class java.lang.NumberFormatException: Sorta
java.lang.NumberFormatException: Sorta
	at net.sourceforge.kolmafia.utilities.StringUtilities.parseIntInternal1(StringUtilities.java:711)
	at net.sourceforge.kolmafia.utilities.StringUtilities.parseInt(StringUtilities.java:656)
	at net.sourceforge.kolmafia.request.CharPaneRequest.extractEffect(CharPaneRequest.java:561)
	at net.sourceforge.kolmafia.request.CharPaneRequest.refreshEffects(CharPaneRequest.java:583)
	at net.sourceforge.kolmafia.request.CharPaneRequest.processCharacterPane(CharPaneRequest.java:226)
	at net.sourceforge.kolmafia.request.CharPaneRequest.processResults(CharPaneRequest.java:134)
	at net.sourceforge.kolmafia.request.GenericRequest.processResponse(GenericRequest.java:1770)
	at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:1693)
	at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:1390)
	at net.sourceforge.kolmafia.request.GenericRequest.execute(GenericRequest.java:1128)
	at net.sourceforge.kolmafia.request.GenericRequest.run(GenericRequest.java:1019)
	at net.sourceforge.kolmafia.request.CharPaneRequest.run(CharPaneRequest.java:128)
	at net.sourceforge.kolmafia.request.GenericRequest.processResponse(GenericRequest.java:1814)
	at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:1693)
	at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:1390)
	at net.sourceforge.kolmafia.request.GenericRequest.execute(GenericRequest.java:1128)
	at net.sourceforge.kolmafia.request.GenericRequest.run(GenericRequest.java:1019)
	at net.sourceforge.kolmafia.request.FightRequest.runOnce(FightRequest.java:1088)
	at net.sourceforge.kolmafia.request.FightRequest.run(FightRequest.java:1109)
	at net.sourceforge.kolmafia.request.GenericRequest.handleServerRedirect(GenericRequest.java:1564)
	at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:1412)
	at net.sourceforge.kolmafia.request.GenericRequest.execute(GenericRequest.java:1128)
	at net.sourceforge.kolmafia.request.GenericRequest.run(GenericRequest.java:1019)
	at net.sourceforge.kolmafia.request.AdventureRequest.run(AdventureRequest.java:208)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:73)
	at net.sourceforge.kolmafia.KoLAdventure.run(KoLAdventure.java:918)
	at net.sourceforge.foxtrot.AbstractWorkerThread$AbstractWorkerAction.run(AbstractWorkerThread.java:84)
	at java.security.AccessController.doPrivileged(Native Method)
	at net.sourceforge.foxtrot.AbstractWorkerThread.runTask(AbstractWorkerThread.java:41)
	at net.sourceforge.foxtrot.workers.SingleWorkerThread.run(SingleWorkerThread.java:235)
	at net.sourceforge.foxtrot.workers.SingleWorkerThread.run(SingleWorkerThread.java:216)
	at java.lang.Thread.run(Unknown Source)
 

Veracity

Developer
Staff member
Interestingly enough, that's a different stack trace.
The original happened when the effect was gained during a fight.
The second happened when the effect was noticed on the charpane.
 

Veracity

Developer
Staff member
Hmm.

Code:
class java.lang.NumberFormatException: Kinda
java.lang.NumberFormatException: Kinda
	at net.sourceforge.kolmafia.utilities.StringUtilities.parseIntInternal1(StringUtilities.java:718)
	at net.sourceforge.kolmafia.utilities.StringUtilities.parseInt(StringUtilities.java:663)
	at net.sourceforge.kolmafia.webui.CharPaneDecorator.addUpArrowLinks(CharPaneDecorator.java:792)
	at net.sourceforge.kolmafia.webui.CharPaneDecorator.decorate(CharPaneDecorator.java:120)
	at net.sourceforge.kolmafia.RequestEditorKit.getFeatureRichHTML(RequestEditorKit.java:485)
	at net.sourceforge.kolmafia.RequestEditorKit.getFeatureRichHTML(RequestEditorKit.java:403)
	at net.sourceforge.kolmafia.LocalRelayAgent.readServerResponse(LocalRelayAgent.java:408)
	at net.sourceforge.kolmafia.LocalRelayAgent.performRelay(LocalRelayAgent.java:132)
	at net.sourceforge.kolmafia.LocalRelayAgent.run(LocalRelayAgent.java:109)
 
Top