jME Crashes on Linux

Hello,



I am trying to get jMonkeyEngine SDK running on my Linux Mint x64. But every time I try to resize the OpenGL window it crashes or freezes. Now I’ve read that OpenJDK isn’t supported so I thought that would be the problem. I downloaded and installed the JDK and figured out how to change Java platform. But I can’t select a non-OpenJDK platform. How do I use the sun JDK?







Thanks!

http://i.imgur.com/pXUAh.png

Darn…

Thats not what you want to do, you want to change the location of the JDK the SDK is being run with in (application folder)/jmonkeyplatform/etc/jmonkeyplatform.conf

@normen said:
Thats not what you want to do, you want to change the location of the JDK the SDK is being run with in (application folder)/jmonkeyplatform/etc/jmonkeyplatform.conf


Alright. So in jmonkeyplatform.conf I want to set "jdkhome="/path/to/jdk". Do you know what directory that should be? I don't know where the JDK is located.
@gyrth said:
Alright. So in jmonkeyplatform.conf I want to set "jdkhome="/path/to/jdk". Do you know what directory that should be? I don't know where the JDK is located.


Not sure where Linux Mint install stuff but Isn't that what you are showing in your image? /jvm/java-6-sun
@jmaasing said:
Not sure where Linux Mint install stuff but Isn't that what you are showing in your image? /jvm/java-6-sun


I Set: "--jdkhome=/etc/java-6-sun" but I'm not sure that is the directory.

The About still says OpenJDK

Product Version: jMonkeyEngine SDK 3.0beta
Java: 1.6.0_22; OpenJDK 64-Bit Server VM 20.0-b11

In my Ubuntu install the sun java 6 is located in /usr/lib/jvm/java-6-sun (actually that’s a link, but it should point to your install).

I’ve downloaded jdk-7u3-linux-x64.tar.gz

Did “tar zxvf jdk-7u3-linux-x64.tar.gz” and it made a folder jdk1.7.0_03

Set --jdkhome=/home/gyrth/Downloads/jdk1.7.0_03 in jmonkeyplatform.conf



When starting jME SDK it still says Java: 1.6.0_22; Weird because I pointed to jdk1.7.0_03

It still crashes and freezes

And what about OpenJDK 64-Bit Server VM 20.0-b11. Does this also have to be sun sdk?

