Bug - Fixed Nullpointer-exception during session initialization

ereinion

Member
I got this error during the svn-updating when I logged into mafia:
Code:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
         KoLmafia v16.2 r13549, Windows 7, Java 1.7.0_51
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 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: Tue Jan 21 21:23:49 CET 2014
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Error during session initialization
class java.lang.NullPointerException: null
Unexpected error, debug log printed.
class java.lang.NullPointerException: null
java.lang.NullPointerException
    at net.sourceforge.kolmafia.svn.SVNManager.showCommitMessages(SVNManager.java:515)
    at net.sourceforge.kolmafia.svn.SVNManager.doUpdate(SVNManager.java:1258)
    at net.sourceforge.kolmafia.session.LoginManager.doLogin(LoginManager.java:114)
    at net.sourceforge.kolmafia.session.LoginManager.login(LoginManager.java:76)
    at net.sourceforge.kolmafia.request.LoginRequest.processLoginRequest(LoginRequest.java:439)
    at net.sourceforge.kolmafia.request.GenericRequest.handleServerRedirect(GenericRequest.java:1964)
    at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:1859)
    at net.sourceforge.kolmafia.request.GenericRequest.execute(GenericRequest.java:1513)
    at net.sourceforge.kolmafia.request.GenericRequest.run(GenericRequest.java:1408)
    at net.sourceforge.kolmafia.request.LoginRequest.run(LoginRequest.java:261)
    at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:280)
    at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:243)
    at net.sourceforge.kolmafia.swingui.LoginFrame$LoginPanel.doLogin(LoginFrame.java:343)
    at net.sourceforge.kolmafia.swingui.LoginFrame$LoginPanel.actionConfirmed(LoginFrame.java:299)
    at net.sourceforge.kolmafia.swingui.panel.GenericPanel$ActionConfirmListener.execute(GenericPanel.java:615)
    at net.sourceforge.kolmafia.swingui.listener.ThreadedListener.run(ThreadedListener.java:239)
    at net.sourceforge.kolmafia.RequestThread$ThreadWrappedRunnable.run(RequestThread.java:400)
Error during session initialization
I had opened the relay browser, I don't know if that could have something to do with it? Anyway here is the text from the gCLI preceding the error:
Code:
                Installing default certificate validation...
Validating login server      (www.kingdomofloathing.com)...
Skipping stale data override:      data/mallprices.txt
781 players online.
Sending login request...
Initializing      session for ereinion...
Refreshing session data...
Synchronizing      moon data...
Loading character status...
Retrieving character data...
Updating      inventory...
Examining Meat in closet...
Updating closet...
Retrieving      quest data...
Retrieving familiar data...
Familiar data retrieved.
Retrieving      campground data...
Visiting Hot Dog Stand in clan VIP lounge
You are      currently a member of Hardcore Oxygenation
Session data refreshed.
Initializing      chat interface...
8 days until Halloween, Muscle bonus tomorrow (not      today).
[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=1423012"]Mana Yachanichu[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=304486&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=2252851"]HighPriestessOfTinsel[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=304803&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=1565883"]KeltiThePastaQueen[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=292977&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=42356"]Framistan[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=304885&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=42356"]Framistan[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=304912&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=231760"]PSY[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=300758&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=231760"]PSY[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=300761&place=logs"]      just attacked you![/URL][/COLOR]

