Error making context current?

Hi there,

I’m running an application with JOGL on Linux. I keep getting the
following error:

Exception in thread “AWT-EventQueue-0” net.java.games.jogl.GLException:
Error making context current
at
net.java.games.jogl.impl.x11.X11GLContext.makeCurrent(X11GLContext.java:172)
at
net.java.games.jogl.impl.x11.X11OnscreenGLContext.makeCurrent(X11OnscreenGLContext.java:118)
at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:248)
at
net.java.games.jogl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:236)
at net.java.games.jogl.GLCanvas.display(GLCanvas.java:77)
at net.java.games.jogl.GLCanvas.paint(GLCanvas.java:86)
at net.java.games.jogl.GLCanvas.update(GLCanvas.java:139)
at sun.awt.RepaintArea.updateComponent(RepaintArea.java:239)
at sun.awt.X11.XRepaintArea.updateComponent(XRepaintArea.java:43)
at sun.awt.RepaintArea.paint(RepaintArea.java:216)
at sun.awt.X11.XComponentPeer.handleEvent(XComponentPeer.java:630)
at java.awt.Component.dispatchEventImpl(Component.java:4031)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

It works fine on other machines. I’ve tried on this machine both with
release 1.1 and 1.1.1. Have you seen this before? Any ideas?

I also tried running this in different color depths.

From xorg.conf:
Graphics card: ATI Technologies, Inc. Radeon Mobility 9100 U3 (R200 IGP)
Driver: ati

Thanks!

Update: many of the JOGL demos work (including the various GEARS ones), although with warnings (like fullscreen not supported).

Have you tried installing the DebugGL pipeline at the beginning of your GLEventListener.init() method? Or are things failing even before your GLEventListener is being called? In the latter case, are you using the DefaultGLCapabilitiesChooser or your own? Are you doing anything “strange” with the window initialization, like attempting to start the Animator before the window has been shown?

Hi,

I’m having exactly the same problem.

I’m running Suse 9.3 (the 32 bit version) on an AMD64 Box with NVIDIA GForce FX5200 128 meg card.

GLCapabilities glcaps=new GLCapabilities();
GLCanvas glcanvas=GLDrawableFactory.getFactory().createGLCanvas(glcaps);
glcanvas.addGLEventListener(new SimpleGLEventListener());

etc, proceed without error.

It’s only when I come to display the results that it all goes titsup! ie a call to newframe.show(); or getContentPane().add(glcanvas, BorderLayout.CENTER);

Cheers,

Cov

Again, do the JOGL demos work? I’ve tested on NVidia hardware on all of JOGL’s supported operating systems and have never seen any problems.

[quote]Again, do the JOGL demos work?
[/quote]
Yes, I can get the Space Invaders demo to work. :slight_smile:

I downloaded sdk 1.5 from sun.com and installed it in the mistaken belief that this was my problem. 120 meg download but the problems just got worse with the app complaining that it couldn’t find libmawt. Whatever libmawt is. Reinstalled 1.4 and got back some of the functionality.

Sorry, my mistake, the Space Invaders Demo is from lwjgl.

No, all the demos (including Gears), report the same error and just display a blank grey frame.

We’re working on getting a new version of JOGL out the door which may address this issue as a lot of the internals have changed. If you can’t wait, please try checking out and building the “JSR-231” branch of the JOGL tree:

cvs co -r JSR-231 -P jogl jogl-demos

and see whether it behaves any better.

Ken,

Sorry, CVS is a bit of a black art as far as I’m concerned.

I have tried to use it, but with no luck (I tell a lie: I installed OpenAl using CVS, it downloaded all files even remotely conected to the project, including all Windows, Mac and Linux files, smaple files, test files, you name it, the download took over 2 hours and there was no indication of when the download would be finished so you daren’t interrupt it just in case it only had 30 seconds or so to run…)

Dave Coventry

It’s quite possible the libraries I’m using are way out of date.

I’ve located the jogl.jar and jogl-natives-linux.jar for JOGL1.1.1 (July 2005). Am I right in assuming that the jogl-natives-linux.jar needs to be extracted as a *.zip file and the libjogl.so used as a replacement for my current libjogl.so?

Yes, that’s correct.