views:

68

answers:

3
+1  Q: 

IcedTea and lwgjl

I have recently found myself on a Linux computer and am liking it so far.

However, I have been having an issue and dont really know the source. I am trying to make a java project that uses lwjgl in eclipse (something I have done in windows) but when I run the code my display window comes up black and blinking and I get this error report-

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f5004c70c98, pid=10427, tid=139981673781008
#
# JRE version: 6.0_18-b18
# Java VM: OpenJDK 64-Bit Server VM (16.0-b13 mixed mode linux-amd64 )
# Derivative: IcedTea6 1.8.1
# Distribution: Ubuntu 10.04 LTS, package 6b18-1.8.1-0ubuntu1
# Problematic frame:
# C  [libX11.so.6+0x37c98]  XQueryExtension+0x28
#
# An error report file with more information is saved as:
# /home/jeff/workspace/SpinDodge3/hs_err_pid10427.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/
#

I have the sun java 6 jdk installed and I have tried pointing eclipse to that using the -vm command but this error is the same. Java projects not using lwjgl work. Is this because I am using lwjgl wrong, the way it interacts with icedTea (something which the -vm command seems to do nothing for), eclipse? I have no idea where to even start.

Has anybody here used lwgjl in Linux, do they have any ideas?

Thankyou

(also I can post the error log but it is pretty long, I dont know how much help it will be)

EDIT: After I changed the jdk in use it runs but only for one frame and then crashes with this error-

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fbfd4fb7c98, pid=2060, tid=140461906126608
#
# JRE version: 6.0_20-b02
# Java VM: Java HotSpot(TM) 64-Bit Server VM (16.3-b01 mixed mode linux-amd64 )
# Problematic frame:
# C  [libX11.so.6+0x37c98]  XQueryExtension+0x28
#
# An error report file with more information is saved as:
# /home/jeff/workspace/SpinDodge3/hs_err_pid2060.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

Any ideas?

A: 

You are not executing with the Sun JVM but with the OpenJDK, and there are subtle differences. Switch Ubuntu to use the Sun JVM and try again.

Thorbjørn Ravn Andersen
Ok, thats what I was trying to do with the Eclipse -vm option but obviously that did nothing (I have both installed currently because chromium needs the Sun JVM as well).After work today I will try removing the OpenJDK all together so there can be no confusion and report back.Thankyou in advance!
Jeff
A: 

Run sudo update-java-alternatives -l to see the different versions of Java on your system. Then run sun update-java-alternatives -s [java type] to set it as the default, which binds it to the commands java, javaw, etc.

In your case, you should run sudo update-java-alternatives -s java-6-sun as mentioned on the Java Community Documentation page.


Well it looks like Java isn't the problem. You should read about SIGSEGV and XQueryExtension; it looks like your Xlib or X11 is to blame.

If I were you, at this time I would follow the instructions; go to https://bugs.launchpad.net/ubuntu/+source/openjdk-6/ and submit a bug report, paste this error and attach the logfile (/home/jeff/workspace/SpinDodge3/hs_err_pid10427.log). See if the experts can redirect you to exactly where the problem lies.

Also, of course, make sure your system is updated. You don't want to report a bug that has already been fixed.

Ricket
Yes this worked (actually it turned out I only had the sun Java 6 jre but it was easy to get the jdk)! Thank you so much, this way I didst have to go through the hassle of removing the openJDK.
Jeff
sudo update-alternatives --config java is what ended up working, found on the link you posted.
Jeff
Oh man I am so sorry, I thought this worked (it seemed to at first). It did change my version of java but I am still getting an error.
Jeff
A: 

As far as I can tell this is an error with eclipse and openGL in Ubuntu 10.04. It happens regardless of the jdk used (I have tried both). However, I have figured out that this error is only thrown when the program closes and was not causing the problems I saw with the lwjgl rendering. Except for the build-up of error logs just ignoring this error has caused me no problems so far.

Jeff