Bug - Waiting for Info Mafia vs Java update

Veracity

Developer
Staff member
Well... I'm downloading the Java 1.8.0_121 JDK - the latest.
I'll see what, if any, issues I have with it.
Your DEBUG logs are bizarre.
 
Last edited:

Veracity

Developer
Staff member
Your DEBUG log says:

Code:
        KoLmafia v17.5 r17583, Windows 10, Java 1.8.0_111
My test:

Code:
bash-3.2$ java -jar KoLmafia-17.5.jar 

KoLmafia v17.5 r17696
Released on November 22, 2016

Currently Running on Mac OS X
Local Directory is /Users/xxx/Library/Application Support/KoLmafia
Using Java 1.8.0_121
It compiles and executes just fine with the latest Java 1.8 release.

So, when you say your "current version of java" isn't compatible, perhaps you really mean "your current installation of java".

Since you use Windows, I am afraid I have no clue about how to begin to help you.
 

lostcalpolydude

Developer
Staff member
Those debug logs look similar to what I occasionally see in NetBeans output, which tells me that I need to clear the cache for NetBeans to be able to run KoLmafia from it. I don't get a debug log when that happens, just text in NetBeans's Output window.

That probably doesn't help with fixing your situation, but I don't have any real suggestions.
 

fronobulax

Developer
Staff member
I'm running on Windows 10 with the latest Java so I don't think that is the cause of your problems.

I have seen similar errors when I have left plain vanilla KoL in a choice, logged or timed out and then and Kolmafia logs in.
 

fronobulax

Developer
Staff member
when I try logging in mafia never leaves the log in screen and if I try a next attempt to log in I get this: View attachment 8918 and here's the debug reportView attachment 8919

Wow. Much not to like in that log. A classic approach in support is to buy time by asking questions which might not be relevant but keep the customer busy and engaged so they think they are getting support. In that spirit do other Java programs run on your system? Anything out of the mainstream with your graphics? Adequate RAM and nothing hogging memory? Would you consider updating to a much more recent version of KoLmafia and trying again? There have been enough changes since the version you are running that it will be easier to diagnose if you upgrade.
 

ancient

New member
Wow. Much not to like in that log. A classic approach in support is to buy time by asking questions which might not be relevant but keep the customer busy and engaged so they think they are getting support. In that spirit do other Java programs run on your system? Anything out of the mainstream with your graphics? Adequate RAM and nothing hogging memory? Would you consider updating to a much more recent version of KoLmafia and trying again? There have been enough changes since the version you are running that it will be easier to diagnose if you upgrade.

Since version 17.6 released I not only downloaded it and today's most recent daily build but guess what:

newmafia.JPG View attachment DEBUG_20170119.txt and I only had windows and mafia running and still get the error
 

fronobulax

Developer
Staff member
Since version 17.6 released I not only downloaded it and today's most recent daily build but guess what:

View attachment 8921 View attachment 8922 and I only had windows and mafia running and still get the error

Thank you. I will look but I also wonder of this is related to this (AdventureFrame) in which case greater minds than mine are already looking at something that might fix this as well.

P.S. - If the issues are linked then I think unchecking Breakfast should give you a different result. Feel free to try that :)
 

ancient

New member
fronobulax I tried without breakfast but as can be seen here mafia_nobrkfst.JPG it didn't work, but from the wording I have a feeling they are related. I'm no techie but I'm willing to help try to get the info you wonderful people need to fix it. Is there anything else you can think of I can try to resolve it or something do to get the information you need to try to assist.
 

Veracity

Developer
Staff member
I also wonder of this is related to this (AdventureFrame) in which case greater minds than mine are already looking at something that might fix this as well.
No, the issue here has nothing to do with the Hatter Daily Deed.

Since version 17.6 released I not only downloaded it and today's most recent daily build but guess what: I only had windows and mafia running and still get the error
java.lang.NoClassDefFoundError: Could not initialize class net.sourceforge.kolmafia.persistence.AdventureDatabase
java.lang.OutOfMemoryError: Java heap space

Google leads me to:

java.lang.NoClassDefFoundError This exception indicates that the JVM looked in its internal class definition data structure for the definition of a class and did not find it. This is different than saying that it could not be loaded from the classpath. Usually this indicates that we previously attempted to load a class from the classpath, but it failed for some reason - now we're trying to use the class again (and thus need to load it, since it failed last time), but we're not even going to try to load it, because we failed loading it earlier (and reasonably suspect that we would fail again). The earlier failure could be a ClassNotFoundException or an ExceptionInInitializerError (indicating a failure in the static initialization block) or any number of other problems. The point is, a NoClassDefFoundError is not necessarily a classpath problem.
Indicating that we tried to load AdventureDatabase and it failed and later when we tried building AdventureFrame, it gave up.

In order to figure this out, we'd need to see why AdventureDatabase failed to load.

In your "data" folder, do you have adventures.txt, zonelist.txt, and/or combats.txt?

Delete them and try again.
 

Veracity

Developer
Staff member
How are you executing the .jar file? Can you try it from a command line, rather than via double click? I'd like to see if anything else was printed out there. Like another stack trace. For some reason, they don't always go to the DEBUG log.
 

fronobulax

Developer
Staff member
Thank you. I didn't figure out anything relevant yet. FWIW, AdventureDatabase has a some static initialization that includes file I/O. Some of my reading said that a ClassNotFound can occur if static initialization throws an exception that is not handled.
 

fronobulax

Developer
Staff member
Bump. Still a problem?

We were hoping you would run from a command window/line because a possible cause for what you observed is untrapped exceptions. Running in a command line should have those exceptions appear in the window and once we know what they are then we have a better crack at debugging for you.
 

kadafan

New member
I started having problems too. A version of KoL mafia that previously worked no longer does:

Currently Running on Linux
Local Directory is /home/nimbus/.kolmafia
Using Java 1.8.0_111

#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fd90371eb84, pid=25878, tid=0x00007fd8dd93e700
#
# JRE version: OpenJDK Runtime Environment (8.0_111-b16) (build 1.8.0_111-b16)
# Java VM: OpenJDK 64-Bit Server VM (25.111-b16 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libc.so.6+0x90b84] __memcpy_sse2_unaligned_erms+0x1a4

edit: Installing Oracle JRE seems to resolve this problem. OpenJDK that comes with a base linux install sometimes falls a bit short.
 
Last edited:

fronobulax

Developer
Staff member
edit: Installing Oracle JRE seems to resolve this problem. OpenJDK that comes with a base linux install sometimes falls a bit short.

I have a dim recollection that this is a known but not always remembered issue. I do not recall that anyone every figured out what KoLmafia did that did not make OpenJDK happy and the motivation to do so is somewhat low. Glad you figured it out.
 

heeheehee

Developer
Staff member
How odd. I've been running OpenJDK exclusively for a number of years (currently using version 1.8.0_121), and I haven't encountered this issue.
 

fronobulax

Developer
Staff member
I added a message to some previously empty catch blocks in r17747 Most of them were from file closes which are almost never a problem but just in case the OP is willing and able to help track this down, they are there now.

On OpenJDK, this Google search ("site:kolmafia.us OpenJDK") brings back many things that I remember. This thread, for example notes something that mafia "discovered" that actually was bug in OpenJDK 1.6 and not fixed until 1.7. That said ost of the concerns with OpenJDK would seem to be at least a couple years old.
 
Top