Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Mar 2010 17:21:54 GMT
From:      Scali <scali@scali.eu.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/144555: MesaGL glutMainLoop() crashes when using VBO extensions
Message-ID:  <201003081721.o28HLs8k079719@www.freebsd.org>
Resent-Message-ID: <201003081730.o28HU4FL004712@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003081721.o28HLs8k079719>