Bug - Fixed NPE setting Location Details

Occurred right after killing a blooper to get exactly 30 white pixels for a digital key.

EDIT: Actually went through and looked through the debug log. It seems the NPE occurred sporadically throughout. The full debug log is quite long and is attached.
 

Attachments

  • DEBUG_20110704.txt
    60.7 KB · Views: 44
Last edited:
I've got what might be the same issue...

gCLI output:

[318] F'c'le
Encounter: chatty pirate
Round 0: wrldwzrd89 wins initiative!
Round 1: wrldwzrd89 casts STUFFED MORTAR SHELL!
Round 2: chatty pirate takes 215 damage.
Round 2: wrldwzrd89 wins the fight!
You gain 115 Meat
After Battle: The_Flyin_Hawaiian bends its brim into an approximation of a smile.
You gain 10 Strongness
You gain 29 Magicalness
You gain 13 Roguishness
Putting on stainless steel solitaire...
Unexpected error, debug log printed.
Equipment changed.
Casting The Sonata of Sneakiness 1 times...
You acquire an effect: The Sonata of Sneakiness (duration: 15 Adventures)
The Sonata of Sneakiness was successfully cast.
Casting Ur-Kel's Aria of Annoyance 1 times...
You acquire an effect: Ur-Kel's Aria of Annoyance (duration: 15 Adventures)
Ur-Kel's Aria of Annoyance was successfully cast.
Putting on stuffed shoulder parrot...
Unexpected error, debug log printed.
Equipment changed.

[319] F'c'le
Encounter: cleanly pirate
Round 0: wrldwzrd89 wins initiative!
Round 1: wrldwzrd89 casts STUFFED MORTAR SHELL!
Round 2: cleanly pirate takes 241 damage.
Round 2: wrldwzrd89 wins the fight!
You gain 97 Meat
You acquire an item: rigging shampoo
You acquire an item: Swabbie™ swab
After Battle: The_Flyin_Hawaiian bends its brim into an approximation of a smile.
You gain 11 Muscleboundness
You gain 29 Enchantedness
You gain a Mysticality point!
You gain 12 Sarcasm
You gain a Moxie point!
Unexpected error, debug log printed.

[320] F'c'le
Encounter: creamy pirate
Round 0: wrldwzrd89 wins initiative!
Round 1: wrldwzrd89 casts STUFFED MORTAR SHELL!
Round 2: creamy pirate takes 189 damage.
Round 2: wrldwzrd89 wins the fight!
You gain 113 Meat
You acquire an item: cream stout
After Battle: The_Flyin_Hawaiian bends its brim into an approximation of a smile.
You gain 15 Strongness
You gain 26 Magicalness
You gain 9 Smarm
Putting on stainless steel solitaire...
Unexpected error, debug log printed.
Equipment changed.
Casting Leash of Linguini 1 times...
You acquire an effect: Leash of Linguini (duration: 10 Adventures)
Leash of Linguini was successfully cast.
Casting Smooth Movement 1 times...
You acquire an effect: Smooth Movements (duration: 10 Adventures)
Smooth Movement was successfully cast.
Putting on stuffed shoulder parrot...
Unexpected error, debug log printed.
Equipment changed.

Debug logs attached.
 
Last edited by a moderator:

Veracity

Developer
Staff member
I've got what might be the same issue...
Considering that none of your stack traces happened while decorating the charpane, no, this is not remotely the "same issue".
Every one of YOUR stack traces came from setting the "location details" in the Adventure Pane.

Sample exception:

