[Bug][2.4.0 RC] A deadlock occurs when OpenGL initialization and Native events overlap on macOS
Posted by
Jun Koyama on
Mar 31, 2020; 4:35am
URL: https://forum.jogamp.org/Bug-2-4-0-RC-A-deadlock-occurs-when-OpenGL-initialization-and-Native-events-overlap-on-macOS-tp4040466.html
OS version: macOS 10.15.4
Architecture: x86_64
OpenGL version: 4.1
Java version: 1.8.0_242
JOGL version: v2.4.0-rc-20200307 (0779f229b0e9538c640b18b9a4e095af1f5a35b3)
I use JOGL in the latest 2.4.0 RC build (
https://jogamp.org/deployment/archive/rc/v2.4.0-rc-20200307).
When OpenGL initialization and macOS Native events are fired simultaneously, two threads in "AWT-EventQueue-0" and "AWT-AppKit" will cause a deadlock and hang the application.
The native events that we are currently checking are JMenu display switching and JFrame resizing. Both must be done manually. Deadlocks occur when using either GLCanvas or GLJPanel.
The log at the time of the hang suggests that the bug 1398 fix commit (
https://jogamp.org/bugzilla/show_bug.cgi?id=1398) is affecting it.
Please refer to the following links for the sample code, the reproduction video using GLJPanel, the thread dump and the debug log when it hangs.
https://drive.google.com/drive/folders/1F4-5YoO549XEdF5lWqvY_PXv59MPQ0i9