Login  Register

Re: [Bug][2.4.0 RC] A deadlock occurs when OpenGL initialization and Native events overlap on macOS

Posted by Sven Gothel on Mar 31, 2020; 9:11am
URL: https://forum.jogamp.org/Bug-2-4-0-RC-A-deadlock-occurs-when-OpenGL-initialization-and-Native-events-overlap-on-macOS-tp4040466p4040467.html

Thank you for your notice.

Is this deadlock happening due to an AWT action on Appkit
flushing the AWT-Event (issuing a Runnable and waiting),
which blocks the Appkit -

while we are sitting on the AWT EDT,
and issuing our SetNSView command on AppKit and waiting,
which conversely blocks the AWT EDT

?

If so, a patch is queued ..

Will make an update later this or next week in Bug 1398.

~Sven

On 3/31/20 6:35 AM, Jun Koyama [via jogamp] wrote:

> 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)
>
> When using 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
>
> ------------------------------------------------------------------------------
> If you reply to this email, your message will be added to the discussion below:
> http://forum.jogamp.org/Bug-2-4-0-RC-A-deadlock-occurs-when-OpenGL-initialization-and-Native-events-overlap-on-macOS-tp4040466.html
>
> To start a new topic under jogl, email [hidden email]
> To unsubscribe from jogl, click here
> <
> NAML
> <
http://forum.jogamp.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>


signature.asc (849 bytes) Download Attachment