Crashing on trying to switch to OpenGL mode #12

Closed
z0w0 opened this Issue Mar 11, 2013 · 23 comments

4 participants

@z0w0

I've been having this issue with the official client as well, but I know that this client fixes the linker's paths. Not sure why it's still not working for me. ArchLinux 64-bit, using openjdk7. @HikariKnight

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGILL (0x4) at pc=0x00007f109f243b60, pid=15070, tid=139709183727360
#
# JRE version: 7.0_15-b20
# Java VM: OpenJDK 64-Bit Server VM (23.7-b01 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libGL.so.1+0x308b60]  glGenBuffersARB+0x0
#
# Core dump written. Default location: /home/zack/runescape/bin/core or core.15070
#
# An error report file with more information is saved as:
# /home/zack/runescape/bin/hs_err_pid15070.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
#   http://icedtea.classpath.org/bugzilla
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
sh: line 1: 15070 Aborted                 (core dumped) LD_LIBRARY_PATH=/usr/lib/jvm/java-7-openjdk/jre/bin/../lib/amd64/ /usr/lib/jvm/java-7-openjdk/jre/bin/java -cp jagexappletviewer.jar -Dcom.jagex.config=http://world68.runescape.com/k=3/l=0/jav_config.ws -Xmx512m -Xss2m -Dsun.java2d.noddraw=true jagexappletviewer /share 2>&1```
@HikariKnight

hello @z0w0
could you tell me what graphic card you use and which driver?
if it is an opensource driver (excluding intel) then i would advise you to change to the proprietary driver since those handles 3d graphics better than the opensource driver, which may not work with runescape.

also if possible could you include the contents of
/home/zack/runescape/bin/hs_err_pid15070.log

PS: your post was at 1am my time which is why it took 5 hours to get a reply :P

@z0w0

I'm running the proprietary NVIDIA drivers (313.26) on a GTX 670M card. The contents: http://pastebin.com/hYd9F3mW

@HikariKnight

@z0w0
ahh is that one of those nvidia optimus cards, according to nvidias homepage, it is? (if so, did you use bumblebee to install the driver?)
as using optirun from bumblebee is not advised as it confuses the opengl library bindings that jagex uses.

if you happen to have bumblebee 4.0.0 installed then you can tell optirun to use the primus bridge (must disable primus inside the client settings as i need to make the primus function compatible with the new optirun for that to work)

if youre using an older version of bumblebee then you must manually install primus following the steps in my tech video http://www.youtube.com/watch?v=hgBa5L9pZeM

@z0w0

It's normally used with optimus, but it's just my dedicated GPU on this laptop. No integrated cards.

@HikariKnight

@z0w0
that is odd then because it should work :o
can you confirm that the driver is actually activated?
and check the display section in "hardinfo" and check if opengl vendor reports nvidia

also if possible install java inside wine and see if the clients opengl setting works through that (feel free to remove wine and/or java from wine once done testing)

@z0w0

There's definitely nothing wrong with the drivers, all OpenGL games still work. It works fine in WINE.

@HikariKnight

seeing as it works in wine leaves you with a last resort solution if we cannot figure this out atm. However could there be a possibility that openjdk dont like your graphic card or the jagexcache could be corrupted.

could you try deleting(or move) the jagexcache and see if it helps. if it doesnt then download the tar.gz archive containing java from java.com and tell the client to use the java binary from that.

If you dont know how to tell the client to use a different java just change the value of
preferredjava

inside $client/share/settings.conf or if you installed through AUR inside ~/.config/runescape/share

@HikariKnight

@z0w0
been busy the last weeks and i just noticed i forgot to do an @ name in the reply
did you check back on my reply and are you still having the issue?
i will leave this open for 3 weeks, if i do not get a reply i will mark this as solved and close the ticket
happy easter :)

@thekalio

@HikariKnight I have this exact same issue. I have NVIDIA GeForce GT 330M, and I'm using the proprietary drivers 313.30. I'm also on Arch Linux 64-bit using openjdk7. This error only occurs after upgrading to Mesa 9.1, so that is definitely the culprit. I had to downgrade to Mesa 9.0.2 to continue playing RS. I don't remember exactly when Mesa 9.1 was pushed to the Arch repos, but I bet it was exactly when this bug was opened. Here's my error anyways:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGILL (0x4) at pc=0x00007f3623fe5b60, pid=2237, tid=139870337959680
#
# JRE version: 7.0_17-b02
# Java VM: OpenJDK 64-Bit Server VM (23.7-b01 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libGL.so.1+0x308b60]  glGenBuffersARB+0x0
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/brad/.config/runescape/bin/hs_err_pid2237.log

I would really like to find a fix for this, as I don't know how long I can keep Mesa 9.0.2 until things start breaking.

@z0w0 The Mesa update I am referring to removed the following packages: khrplatform-devel, libegl, libgbm, and
libglapi. Also, cairo 1.12.14 was released at the same time as it depends on Mesa 9.1. To downgrade, go to /var/cache/pacman/pkg/ and look for the following files:

