Bug - Fixed Chat parser failing with SIOOBE

Got this in my gCLI today while chatting in the relay browser (not doing anything else KoLmafia-related):

Unexpected error, debug log printed.

The debug log says:
Code:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
          KoLmafia v16.3 r13935, Mac OS X, Java 1.7.0_55
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 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: Sun Apr 20 07:38:55 EDT 2014
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Unexpected error, debug log printed.
class java.lang.StringIndexOutOfBoundsException: String index out of range: -1
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at java.lang.String.substring(String.java:1871)
	at net.sourceforge.kolmafia.chat.ChatSender.executeCommand(ChatSender.java:466)
	at net.sourceforge.kolmafia.chat.ChatSender.sendMessage(ChatSender.java:160)
	at net.sourceforge.kolmafia.request.RelayRequest.handleChat(RelayRequest.java:2178)
	at net.sourceforge.kolmafia.request.RelayRequest.run(RelayRequest.java:2283)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:280)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:243)
	at net.sourceforge.kolmafia.webui.RelayAgent.readServerResponse(RelayAgent.java:552)
	at net.sourceforge.kolmafia.webui.RelayAgent.performRelay(RelayAgent.java:157)
	at net.sourceforge.kolmafia.webui.RelayAgent.run(RelayAgent.java:130)
 

lostcalpolydude

Developer
Staff member
Had you used a mafia or chat command from chat, as the log seems to indicate? If so, which one (just in case it's relevant)?
 
I might have entered something KoLmafia thought was a command for it. I certainly wasn't intending to give KoLmafia any commands via chat.

EDIT: In case anyone's wondering: SIOOBE = String Index Out Of Bounds Exception.
 

heeheehee

Developer
Staff member
The line in question is
Code:
graf = graf.substring( graf.indexOf( " " ) ).trim();
, correct? I have some modifications to my copy of ChatSender, so I'm not entirely sure. If so, then I'd think changing that to
Code:
graf = graf.substring( graf.indexOf( " " ) + 1 ).trim();
would address this problem. Maybe.
 

Veracity

Developer
Staff member
You can get this by simply typing "/clan" in the relay browser chat.
Revision 14811
 
Top