Errors on Linux / ATI

Hi,

I’ve written a jogl app that works perfectly well on Windows, but produced loads of these errors on linux:

fglX11AllocateManagedSurface: __FGLTexMgrAllocMem failed!!
fglX11AllocateManagedSurface: __FGLTexMgrAllocMem failed!!
fglX11AllocateManagedSurface: __FGLTexMgrAllocMem failed!!

It’s Ubuntu Feisty with an ATI Mobility Radeon X600 and the latest fglrx drivers.

Interestingly, the app still works and displays correctly, however the frame rate is very low, possibly due to these errors.

The first error seems to occur after these calls:

gl.glBindBuffer(GL.GL_ARRAY_BUFFER,index);
gl.glNormalPointer(GL.GL_FLOAT,0,0);

However, these calls are made every frame but the error doesn’t occur on every frame, rather every few frames. I’ve tried running with DebugGL but no Exceptions were thrown.

Anyone have any ideas on this one?

Thanks in advance,

Chris.

I have similar problemes (take a look here: http://www.java-gaming.org/forums/index.php?topic=16421.0)

Are you using GLCanvas or GLJPanel? Do you use -Dsun.java2d.opengl=true option?

Hi there,
I’m using GLCanvas and I wasn’t using sun.java2d.opengl. I have just tried using that though and this resulted in a complete VM crash!
I have a feeling the ATI driver might be faulty judging by other things I’ve read on the web, but it’s really just a guess at the moment.
I will let you know if I get anywhere though.
Chris

ATI on Linux is a problem for me too, I haven’t gotten the open source drivers to work, but I have gotten ATI’s proprietary drivers running. I have had allocation issues as well, but in my case they actually cause a segment violation and crash my JVM. The following JOGL program attempts to allocate 512 VBO’s of size 1MB each (very abusive). I get to about 16MB worth before my JVM exits. It runs on my Windows/NVidia box, although it does eat up some memory by the end.


import java.nio.FloatBuffer;
import javax.media.opengl.GL;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLCanvas;
import javax.media.opengl.GLEventListener;
import javax.swing.JFrame;
import javax.swing.WindowConstants;
import com.sun.opengl.util.BufferUtil;

public class VboCrash
{
  public static void main(String[] args) throws Exception
  {
    JFrame frame = new JFrame("CrashTest");
    frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    GLCanvas canvas = new GLCanvas();
    frame.add(canvas);
    canvas.addGLEventListener(new GLEventListener()
    {
      public void init(GLAutoDrawable drawable)
      {
        GL gl = drawable.getGL();
        final int len = 1024 * 1024;
        long total = 0;
        for (int i = 0 ; i < 512 ; i++)
        {
          int[] id = new int[1];
          gl.glGenBuffersARB(1, id, 0);
          gl.glBindBufferARB(GL.GL_ARRAY_BUFFER_ARB, id[0]);
          System.out.println("Bound id  " + id[0]);
          FloatBuffer fb = BufferUtil.newFloatBuffer(len);
          gl.glBufferDataARB(GL.GL_ARRAY_BUFFER_ARB, len, fb, GL.GL_STATIC_DRAW_ARB);
          System.out.println("Generated VBO length " + len);
          total += len;
          System.out.println("Used id " + id[0] + " (total:" + total + ")");
          //gl.glDeleteBuffersARB(1, id, 0);
        }
      }
      public void display(GLAutoDrawable drawable) {}
      public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
      public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {}
      });
      frame.setSize(320, 240);
      frame.setVisible(true);
  }
}

The stack trace in the JVM dump shows that the crash occurs a few levels deep into the ATI code, so I doubt it’s anything that JOGL could work around. My next Linux laptop will have an Nvidia card…

I would not recommend the -Dsun.java2d.opengl=true flag unless you are (a) using the GLJPanel in your application because the GLCanvas doesn’t suit your needs and (b) because you need higher performance. You should also be using the latest JDK 6 update release if you try it.

If any of you want to join ATI’s Linux beta driver program so you can report these issues, send me an email (kbr at dev dot java dot net) and I’ll put you in touch with the people who run it.

Thanks. I’d love to be able to get fresh new Linux drivers from ATI, but my laptop (which was brand new a mere 18 months ago) has an ATI chip that they stopped supporting. I am stuck using the 8.28 version of ATI’s Linux drivers with no hope of ever getting any bug fixes. That’s why my next laptop will be Nvidia. Sorry about the rant, but it really is disappointing.

Apologies for the delayed reply! It may be worth getting in touch with ATI’s linux drivers program. I’ll send you and email and you can send me the relevant details.
Cheers,
Chris.

I’m curious what chip they stopped supporting? Because I just peaked at their driver page and I see all the parts listed.

[quote]I’m curious what chip they stopped supporting? Because I just peaked at their driver page and I see all the parts listed.
[/quote]
Support for the R200 chips was dropped in the proprietary drivers from ATI after version 8.28. The chip is pretty old, actually, but it was still used in new machines (a company-provided Dell laptop, in my case) for a long time after its release. ATI did release specs on the chips, however, and there are open source drivers available, but I haven’t had much as much success with them as with the drivers from ATI. I just can’t upgrade past any bugs in 8.28.