cairo-1.12.12-1-x86_64.pkg.tar.xz
khrplatform-devel-9.0.2-1-x86_64.pkg.tar.xz
libegl-9.0.2-1-x86_64.pkg.tar.xz
libgbm-9.0.2-1-x86_64.pkg.tar.xz
libglapi-9.0.2-1-x86_64.pkg.tar.xz
mesa-9.0.2-1-x86_64.pkg.tar.xz

Install all of those using pacman -U. This will downgrade Mesa to 9.0.2, and cairo to 1.12.12. It will also bring back the four packages that Mesa 9.1 replaced.

@HikariKnight
Owner

@thekalio
i think the only solution would then be to force java to use older libraries by adding them to LD_LIBRARY_PATH, which is not a pretty solution and not really a recommended one, but we dont have much choice if this is forced upon us, plus i would have to edit a line in the opengl.pm file in the rsu source to enable you to add stuff to LD_LIBRARY_PATH (right now it overwrites it so that if you by any reason have managed to get a malicious program on your system it wont be able to infect the client with LD_LIBRARY_PATH).
kalio since you already got my email mind helping me test this if you got a spare pc or partition.
also out of the removed packages i think libegl and libglapi is required for opengl

@thekalio

@HikariKnight I don't exactly have a spare box or partition right now. Couldn't I test on my current install? How are you thinking of modifying LD_LIBRARY_PATH? Having the old packages installed alongside the new Mesa (in a separate directory) and telling RS to use the old libs?

@HikariKnight
Owner

@thekalio
exactly, i have low expectations but it is worth a shot.
i just pushed the change needed into the development branch.
you can get the dev branch from here
https://github.com/HikariKnight/rsu-client/archive/development.zip

cd into the directory and try these and see if any of them work
LD_LIBRARY_PATH=/path/to/old/mesa/ ./runescape
LD_LIBRARY_PATH=/path/to/old/mesa/ ./rsu/rsu-query client.launch.launcher
LD_LIBRARY_PATH=/path/to/old/mesa/ ./rsu/rsu-query client.launch.runescape

@thekalio

Sorry this response took so long... @HikariKnight

No luck. Same exact error. :(

EDIT: Hold on, I'm looking at the dynamic libraries in the Java error log to make sure it's loading the ones from my backup directory...

Okay... so after modifying the LD_LIBRARY_PATH variable like you said, it continued to load the libraries from /usr/lib, and it proceeded to crash as usual. However, after running # ldconfig /path/to/old/libs to generate needed files in /path/to/old/libs, then # ldconfig to reset the cache and stuff to point back to the system libs, I ran LD_LIBRARY_PATH=/path/to/old/libs/ ./rsu/rsu-query client.launch.runescape and it loaded the libs from /path/to/old/libs and worked!! Then I narrowed the libraries down 1 by 1... the only thing I need to load from /path/to/old/libs is libcairo.so.2. libGL.so must be using a libcairo operation that changed from cairo 1.12.12 to 1.12.14.

So, to fix, just run the ldconfig lines as I described above, with libcairo.so in /path/to/old/libs, then LD_LIBRARY_PATH=/path/to/old/libs/ ./runescape and you're golden!!!!! I'm so happy! Thank you @HikariKnight ! :)

^ @z0w0 solution ^

@HikariKnight

omg that is great news! i will mark this as solved and wait for a response from @z0w0
however i will close this in 2 weeks if no reply.

i would suggest generating a package with libcairo1.12.12 then for those that have the same issue :p
might be something that @ivanpu could help with as i have no idea how aur packaging is :)

@ivanpu
Collaborator

OK, I'll take a look at this.

@ivanpu
Collaborator

@thekalio, what cairo does it work for you with?
1.12.12-1 or 1.12.12-2?

@thekalio

1.12.12-1. All that's needed is /usr/lib/libcairo.so from the package. (and the ldconfig tricks as I explained; on my system this just creates the symlink libcairo.so.2 -> libcairo.so, but I don't know much about linkers so I'm not sure if this will be true for all systems)

@HikariKnight

@ivanpu
just incase you havent seen thekalio's comment yet :P

@ivanpu
Collaborator

@HikariKnight, thanks.

I'll check if it's the same issue, that I've found yesterday.

@ivanpu
Collaborator

@thekalio, I think that invoking ldconfig -n /path/to/old/libs would be more safe - it will not change cache, and hence there'll not be the need to restore it.

I've rebuilt the 1.12.12-1 package.
Just something I've noticed:
1.12.12-2 have added gl/egl support, and it is still enabled in 1.12.14.

In the package I have libcairo.so and libcairo.so.2, both are symlinks to libcairo.so.2.11200.14.
Putting them in separate directory, and passing that via LD_LIBRARY_PATH, eliminated the crash on OpenJDK7.
There was no need for me to use ldconfig.

@HikariKnight, is there a place in launcher directories, that I can store those 3 files?
Like in /opt/runescape/somewhere?

@ivanpu
Collaborator

@thekalio, your problem is fixed here: cairo-nogl
It indeed was the added support of GL/EGL.

@ivanpu
Collaborator

@z0w0, you too: look at previous message :)

@HikariKnight

thanks ivan, this ticket will now be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment