ports/144555: MesaGL glutMainLoop() crashes when using VBO extensions

Scali scali at scali.eu.org
Mon Mar 8 17:30:04 UTC 2010


>Number:         144555
>Category:       ports
>Synopsis:       MesaGL glutMainLoop() crashes when using VBO extensions
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 08 17:30:04 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Scali
>Release:        7.2-RELEASE AMD64
>Organization:
Bohemiq
>Environment:
FreeBSD scali.eu.org 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May  1 07:18:07 UTC 2009     root at driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
When using the ARB VBO extensions, leaving a buffer bound when calling glutMainLoop() or glutSwapBuffers() will result in the application crashing.
This is on an Intel G31 chipset, using the Tungsten drivers bundled with Mesa 7.4.4, built from ports.

>How-To-Repeat:
First initialize glut:
        glutInit( &argc, argv );
        glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
        glutInitWindowSize( WIDTH, HEIGHT );
        glutCreateWindow( "OpenGL Engine" );

Then create a VBO:
        glGenBuffersARB( 1, &m_nVBOVertices );
        glBindBufferARB( GL_ARRAY_BUFFER_ARB, m_nVBOVertices );
        glBufferDataARB( GL_ARRAY_BUFFER_ARB, sizeof(vertices), vertices, GL_STATIC_DRAW_ARB );

Then call glutMainLoop():
        glutMainLoop(); // <-- crashes here
>Fix:
Calling glBindBufferARB( GL_ARRAY_BUFFER_ARB, 0 ); before glutMainLoop(); will avoid the crash.
However, the same problem exists with glutSwapBuffers().. it wil crash when a VBO is still bound.

This behaviour does not occur on most other OpenGL implementations, and it is common practice to not specifically unbind VBOs, when the entire application uses VBOs exclusively.

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list