Bug - Not A Bug I do have a cold, so, it could just be my stupid fogged up brain...

snooty

Member
Ok, updated mafia to r19579. I can log in, but mafia disappears (like normal) then just never reappears (super not like normal). So I update java after checking game play forum. Couldn't remember where to find an old version of mafia to download, but a friend helped me get an older java version. I can log in now, but, I have to jump through hoops for every iteration. Ok, one hoop, so far. It seems if I log in, then open the gCLI, mafia will start like normal. After ten or twelve times of doing this. I apologize in advance if this is something super simple that I'll kick myself once I know how to fix it, and thanks for taking the time to read this :)
 

Attachments

  • DEBUG_20191006.txt
    9.7 KB · Views: 42

Veracity

Developer
Staff member
So I update java after checking game play forum. Couldn't remember where to find an old version of mafia to download, but a friend helped me get an older java version.
Why did you want an old version of Java? We recommend you use a current (new) version of java.

It seems if I log in, then open the gCLI, mafia will start like normal.
What do you mean "if you log in"? What you mean "then open the gCLI"? Logging in creates the Main Frame with various tabs under it. These are the defaults:

AdventureFrame
CommandDisplayFrame <- gCLI
MallSearchFrame
GearChangeFrame
SkillBuffFrame

Interesting. I have Preferences and not the Gear Changer, but, in any case, the gCLI should be created when building the main frame.
Have you changed the initial set of frames to NOT have the gCLI (which you can do via Preferences -> Look & Feel -> Main Interface)?

By "logging in and then opening the gCLI", do you mean "at the Login frame, open the gCLI from the menu bar, and THEN log in"?

Your log sure is weird. It is getting exceptions while creating the gCLI - apparently, from the menu. The deepest exception is this:

Code:
Caused by: java.lang.NullPointerException
	at net.sourceforge.kolmafia.KoLCharacter.getMonsterLevelAdjustment(KoLCharacter.java:2747)
	at net.sourceforge.kolmafia.MonsterData.ML(MonsterData.java:533)
	at net.sourceforge.kolmafia.MonsterData.getAttack(MonsterData.java:644)
	at net.sourceforge.kolmafia.AreaCombatData.addMonsterStats(AreaCombatData.java:246)
	at net.sourceforge.kolmafia.AreaCombatData.addMonster(AreaCombatData.java:389)
	at net.sourceforge.kolmafia.persistence.AdventureDatabase.refreshCombatsTable(AdventureDatabase.java:337)
	at net.sourceforge.kolmafia.persistence.AdventureDatabase.<clinit>(AdventureDatabase.java:114
	... 47 more
Since that happens deep within frame creation, the frame is not created. Here is KoLCharacter:2747

Code:
		return (int) KoLCharacter.currentModifiers.get( Modifiers.MONSTER_LEVEL ) +
			KoLCharacter.getWaterLevel() * 10;
Apparently KoLCharacter.currentModifiers is null? Which seems impossible; it is initialized like this and never changed:

Code:
	private static final Modifiers currentModifiers = new Modifiers();
Considering this happens to you and only to you, hard to debug.

I suggest that you get a NEW version of Java.

If you want to find earlier builds of KoLmafia, here are all the earlier builds. Not necessarily easy to find exactly the earlier one you want, but clicking on a "Build" link will tell you what changed from the previous version.
 

snooty

Member
Sorry it's been so long, I haven't had much time for anything other than getting stuff done. I still don't, but now if I try to run two instances of mafia concurrently (new build, updated java) it maxes the CPU and shuts the computer down entirely.

I had no idea if the root of the problem was mafia, or java. When one thing didn't work, I tried another. And yes, I do not have a gCLI tab open when I start mafia, I don't generally use it that often. I opened a tab to see if there were any error messages when I was logging in (hit login first, actually, then opened the gCLI window), got no error messages, mafia returned as normal, so I just kept going with that. Which obviously won't work anymore since the computer is now shutting down with two open instances.
 

fronobulax

Developer
Staff member
I am on a Windows box. I normally just double click on the jar file and trust the file associations to start things up. But sometimes, when things are really weird I try something different.

I open an operating system level command line (or console or terminal or DOS box) and change it so that its current directory is the one containing the mafia jar. I then start by typing the command "java -jar Kolmafia-xxxxx.jar" replacing xxxxx with the version number of the jar I am running. This is useful because there are some start up messages from Java that never make it to mafia's gCLI and some messages from mafia that never make it there either. Sometimes they have told me about a problem I did not know I had. Some of those messages have lead to fixes for problems.

I can start mafia and have my computer shutdown almost immediately. That is because it is a laptop and the battery sucks (because of age). A fully charged battery holds about 30 minutes. I start up, having forgotten to plug in, start mafia, the CPU usage goes up, the power prediction thinks it has about 15 seconds left at that level of operation and goes into a hard save and shutdown. I don't have the problem when I remember to plug the computer in first.

I am running two instances now and the machine is being hit hard enough that the fan has kicked in but Dropbox is getting more CPU than both Java instances combined. That makes sense but suggests it is not mafia/java alone that is stressing my system. I have not triggered a thermal shutdown but I have come close.

All this is to speculate that you might have a hardware issue that becomes visible when running mafia.
 
Top