Bug 243

Summary: Exception when destroying a Pbuffer while context is current
Product: [JogAmp] Jogl Reporter: Sven Gothel <sgothel>
Component: coreAssignee: Sven Gothel <sgothel>
Status: VERIFIED INVALID    
Severity: normal    
Priority: P4    
Version: 1   
Hardware: All   
OS: all   
Type: DEFECT SCM Refs:
Workaround: ---
Attachments: Test program
NB5 form file

Description Sven Gothel 2010-03-24 07:49:31 CET


---- Reported by kcr 2006-08-14 11:17:32 ----

If a Pbuffer is destroyed while a context created on that Pbuffer is current, an
exception will result the next time any context is made current. One could argue
that this is an app bug, but I am fairly certain that native OpenGL drivers
handle this case correctly.

To reproduce, run the attached test program. When you press the "DestroyPbuffer"
button, a new context is created on the Pbuffer, the new context is made
current, then the Pbuffer is destroyed. The following exception is thrown the
next time the on-screen context is made current:

Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: Pbuffer
destroyed out from under application-created context
	at
com.sun.opengl.impl.x11.X11PbufferGLContext.releaseImpl(X11PbufferGLContext.java:114)
	at com.sun.opengl.impl.GLContextImpl.release(GLContextImpl.java:159)
	at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:114)
	at PbufferDestroyBug$MyCanvas.paint(PbufferDestroyBug.java:156)
	at java.awt.Canvas.update(Canvas.java:114)
	at sun.awt.RepaintArea.updateComponent(RepaintArea.java:239)
	at sun.awt.X11.XRepaintArea.updateComponent(XRepaintArea.java:43)
	at sun.awt.RepaintArea.paint(RepaintArea.java:216)
	at sun.awt.X11.XComponentPeer.handleEvent(XComponentPeer.java:630)
	at java.awt.Component.dispatchEventImpl(Component.java:4031)
	at java.awt.Component.dispatchEvent(Component.java:3803)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Note that if you check the "Release pcontext" check box prior to pressing the
"Destroy Pbuffer" button, then the app will release the context prior to
destroying the pbuffer and there will be no exception.



---- Additional Comments From kcr 2006-08-14 11:17:57 ----

Created an attachment
Test program




---- Additional Comments From kcr 2006-08-14 11:18:10 ----

Created an attachment
NB5 form file




--- Bug imported by sgothel@jausoft.com 2010-03-24 07:49 EDT  ---

This bug was previously known as _bug_ 243 at https://jogl.dev.java.net/bugs/show_bug.cgi?id=243
Imported an attachment (id=84)
Imported an attachment (id=85)

The original submitter of attachment 84 [details] is unknown.
   Reassigning to the person who moved it here: sgothel@jausoft.com.
The original submitter of attachment 85 [details] is unknown.
   Reassigning to the person who moved it here: sgothel@jausoft.com.

Comment 1 Sven Gothel 2010-11-19 13:30:27 CET
can't reproduce