Re: Thread blocking issue with AWT (but not NEWT) on OSX
Posted by
Sven Gothel on
Nov 08, 2012; 2:24am
URL: https://forum.jogamp.org/Thread-blocking-issue-with-AWT-but-not-NEWT-on-OSX-tp4026674p4026823.html
On 11/07/2012 04:00 AM, Sven Gothel wrote:
> On 11/07/2012 03:09 AM, ac [via jogamp] wrote:
>> is the upcoming fix dealing specifically with the setTitle() call, or anything
>> that is called from the frame object? I recall that doing
>> frame.setResizeable() also resulted in the application hanging.
>
> Well, I cannot provide a fix to this I am afraid, hence there will be
> no upcoming fix as long it's not 'our' fault within JOGL.
>
> You can see in the git commit how I worked around it within
> the 2 unit tests - sorry that's all so far.
>
> We have pretty much isolated this issue by now (OSX, after CALayer creation),
> but I cannot see us doing anything wrong here causing such a deadlock.
>
> If setResizeable() fails to, I am afraid any mutable frame operation
> will deadlock @ 1st init/reshape/display call right after context creation
> (1st call).
>
>
Further investigations shows that:
- Current OpenJDK7 / jdk7u-dev doesn't use 'apple.awt.CWindow' anymore
- It uses a new sun/lwawt/macosx/CPlatformWindow,
- which utilizes a simple (sun/awt/AWTWindow.m)
performSelectorOnMainThread:@selector(setTitle:)
I cannot see anything wrong here.
I also added an explicit [makeCurrent,release]/[makeCurrent,init,release]
in GLCanvas.setRealizedOnEDTAction(). This helps a bit already
but still deadlocks in like 1 of 8 runs.
Let's see what the latest OpenJDK7 OSX port behaves.
>
> ~Sven
>
>