From: Tomas K. <kar...@ag...> - 2003-03-22 13:27:05
|
Hi Tomasz I've also experinced the same problem with GL4Java + Redhat + Nvidia. It seems that the problem is related to a bug in GL4Java with nvidia drivers. Try to compile GL4Java from the latest source from the cvs, that should do the trick. Cheers Tomas ----- Original Message ----- From: "Tomasz Sztejka" <szt...@ya...> To: <gl4...@li...> Sent: Saturday, March 22, 2003 2:08 PM Subject: [gl4java-usergroup] GL4Java + Linux +Nvidia crash > Hi, > I just started to leard openGL with famous GL4Java library and got > some problems which I'm not able to solve by mylsef. > My OS configuration is: > Linux Debian 3.0, GL4Java 2.8.2.0, j2sdk1.4.1 Blackdown.org, Nvidia > GForce2 drivers from nvidia.com(games are working ok, so driver works). > > I composed this simple program below from demos examples (this is > demos/ronsDemos/animApplet.skel based). As you can see it does nothing > except trying to run few gl commands on animation thread. Once i run it > it crashes after openning window with message: > ---------------------------- > init(): X$myappletCanvas[canvas0,4,20,42x29] > > 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:2472) > - 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) > > Dynamic libraries: > 08048000-0804d000 r-xp 00000000 03:03 291350 > /usr/local/j2sdk1.4.1/bin/java > .... > ---------------------------- > > I have seen some threads on this forum mentioning similar problems, > but answers were not enough detailed for me to be helpfull (I'm pretty > new Linux user). > > regards, > Tomasz Sztejka. > > This is my problematic code: > > public class X extends Frame > { > myappletCanvas canvas = null; > public static void main(String [] ar) > { > X x = new X(); > x.init(); > x.setVisible(true); > x.start(); > }; > > public void init() > { > Dimension d = getSize(); > setLayout(new BorderLayout()); > canvas = new myappletCanvas(d.width, d.height); > add("Center", canvas); > } > > public void start() > { > canvas.start(); > } > public void stop() > { > canvas.stop(); > } > public void destroy() > { > canvas.stop(); > canvas.destroy(); > } > private class myappletCanvas extends GLAnimCanvas > { > public myappletCanvas(int w, int h) > { > super(w, h); > GLContext.gljNativeDebug = false; > GLContext.gljClassDebug = false; > setAnimateFps(60.0); > } > > public void preInit() > { > doubleBuffer = true; > stereoView = false; > } > > public void init() > { > System.out.println("init(): " + this); > reshape(getSize().width, getSize().height); > glj.gljCheckGL(); > } > > public void destroy() > { > System.out.println("destroy(): " + this); > cvsDispose(); > } > > public void reshape(int width, int height) > { > gl.glViewport(0,0,width,height); > } > > public void display() > { > if (glj.gljMakeCurrent(true) == false) return; > glj.gljSwap(); > glj.gljCheckGL(); > glj.gljFree(); > if (!isSuspended()) repaint(); // Animate at full speed. > } > } > } > > __________________________________________________ > Do You Yahoo!? > Everything you'll ever need on one web page > from News and Sport to Email and Music Charts > http://uk.my.yahoo.com > > > ------------------------------------------------------- > This SF.net email is sponsored by:Crypto Challenge is now open! > Get cracking and register here for some mind boggling fun and > the chance of winning an Apple iPod: > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en > _______________________________________________ > gl4java-usergroup mailing list > gl4...@li... > https://lists.sourceforge.net/lists/listinfo/gl4java-usergroup > |