Code:
java.lang.NullPointerException
	at javax.swing.text.Utilities.isComposedTextElement(Utilities.java:836)
	at javax.swing.text.AbstractDocument.handleRemove(AbstractDocument.java:598)
	at javax.swing.text.AbstractDocument.remove(AbstractDocument.java:576)
	at javax.swing.JEditorPane.setText(JEditorPane.java:1493)
	at net.sourceforge.kolmafia.swingui.panel.AdventureSelectPanel$SafetyField.setSafetyString(AdventureSelectPanel.java:658)
	at net.sourceforge.kolmafia.swingui.panel.AdventureSelectPanel$SafetyField.run(AdventureSelectPanel.java:633)
	at net.sourceforge.kolmafia.KoLCharacterAdapter.updateStatus(KoLCharacterAdapter.java:60)
	at net.sourceforge.kolmafia.KoLCharacter.updateStatus(KoLCharacter.java:3887)
	at net.sourceforge.kolmafia.KoLCharacter.setHP(KoLCharacter.java:1087)
	at net.sourceforge.kolmafia.request.CharPaneRequest.handleMiscPoints(CharPaneRequest.java:470)
	at net.sourceforge.kolmafia.request.CharPaneRequest.handleExpandedMode(CharPaneRequest.java:364)
	at net.sourceforge.kolmafia.request.CharPaneRequest.processResults(CharPaneRequest.java:192)
	at net.sourceforge.kolmafia.request.GenericRequest.processResponse(GenericRequest.java:1801)
	at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:1766)
	at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:1500)
	at net.sourceforge.kolmafia.request.GenericRequest.execute(GenericRequest.java:1249)
	at net.sourceforge.kolmafia.request.GenericRequest.run(GenericRequest.java:1157)
	at net.sourceforge.kolmafia.request.RelayRequest.run(RelayRequest.java:1944)
	at net.sourceforge.kolmafia.request.CharPaneRequest.run(CharPaneRequest.java:123)
	at net.sourceforge.kolmafia.request.GenericRequest.processResponse(GenericRequest.java:1915)
	at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:1766)
	at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:1500)
	at net.sourceforge.kolmafia.request.GenericRequest.execute(GenericRequest.java:1249)
	at net.sourceforge.kolmafia.request.GenericRequest.run(GenericRequest.java:1157)
	at net.sourceforge.kolmafia.request.EquipmentRequest.run(EquipmentRequest.java:823)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:90)
	at net.sourceforge.kolmafia.SpecialOutfit.restoreCheckpoint(SpecialOutfit.java:250)
	at net.sourceforge.kolmafia.SpecialOutfit.restoreImplicitCheckpoint(SpecialOutfit.java:324)
	at net.sourceforge.kolmafia.moods.RecoveryManager.runBetweenBattleChecks(RecoveryManager.java:127)
	at net.sourceforge.kolmafia.webui.RelayAgent.readServerResponse(RelayAgent.java:430)
	at net.sourceforge.kolmafia.webui.RelayAgent.performRelay(RelayAgent.java:148)
	at net.sourceforge.kolmafia.webui.RelayAgent.run(RelayAgent.java:125)
 

Veracity

Developer
Staff member
My problem is fixed now in the newest daily build. Dunno about Bale's issue though.
No code was changed to "fix" your issue. In fact, exactly the same thing happened to me today: I was simply adventuring in the Relay Browser, and I noticed that my charpane was not updating. I looked and saw the same issue - setting the safety string was causing an NPE deep within Java's rendering of text.

Here is one which WAS generated by a charpane update after I increased a buff duration in the Skill frame:

