How to catch a LWJGLException: No Pbuffer support?

Hello all,

I’m using jMonkey as a panel inside a bigger application.

I start by adding the canvas to a JPanel then I add that JPanel to another one. This is when all hell breaks loose and I get a LWJGLException. I realize this is because the pBuffers are not supported by the graphic’s driver.

Thing is the Exception kicks in at a separated Thread at the bold line. Since it’s a separated Thread no try catch will catch it.

Is there a way to force the SimpleApplication to blow up when I still have control. Or maybe a test to see if all the functionalites need are supported so I can run safely in unknown computers.

This is some code so you can see what I’m doing:


class JPanelFather extends JPanel{

public void componentShown(ComponentEvent e) {

if (source == null) // To protect against null pointer


cpanel = vis.getComponent(source, timestep);


<strong>add(cpanel, BorderLayout.CENTER);</strong>





class JPanelSon extends JPanel{

public JComponent getComponent() {

jme = new JmeComponent();

Canvas canvas = jme.getComponentAndStartIt();


setLayout(new BorderLayout());


addComponentListener(new ComponentAdapter() {


public void componentResized(ComponentEvent e) {





return this;


public class JmeComponent extends SimpleApplication {



And the exception:

Aug 27, 2012 3:47:21 PM handleError
SEVERE: Failed to initialize OpenGL context
org.lwjgl.LWJGLException: No Pbuffer support
at org.lwjgl.opengl.LinuxPbufferPeerInfo.nInitHandle(Native Method)
at org.lwjgl.opengl.LinuxPbufferPeerInfo.(
at org.lwjgl.opengl.LinuxDisplay.createPbuffer(
at org.lwjgl.opengl.Pbuffer.createPbuffer(
at org.lwjgl.opengl.Pbuffer.(
at org.lwjgl.opengl.Pbuffer.(
at org.lwjgl.opengl.Pbuffer.(
at com.jme3.system.lwjgl.LwjglCanvas.makePbufferAvailable(
at com.jme3.system.lwjgl.LwjglCanvas.createContext(
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(
Aug 27, 2012 3:47:21 PM handleError
SEVERE: Failed to create display
at org.lwjgl.opengl.GL11.glGetString(
at com.jme3.system.lwjgl.LwjglContext.printContextInitInfo(
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(

You mean like overriding handleError()?

1 Like

You could query the drivers’ capabilities. renderManger.getCaps(); iirc… Unsure if that’s in renderer or render manager.

Anyway, technically you should be able to query what’s supported with that and adapt vs what’s available.

1 Like

@madjack I found getRenderer().getCaps() but the Caps enum it returns has no entry for Pixel Buffers.

@pspeed I ended up fixing it with the Override. Thanks a bunch!