PDA

View Full Version : NVIDIA drivers 1.0.4191 with GL4Java problem


sztejkat
03-22-03, 07:27 AM
Hi,
I have some problems with nvidia drivers while using GL4Java JAVA to OpenGL bridge library. Simple any program, which trys to use GLAnimCanvas (an animation thread approach), including examples which comes with GL4Java crashes with:
--------------------------
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x4C97E188
Function=__nvsym17103+0x0
Library=/usr/lib/libGL.so

Current Java thread:
at gl4java.GLContext.gljMakeCurrentNative(Native Method)
at gl4java.GLContext.gljMakeCurrent(GLContext.java:24 72)
- locked <0x44184330> (a gl4java.GLContext)
at gl4java.awt.GLCanvas.sDisplay(GLCanvas.java:697)
at gl4java.awt.GLAnimCanvas.run(GLAnimCanvas.java:466 )
at java.lang.Thread.run(Thread.java:536)
..... rest is removed for clarity
---------------------------
It apperas, there is a problem with nvidia's LibGL.so.1.0.4191. I would be possibly able to track it, but I can't find where to download library sources.
Any help will be apprecated,
Tomasz Sztejka.

bwkaz
03-22-03, 07:56 AM
Originally posted by sztejkat
I would be possibly able to track it, but I can't find where to download library sources. Heh. That's because the only sources for libGL are inside nVidia. Yay closed-source drivers! :rolleyes:

Anyway, this is probably related to the multithreading, from the sounds of it. There was a thread here a while back about multithreaded rendering:

http://www.nvnews.net/vbulletin/showthread.php?s=&threadid=8499&highlight=mutex

Even though that person was using Gtk and C, rather than Java, I think the basic problem is the same. Do you have one rendering context per thread, or are they all sharing a context?

sztejkat
03-22-03, 10:50 AM
Thanks.

It gives some suggestions. It appears, that I cannot create GL graphics context in one thread and then use it in another. It is true, that any GL call from another thread causes app to crash, even the call which should in authors intention switch contex ownership.

This is all I have done and I thought, it is allowed once I protect every entry with mutex (JAVA synchronized keyword). I have found also a suggestion, that newest GL4Java sources have workaround for it, so it is first think I'm going to try just once I undrestand how to use cvs and compile it.

About closed source - this is Nvidia choice to either have a good quality product with good useres feedback or have poor product and have to dig out bugs by themselfs. I trust, that they rethink their approach (ie. count money /time their programers spend on tracking bugs, which could be saved if some crazy users would do it instead) and will made sources availble.
It is not necessary to be open-source project - just give users possiblity to look at complete source and debug it.

regards,