Bug - Not A Bug NullPointerException on Login

s1944

New member
Hi - am getting the following on attempting to login. It happens somewhat erratically but definitely every couple of days or so. Otherwise login works fine. I'm not sure but I think it is related to Mafia searching for a different login server if the initial lookup fails.
I would like to know how to avoid it, since it most often happens when I have Mafia running automatically when I am away.
Thanks.


Unexpected error, debug log printed.
class java.lang.NullPointerException: null
java.lang.NullPointerException
at net.sourceforge.kolmafia.request.LoginRequest.processLoginRequest(LoginRequest.java:414)
at net.sourceforge.kolmafia.request.GenericRequest.handleServerRedirect(GenericRequest.java:1644)
at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:1575)
at net.sourceforge.kolmafia.request.GenericRequest.execute(GenericRequest.java:1289)
at net.sourceforge.kolmafia.request.GenericRequest.run(GenericRequest.java:1180)
at net.sourceforge.kolmafia.request.LoginRequest.detectChallenge(LoginRequest.java:143)
at net.sourceforge.kolmafia.request.LoginRequest.run(LoginRequest.java:265)
at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:82)
at net.sourceforge.kolmafia.KoLmafiaGUI.initialize(KoLmafiaGUI.java:123)
at net.sourceforge.kolmafia.KoLmafia.main(KoLmafia.java:487)
 

Veracity

Developer
Staff member
What version are you running?

at net.sourceforge.kolmafia.request.LoginRequest.processLoginRequest(LoginRequest.java:414)
at net.sourceforge.kolmafia.request.GenericRequest.handleServerRedirect(GenericRequest.java:1644)

In the current codebase, GenericRequest.handleServerRedirect calls LoginRequest.processLoginRequest on line 1608, rather than line 1644, as on your stack trace.

Can I suggest that you update and try again?
 

Veracity

Developer
Staff member
I think it is related to Mafia searching for a different login server if the initial lookup fails.
Looking more closely at this - and looking at the source - this caught my eye.

KoLmafia has not "looked for a different login server" since revision 9927 on October 25 of last year for the simple reason that as of that date, KoL did not provide more than one login server; you HAVE to log in to www.kingdomofloathing.com. Looking at revision 9827 of GenericRequest.java - which happens to be the version included in release 14.8 - I see that line 1644 is a call to LoginRequest.processLoginRequest().

You are running stock 14.8. That is WAY obsolete and cannot be expected to work correctly with the current KoL servers.

Update to a current daily build.
 

s1944

New member
I am running the ' Latest EXE Build: KoLmafia.exe (Built Every Sunday at Midnight) ', which I download every Monday from http://builds.kolmafia.us/
Now that I look more closely, while it appears the data files in this exe get updated, the version of the current one looks to be r9875 - which is very old.
Shouldn't it be at least r10207?
 

Winterbay

Active member
The .exe-building process appears to be broken (for whatever reason), you can just use the .jar-files instead (in exactly teh same way as the .exe-file).
 

s1944

New member
When I use mafia the most is when I am away and it runs as a scheduled job.
Unfortunately, I can't get the job scheduler to run a jar file, just an exe file.

Any idea if the Sunday exe build will be fixed? Or when?

Thanks.
 

fronobulax

Developer
Staff member
When I use mafia the most is when I am away and it runs as a scheduled job.
Unfortunately, I can't get the job scheduler to run a jar file, just an exe file.

Any idea if the Sunday exe build will be fixed? Or when?

Thanks.

I find it interesting, bordering on hard to believe, that you can run an exe as a scheduled job but not a jar. Perhaps your task should be a batch file that contains the line "java -jar KoLmafia.jar" instead? Maybe Java is not correctly configured on your system?

If you are willing to set up a build environment, JSmooth is the tool used to create the exes so you could build one yourself.

I don't know if or when the Sunday exe build will be fixed or even why it is not working.
 
Top