I put together a small JDesktop-based application which uses NEWT, and I'm finding that that I can consistently lock-up the application on a Windows platform.
The problem occurs when I perform the following steps:
1. Use the mouse to rotate the gears in an internal frame that does not have focus.
2. Use the mouse to rotate the gears in the internal frame which has focus.
3. Request focus on the first internal frame by selecting its title bar.
Adding the GLProfile.initSingleton() didn't help. The problem appears to be occurring somewhere in the native code. Looking at the thread stack traces, it looks as if the NEWT windows thread is waiting on the AWT thread to change the focus. Enabling all JOGL debugging also shows that the system is still attempting to render, as I continue to see "SwapBuffers calls: ..." messages.
State: WAITING on java.awt.EventQueue$1AWTInvocationLock@6833f2
Total blocked: 232 Total waited: 1,114
Hmm ok maybe try to initialize ur stuff from another thread instead of the EDT. So try to remove ur SwingUtilities.invokeLater() call and do ur initalization directly on the main() thread (yes I know this is bad style ).
Further testing indicates:
1. Internal frames do not have to be overlapping to cause the problem.
2. Both the focused internal frame and the internal frame requesting focus have to be NewtCanvasAWT instances for the problem to occur.
3. All requests made through requestFocusAWT() are made on the AWT event dispatch thread as expected.
4. The problem doesn't occur when the internal frame already has focus because the requestFocusHelper doesn't perform any action. This can be seen by enabling logging of "java.awt.focus.Component".