Code:
class java.lang.NullPointerException: null
java.lang.NullPointerException
	at javax.swing.text.DefaultStyledDocument$ElementBuffer.create(DefaultStyledDocument.java:1308)
	at javax.swing.text.DefaultStyledDocument.create(DefaultStyledDocument.java:138)
	at javax.swing.text.html.HTMLDocument.create(HTMLDocument.java:281)
	at javax.swing.text.html.HTMLDocument$HTMLReader.flushBuffer(HTMLDocument.java:3323)
	at javax.swing.text.html.HTMLDocument$HTMLReader.flush(HTMLDocument.java:2127)
	at javax.swing.text.html.HTMLEditorKit.read(HTMLEditorKit.java:233)
	at javax.swing.JEditorPane.setText(JEditorPane.java:1499)
	at net.sourceforge.kolmafia.swingui.panel.AdventureSelectPanel$SafetyField.setSafetyString(AdventureSelectPanel.java:658)
	at net.sourceforge.kolmafia.swingui.panel.AdventureSelectPanel$SafetyField.run(AdventureSelectPanel.java:633)
	at net.sourceforge.kolmafia.KoLCharacterAdapter.updateStatus(KoLCharacterAdapter.java:60)
	at net.sourceforge.kolmafia.KoLCharacter.updateStatus(KoLCharacter.java:3901)
	at net.sourceforge.kolmafia.request.CharPaneRequest.processResults(CharPaneRequest.java:211)
	at net.sourceforge.kolmafia.request.GenericRequest.processResponse(GenericRequest.java:1802)
	at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:1767)
	at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:1501)
	at net.sourceforge.kolmafia.request.GenericRequest.execute(GenericRequest.java:1250)
	at net.sourceforge.kolmafia.request.GenericRequest.run(GenericRequest.java:1157)
	at net.sourceforge.kolmafia.request.RelayRequest.run(RelayRequest.java:1758)
	at net.sourceforge.kolmafia.request.CharPaneRequest.run(CharPaneRequest.java:133)
	at net.sourceforge.kolmafia.request.GenericRequest.processResponse(GenericRequest.java:1916)
	at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:1767)
	at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:1501)
	at net.sourceforge.kolmafia.request.GenericRequest.execute(GenericRequest.java:1250)
	at net.sourceforge.kolmafia.request.GenericRequest.run(GenericRequest.java:1157)
	at net.sourceforge.kolmafia.request.UseSkillRequest.useSkillLoop(UseSkillRequest.java:869)
	at net.sourceforge.kolmafia.request.UseSkillRequest.run(UseSkillRequest.java:737)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:189)
	at net.sourceforge.kolmafia.swingui.SkillBuffFrame$SkillBuffPanel.buff(SkillBuffFrame.java:202)
	at net.sourceforge.kolmafia.swingui.SkillBuffFrame$SkillBuffPanel.actionConfirmed(SkillBuffFrame.java:167)
	at net.sourceforge.kolmafia.swingui.panel.GenericPanel$ConfirmedListener.execute(GenericPanel.java:589)
	at net.sourceforge.kolmafia.swingui.listener.ThreadedListener.run(ThreadedListener.java:233)
	at net.sourceforge.kolmafia.RequestThread$ThreadWrappedRunnable.run(RequestThread.java:362)

Here is one after (during?) a fight:

Code:
class java.lang.NullPointerException: null
java.lang.NullPointerException
	at javax.swing.text.Utilities.isComposedTextElement(Utilities.java:836)
	at javax.swing.text.AbstractDocument.handleRemove(AbstractDocument.java:598)
	at javax.swing.text.AbstractDocument.remove(AbstractDocument.java:576)
	at javax.swing.JEditorPane.setText(JEditorPane.java:1493)
	at net.sourceforge.kolmafia.swingui.panel.AdventureSelectPanel$SafetyField.setSafetyString(AdventureSelectPanel.java:658)
	at net.sourceforge.kolmafia.swingui.panel.AdventureSelectPanel$SafetyField.run(AdventureSelectPanel.java:633)
	at net.sourceforge.kolmafia.KoLCharacterAdapter.updateStatus(KoLCharacterAdapter.java:60)
	at net.sourceforge.kolmafia.KoLCharacter.updateStatus(KoLCharacter.java:3901)
	at net.sourceforge.kolmafia.KoLCharacter.setEffectiveFamiliar(KoLCharacter.java:3589)
	at net.sourceforge.kolmafia.KoLCharacter.resetEffectiveFamiliar(KoLCharacter.java:3582)
	at net.sourceforge.kolmafia.request.FightRequest.clearInstanceData(FightRequest.java:4535)
	at net.sourceforge.kolmafia.request.FightRequest.updateRoundData(FightRequest.java:2358)
	at net.sourceforge.kolmafia.request.FightRequest.updateCombatData(FightRequest.java:1843)
	at net.sourceforge.kolmafia.request.GenericRequest.processResponse(GenericRequest.java:1825)
	at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:1767)
	at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:1501)
	at net.sourceforge.kolmafia.request.GenericRequest.execute(GenericRequest.java:1250)
	at net.sourceforge.kolmafia.request.GenericRequest.run(GenericRequest.java:1157)
	at net.sourceforge.kolmafia.request.RelayRequest.run(RelayRequest.java:1758)
	at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:189)
	at net.sourceforge.kolmafia.webui.RelayAgent.readServerResponse(RelayAgent.java:487)
	at net.sourceforge.kolmafia.webui.RelayAgent.performRelay(RelayAgent.java:148)
	at net.sourceforge.kolmafia.webui.RelayAgent.run(RelayAgent.java:125)
 

Veracity

Developer
Staff member
Hola submitted Revision 10423 which synchronizes updating the safety string. If this bug is caused by the Swing Thread and a Request Thread both trying to manipulate it, that should fix it, we hope. I'm going to optimistically mark this Fixed.
 
Top