Updating all SVN projects...
[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=196078"]Hojo Hominygrits[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=303145&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=1919636"]Hoonk[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=297903&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=594066"]foobar[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=297884&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=48760"]AiluroDragon[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=297781&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=133632"]maceblade[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=297517&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=177122"]the Tristero[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=297102&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/messages.php"]New      message received from Pauling[/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=351116"]eusst[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=296252&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=174215"]bluespacething[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=296248&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=2264275"]Rabscuttle[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=302491&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=740739"]Shorebot Hojo      Hominygrits[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=302213&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green]BobbyCorno      challenged you to a [B][URL="http://kolmafia.us/clan_viplounge.php?action=pooltable"]game      of pool[/URL][/B], and beat you![/COLOR]

[COLOR=green][URL="http://kolmafia.us/messages.php"]New      message received from botticelli[/URL][/COLOR]

[COLOR=green][B][URL="http://kolmafia.us/showplayer.php?who=1699424"]botticelli[/URL][/B]      has given you a box of sunshine.[/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=1006121"]ShakenNotStirred[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=302136&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=1006121"]ShakenNotStirred[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=302133&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=614255"]GoldS[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=292772&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=1006121"]ShakenNotStirred[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=295274&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=231760"]PSY[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=294427&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=1052080"]bmaher[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=294684&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=231760"]PSY[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=294461&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=159367"]Bruce Garetz[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=294278&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=1083989"]antimarty[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=294101&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=568742"]kevbob[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=294081&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=1411675"]Mookster[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=301279&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=490413"]DerMagus[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=293084&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][B][URL="http://kolmafia.us/showplayer.php?who=287313"]MAi[/URL][/B]      has given you a box of sunshine.[/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=1450097"]Pantsless[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=300770&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=231760"]PSY[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=300736&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=771603"]NotJim[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=300656&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=114754"]Thisguy[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=292335&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=1423012"]Mana Yachanichu[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=292287&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=1740075"]PsyKeout[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=300308&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=1740075"]PsyKeout[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=300313&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=49418"]The Amazing Mr      Toothpaste[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=299852&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=1624833"]weas[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=299374&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=1905911"]QuintAVirus[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=298369&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=1919636"]Hoonk[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=305941&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=787676"]Gaknar[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=298006&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=2243444"]Johnny V[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=298514&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=594066"]foobar[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=305099&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=2031699"]Zots[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=304989&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=1083989"]antimarty[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=304874&place=logs"]      just attacked you![/URL][/COLOR]

[COLOR=green][URL="http://kolmafia.us/showplayer.php?who=788027"]TroyPolamalu[/URL][URL="http://kolmafia.us/peevpee.php?action=log&lid=304696&place=logs"]      just attacked you![/URL][/COLOR]

Validating repo...
Repo validated.
Updating      almighty-saplings-ash-trunk-raidlogs...
C:\Users\Audun\Program\KoLMafia\svn\almighty-saplings-ash-trunk-raidlogs
01/21/14      09:22:34 PM - [COLOR=green][URL="http://kolmafia.us/messages.php?box=Correspondence"]New      message[/URL][/COLOR] [COLOR=green]received from      GameInformPowerDailyPro.[/COLOR]
At revision 98
Done.
bale-counterchecker      is at HEAD (r10)
bale-ocd is at HEAD (r20)
bale-relay-campground is      at HEAD (r38)
bale-relay-Monster_Manuel_Improvement is at HEAD (r38)
bale-relay-shore      is at HEAD (r38)
bale-relay-topmenu is at HEAD (r38)
bale-relay-woods_questStart      is at HEAD (r38)
Validating repo...
Checking for updates (running [URL="http://kolmafia.us/showthread.php?t=2072"]ZLib[/URL]      rev. 17)...
Checking for updates (running [URL="http://kolmafia.us/showthread.php?t=2072"]ZLib[/URL]      rev. 17)...
Repo validated.
Updating bumcheekascend-bumdread...
C:\Users\Audun\Program\KoLMafia\svn\bumcheekascend-bumdread
At      revision 426
Done.
Validating repo...
Repo validated.
Updating      bumcheekascend-snapshot...
[COLOR=red]Character Info Toolbox has      become outdated. Automatically updating from SVN...[/COLOR]
C:\Users\Audun\Program\KoLMafia\svn\bumcheekascend-snapshot
At      revision 426
Done.
[COLOR=red]Character Info Toolbox has      become outdated. Automatically updating from SVN...[/COLOR]
Validating      repo...
clilinks is at HEAD (r5)
guyymafia-dreaddrunk is at HEAD      (r123)
guyymafia-porkfuture is at HEAD (r123)
guyymafia-tricktreat      is at HEAD (r123)
kolmafiascripts-cfstat is at HEAD (r2)
kolmafiascripts-shop      is at HEAD (r7)
mafia-harvest is at HEAD (r16)
mafia-harvest-data is      at HEAD (r3)
Validating repo...
Repo validated.
Updating      mafiachit...
C:\Users\Audun\Program\KoLMafia\svn\mafiachit
U      [URL]https://svn.code.sf.net/p/mafiachit/code/relay/charpane.ash[/URL]
[URL]https://svn.code.sf.net/p/mafiachit/code/relay[/URL]
[URL]https://svn.code.sf.net/p/mafiachit/code[/URL]
At      revision 115
Validating repo...
Pushing local updates...
charpane.ash      => C:\Users\Audun\Program\KoLMafia\relay\charpane.ash
Done.
Update      log for [B]mafiachit[/B]:
------
Repo validated.
Updating      mafiachit...
C:\Users\Audun\Program\KoLMafia\svn\mafiachit
At      revision 115
Done.
mafiarecovery is at HEAD (r4)
psychoseamatic      is at HEAD (r11)
relay-charsheet is at HEAD (r4)
rlbond86-mafia-scripts-auto_mushroom-trunk      is at HEAD (r31)
rlbond86-mafia-scripts-task_list-trunk is at HEAD (r31)
slimetube      is at HEAD (r4)
therazekolmafia-eatdrink is at HEAD (r19)
zlib is at      HEAD (r17)
Update log for [B]mafiachit[/B]:
------
Repo validated.
Updating      mafiachit...
C:\Users\Audun\Program\KoLMafia\svn\mafiachit
At      revision 115
Done.
Update log for [B]mafiachit[/B]:
------
Commit      [B]r114:
[/B]Author: balefull

Display number of remaining SGEEAs      in tooltip when clicking will use a SGEEA to remove an effect.
------
Commit      [B]r115:
[/B]Author: balefull

Creepypasted had an extra space      here where I've never seen more than 1 space for any other effect. Updated      regexp to recognize that possibility. KoL is amazingly inconsistent.
------
Error      during session initialization
Unexpected error, debug log printed.
[COLOR=green]On      ChIT's next invocation it will be up to date.[/COLOR]
[COLOR=green]On      ChIT's next invocation it will be up to date.[/COLOR]
 
Last edited:
Huh, that's odd. It says r14549 at the top of the main pane :P Didn't notice that the debug-log said something different. Which is probably caused by me opening the wrong debug-log >_< Terribly sorry about that, have updated the first post with the correct log... :P
 
... r14549 ...

This had me thinking you are a time traveller until I realized you already updated your OP with the correct debug log ;)
(that's after briefly thinking "and by hundred you mean thousand", but then I checked what's the latest revision :| )
 
You managed to fire off two svn update operations at the exact same time. I'll see if there's any way to prevent that, but in the meantime, don't do that.
 
You managed to fire off two svn update operations at the exact same time. I'll see if there's any way to prevent that, but in the meantime, don't do that.

I think that's a mafia issue, actually. Whenever I start up mafia (with the relay browser set to open automatically), I end up with 2 or 3 instances of CHIT updating. I assume that's because mafia is executing charpane.ash multiple times in parallel, and each instance sees that it needs updating. I've never tried looking into why that happens.
 
I have the option set so that all my SVN scripts are updated during login. I have noticed that there are several scripts that don't believe in user choice or that preference and will do a SVN update when invoked thus triggering an unnecessary update. If such a script is invoked multiple times before one update succeeds and the script sets its own "don't check again" that could be causing what is observed.

Almost want a semaphore on SVN update internally...
 
Yeah, I don't understand why scripts get to decide on their own that they need to be updated - and then go ahead and do it, regardless of my decision on whether I want to update them RIGHT NOW or not. If I want to update a script, I will do so - and if there are things in later versions that I specifically do not want to pull in, I am glad that I get to make that decision.

Makes me really leery of certain scripts, to be honest. Makes me want to uninstall them - even if I only have them installed to look at, not run.
 
I've already implemented a locking scheme so that only one (low-level) SVN operation can fire at a time; in this case there is a bit of a race condition with how I coded the show-commit-log function. Should be a one-in-a-million sort of thing but it can happen.

I really just need to make the locking coarser - the entire svn update operation should lock for its entirety and I should probably bounce other threads off the lock rather than letting them wait for it and then proceeding.

Fortunately Java 1.5 locks make this not a big deal. Let me try something.
 
r13565 makes svn update locking much coarser. If another thread tries to do an svn update while there is already one going on, we now kill the second one rather than letting it wait for the first one to finish.

This is a little awkward in that say a full "svn update" could get killed when only a "svn update <project>" is running but I don't think that's going to happen terribly often. People who have svn update on login will find that the full "svn update" fires before any relay-script-fired ones.

Also this should not affect CHIT since the svn_at_head function will wait nicely for the "svn update" operation to finish. Win-win.
 
zlib also checks for svn_at_head before doing an svn update, so that wasn't the cause either. Because zarqon based his function on my proposed code which went into ChIT. :)
 
zlib also checks for svn_at_head before doing an svn update, so that wasn't the cause either. Because zarqon based his function on my proposed code which went into ChIT. :)

The one problem with that code is that it assumes that if it gets called with a svn project that the script is installed via svn leading to, my case, increased hits towards the company firewall that blocks access to sourceforge. (I took to not copying the svn folder after it seemingly got corrupted after too many copies back and forth).
 
Yeah. It is blocked according to the following reason:
Reason: The category of Freeware and Shareware has been blocked by your System Administrator
 
Yeah. It is blocked according to the following reason:
Reason: The category of Freeware and Shareware has been blocked by your System Administrator

<rant>
I find such policies to be shortsighted and stupid and rooted in ignorance. However I do work for a software company that uses open source components in our software. Indeed KoLmafia at Sourceforge was accessed during my interview.
</rant>
 
I once interviewed at a job and they said I could not use any open source code off the web without getting it approved by another department that only did software approval. The reason was you couldn't trust the results of untested software and it might give bad data to clients. So I asked about an industry standard software which costs a fortune and is known to be pretty buggy, but has a total lock on a niche market, because they bought out everyone else in the niche. Of course that was approved for use.

Then again, after the sneaky crap CNET put on my machine, I can understand blocking some of those sites. I missed one check box and my computer was almost unusable. I heard SourceForge has also started including optional malware with it's downloads, but I don't download executables from SourceForge.
 
I heard SourceForge has also started including optional malware with it's downloads, but I don't download executables from SourceForge.

To continue the veer, there is a thread around here somewhere about SourceForge and bundleware, since KoLmafia is hosted there. At this point my recollection is that it is Opt In by a project administrator, only is an option of the distribution form is an executable installer and it is supposed to be A Good Thing because the providers of the Bundleware will pay the SourceForge project each time the bundle is downloaded. Here Be Dragons.
 
"Meddle not in the affairs of dragons, for you are crunchy and good with ketchup."

click
 
Back
Top