glGenFramebuffersEX SIGSEGV

Hello all

When I execute:

glGenFramebuffersEXT(1, &fboId);

(where fboId is type GLuint) I get a seg fault (SIGSEGV).

My specs are as follows:

Toshiba Satellite P205D-S7802
Fedora Core 8
Opengl Version: 2.1.7659 Release
GLEW Version: 1.4.0

Curiously glxinfo and fglrxinfo both run, but segfault when they are done. Here’s the fglrxinfo (because its shorter)

[markj@localhost src]$ fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Radeon X1200 Series
OpenGL version string: 2.1.7659 Release

Segmentation fault

Does anyone have any ideas what to do?


It’s a straightforward function and you are calling it correctly. All it does is supply a unique handle. I think you need a valid context though.

I saw a similar problem recently (almost exactly the same) on a mobile device.

I found some heap corruption earlier in the code due to some shader string mismanagement.

P.S. specifically shader attribute binding strings, strstr provided a useful sanity check.

Even if it crashes, it’s better to crash at the root of the problem and in your application code.


Thanks for the replies. As I’m new to OpenGL programming, there are a few things I don’t understand and wish to clarify.

“I think you need a valid context though.”

Do you mean there are some calls needed to set up the environment for glGenFramebuffersEX? Can you post links of some examples of setting up/checking the context?

“P.S. specifically shader attribute binding strings,”

Are these the routines that help set up the context? Can you post their names?

“strstr provided a useful sanity check.”

Thanks for the tip.

“Even if it crashes, it’s better to crash at the root of the problem and in your application code.”

I’m assuming I need to use the C++ function strstr to verify some value returned by the context set up. Am I right? I’m also assuming, if strstr fails then that points to the root of my problem. Am I right?

Thanks for all your help.


You mean, when you comment the line out, everything works as “expected”?

No. If I comment out the calls to glGenFramebuffersEXT and glBindFramebufferEXT then it segfaults at glFramebufferTexture2DEXT

// create a framebuffer object
//glGenFramebuffersEXT(1, &fboId);
//glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fboId);

// Instruct openGL that we won't bind a color texture with the currently binded FBO

// attach the texture to FBO depth attachment point

Have you initialized glew? sounds like a null pointer from an unitialized extension function pointer.