@Tumaini said:
In my Ubuntu install the sun java 6 is located in /usr/lib/jvm/java-6-sun (actually that's a link, but it should point to your install).

/usr/lib/jvm/java-6-sun and /etc/java-6-sun is the same folder but it still says

Product Version: jMonkeyEngine SDK 3.0beta
Java: 1.6.0_22; OpenJDK 64-Bit Server VM 20.0-b11

Now am I running Sun SDK or OpenSDK?

Well, on my system /etc/java-6-sun is not a symlink nor does /usr/lib/jvm/java-6-sun link to that folder (it links to /usr/lib/jvm/java-6-sun-1.6.0.26).

Is there a bin folder in your /etc/java-6-sun?

If not, you probably want /usr/lib/jvm/java-6-sun.



EDIT: If it doesn’t work, try downloading jdk1.7.0_u3 from Oracle’s website.

The jME SDK was crashing on me at startup after the first startup after booting the computer, but after downloading Oracle’s latest JDK 1.7 and pointing the conf-file to that, it works well again.

@Tumaini said:
Well, on my system /etc/java-6-sun is not a symlink nor does /usr/lib/jvm/java-6-sun link to that folder (it links to /usr/lib/jvm/java-6-sun-1.6.0.26).
Is there a bin folder in your /etc/java-6-sun?
If not, you probably want /usr/lib/jvm/java-6-sun.

EDIT: If it doesn't work, try downloading jdk1.7.0_u3 from Oracle's website.
The jME SDK was crashing on me at startup after the first startup after booting the computer, but after downloading Oracle's latest JDK 1.7 and pointing the conf-file to that, it works well again.


Yes. I've downloaded the latest SDK and pointed --jdkhome=/home/gyrth/Downloads/jdk1.7.
Shouldn't the About say that it's running Java 1.7? It still says Java: 1.6.0_22.
And it still crashing and freezing when resizing the OpenGl Window.
gyrth@gyrth-LinuxMint ~ $ "/home/gyrth/jmonkeyplatform/bin/jmonkeyplatform"
/home/gyrth/jmonkeyplatform/bin/../etc/jmonkeyplatform.conf: 11: --jdkhome=/home/gyrth/Downloads/jdk1.6.0_31: not found
Unknown option -Dsun.java2d.noddraw=true
The program '' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
(Details: serial 12305 error_code 8 request_code 143 minor_code 4)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fee3247ba38, pid=6454, tid=140661054535424
#
# JRE version: 6.0_22-b22
# Java VM: OpenJDK 64-Bit Server VM (20.0-b11 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea6 1.10.6
# Distribution: Ubuntu 11.04, package 6b22-1.10.6-0ubuntu1
# Problematic frame:
# C [libnvidia-glcore.so.270.41.06+0xd43a38] ftell+0xd43a38
#
# An error report file with more information is saved as:
# /home/gyrth/hs_err_pid6454.log
#
# If you would like to submit a bug report, please include
# instructions how to reproduce the bug and visit:
# https://bugs.launchpad.net/ubuntu/+source/openjdk-6/
#
/home/gyrth/jmonkeyplatform/bin/../platform/lib/nbexec: regel 548: 6454 Afgebroken "/usr/lib/jvm/java-6-openjdk/bin/java" -Djdk.home="/usr/lib/jvm/java-6-openjdk" -classpath "/home/gyrth/jmonkeyplatform/platform/lib/boot.jar:/home/gyrth/jmonkeyplatform/platform/lib/org-openide-modules.jar:/home/gyrth/jmonkeyplatform/platform/lib/org-openide-util.jar:/home/gyrth/jmonkeyplatform/platform/lib/org-openide-util-lookup.jar:/usr/lib/jvm/java-6-openjdk/lib/dt.jar:/usr/lib/jvm/java-6-openjdk/lib/tools.jar" -Dnetbeans.system_http_proxy="DIRECT" -Dnetbeans.system_http_non_proxy_hosts="" -Dnetbeans.dirs="/home/gyrth/jmonkeyplatform/bin/../jmonkeyplatform:/home/gyrth/jmonkeyplatform/bin/../extra:/home/gyrth/jmonkeyplatform/bin/../ide:/home/gyrth/jmonkeyplatform/bin/../java:" -Dnetbeans.home="/home/gyrth/jmonkeyplatform/platform" '-Xms24m' '-Xmx512m' '-XX:PermSize=256m' -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="/home/gyrth/.jmonkeyplatform/3.0beta/var/log/heapdump.hprof" org.netbeans.Main --userdir "/home/gyrth/.jmonkeyplatform/3.0beta" "--branding" "jmonkeyplatform" "-Dsun.java2d.noddraw=true" "-Dsun.awt.noerasebackground=true" "-Dsun.java2d.d3d=false" "-Dsun.java2d.opengl=false" "-Dsun.java2d.pmoffscreen=false" 0<&0


This is what happens when running it in terminal. It's the same when using #--jdkhome=/home/gyrth/Downloads/jdk1.6.0_31 as --jdkhome=/home/gyrth/Downloads/jdk1.6.0_31
I think it is still using OpenJDK. How do I make it use Sun JDK?

I don’t know why your install still uses your OpenJDK version, for me it works fine to change the jdkhome="/path/to/jdk" to jdk1.7 and the About reflects the change. Are you changing that line in the conf-file and removing the “#” or are you passing the parameter another way?

Is there a bin folder directly in the jdk folder you’re pointing it to?



As you’re running an Ubuntu derivative, you could try this method of updating java for your whole system: How To Install Oracle Java 7 (JDK) In Ubuntu ~ Web Upd8: Ubuntu / Linux blog

@Tumaini said:
I don't know why your install still uses your OpenJDK version, for me it works fine to change the jdkhome="/path/to/jdk" to jdk1.7 and the About reflects the change. Are you changing that line in the conf-file and removing the "#" or are you passing the parameter another way?
Is there a bin folder directly in the jdk folder you're pointing it to?

As you're running an Ubuntu derivative, you could try this method of updating java for your whole system: http://www.webupd8.org/2011/09/how-to-install-oracle-java-7-jdk-in.html


I put this in the conf file
# default location of JDK/JRE, can be overridden by using --jdkhome switch
--jdkhome=/home/gyrth/Downloads/jdk1.7.0_03

And yes there is an bin folder in the jdk1.7.0_03 folder.

I'll try to update now then.

Why would the installed JDK be under “Downloads”? oO Maybe you just point at the unzipped install folder?

@normen said:
Why would the installed JDK be under "Downloads"? oO Maybe you just point at the unzipped install folder?

Shouldn't that just work?

I've updated to JDK 7 using PPA.
Put the # back in the conf file.
Whole pc froze when starting jME. HAd to reset and wait ages for it to repair.

I'm ready to give up.

…also, did you remove the “#” in front of the jdkhome parameter?

Edit: Anyway, if your PC freezes its definitely a driver/system issue. No OS freezes because an application does something wrong.

@normen said:
..also, did you remove the "#" in front of the jdkhome parameter?
Edit: Anyway, if your PC freezes its definitely a driver/system issue. No OS freezes because an application does something wrong.

After updating and putting back the # it should use the JDK 7 right? Well it doesn't. Still says

Product Version: jMonkeyEngine SDK 3.0beta
Java: 1.6.0_22; OpenJDK 64-Bit Server VM 20.0-b11

So its not correctly set, either the folder is in fact not the JDK but the installer or its wrongly set. Note there is no “-” or “#” or anything in front of that line:



If its not set the JDK that is configured via your PATH environment variable is used.

As I said shouldn’t

# default location of JDK/JRE, can be overridden by using --jdkhome switch
#--jdkhome="path/to/dir"

result in jME using the system version of JDK?
Wich in my case is
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b04)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)