Summary: | GLEventListenerState doesn't track AbstractGraphicsDevice's Toolkit Lock. It also shall lock the GLAutoDrawable's NativeSurface while operating. | ||
---|---|---|---|
Product: | [JogAmp] Jogl | Reporter: | Sven Gothel <sgothel> |
Component: | core | Assignee: | Sven Gothel <sgothel> |
Status: | RESOLVED FIXED | ||
Severity: | critical | CC: | sgothel |
Priority: | P1 | ||
Version: | 2 | ||
Hardware: | All | ||
OS: | all | ||
Type: | DEFECT | SCM Refs: |
0f7412855c118cb501d8a001df7a7487354b5029
|
Workaround: | --- |
Description
Sven Gothel
2013-04-18 23:50:50 CEST
Bug appeared after updating NV driver to 313.30. After updating OpenIndiana itself, I could not reproduce this behavior within 5 test runs, including one jenkins build. Keeping an eye on it, and can be marked invalid if it doesn't happen again. Reproduced on GNU/Linux w/ AMD GPU within same unit test, i.e. TestGLContextDrawableSwitch21Newt2AWT - test11GLWindow2GLCanvasOnScrnGL2ES2 Seems that the aDevice can become unlocked by a previous drawable/context switch operation. Rarely reproducible, needs to analyze code. Root cause found, see new title: GLEventListenerState doesn't track AbstractGraphicsDevice's Toolkit Lock. It also shall lock the GLAutoDrawable's NativeSurface while operating. GLEventListenerState swaps the AbstractGraphicsDevice to preserve the device handle being used for GL context was creation. It's ToolkitLock was kept, hence the confusion. On another thought .. it may be far easier to move the the device handle value itself if compatible (X11/EGL). Make GLEventListenerState 'transaction' safe Animator.pause[ surface.lock[ modify ] ] GLEventListenerState: New model for GLEventListenerState's transaction safety: - Z Decorate-1: Animator.pause [ X ] Animator.resume - X Decorate-2: Surface.lock [ Y ] Surface.unlock - Instead of setting AbstractGraphicsDevice, just swap the handle and ownership. - Issuing setRealized(..) only if required, i.e. having an upstream-surface (EGL..) depending on used device - Utilizing setRealized(..) on the GLAD's delegated 'real' drawable, avoiding optional GLAD locking. - Cleanup and above changes shall render impl. easier to read. GLEventListenerState Unit Tests: - If swapping/moving from AWT -> NEWT, use a NEWT dedicated Display avoiding ATI driver XCB crash - read comment. |