Summary: | Fix race conditions in GLDrawableHelper glRunnable and Animator* for unhandled exceptions | ||
---|---|---|---|
Product: | [JogAmp] Jogl | Reporter: | Sven Gothel <sgothel> |
Component: | core | Assignee: | Sven Gothel <sgothel> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | sgothel |
Priority: | --- | ||
Version: | 2.3.0 | ||
Hardware: | All | ||
OS: | all | ||
Type: | DEFECT | SCM Refs: |
c298b4317a30cc453a2350ebeb5ab3570a4c107d
cef7ba607ad7e8eb1ff2a438d77710a29aa0bda6
66ecb6c386d5c3d87d8be2600a0c7dd7d71a4329
|
Workaround: | --- |
Description
Sven Gothel
2014-09-22 23:36:10 CEST
commit 66ecb6c386d5c3d87d8be2600a0c7dd7d71a4329: Fix synchronization issues in Animator* Exception case Refines commit cef7ba607ad7e8eb1ff2a438d77710a29aa0bda6 - The animator monitor-lock was still hold in the post finally block issuing flushGLRunnables(), due to intrinsic monitor release (in finally): - <http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-2.html#jvms-2.11.10> - <http://stackoverflow.com/questions/10743285/behavior-of-a-synchronized-method-with-try-and-finally> - Further: AnimatorBase.flushGLRunnables() acquired the lock itself (duh!) This commit removes the requirement for finally altogether by simply return a boolean from handleUncaughtException(caughtException), where false denotes the caller to propagate the exception itself (no handler). Post synchronized block then issues flushGLRunnables() and exceptation propagation as required. AnimatorBase.flushGLRunnables() 'synchronized' modifier is removed. Further, ThreadDeath is being propagated if caught. Here the finally block is also removed - redundant. |