Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
22 posts
|
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. JDesktopDemo.java |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
214 posts
|
Try adding GLProfile.initSingleton(); before u do anything in ur main method.
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
22 posts
|
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.
Name: AWT-EventQueue-0-EDT-Display_Windows_nil State: WAITING on java.awt.EventQueue$1AWTInvocationLock@6833f2 Total blocked: 232 Total waited: 1,114 Stack trace: java.lang.Object.wait(Native Method) java.lang.Object.wait(Object.java:485) java.awt.EventQueue.invokeAndWait(EventQueue.java:993) com.jogamp.newt.awt.NewtCanvasAWT$FocusAction.run(NewtCanvasAWT.java:85) com.jogamp.newt.Window.focusAction(Window.java:316) com.jogamp.newt.impl.windows.WindowsDisplay.DispatchMessages0(Native Method) com.jogamp.newt.impl.windows.WindowsDisplay.dispatchMessagesNative(WindowsDisplay.java:73) com.jogamp.newt.Display.dispatchMessages(Display.java:353) com.jogamp.newt.Display$2.run(Display.java:196) com.jogamp.newt.util.EDTUtil$EventDispatchThread.run(EDTUtil.java:212) ---------------------------------- Name: AWT-EventQueue-0 State: RUNNABLE Total blocked: 25 Total waited: 23 Stack trace: sun.awt.windows.WComponentPeer._requestFocus(Native Method) sun.awt.windows.WComponentPeer.requestFocus(WComponentPeer.java:617) java.awt.Component.requestFocusHelper(Component.java:7412) java.awt.Component.requestFocusHelper(Component.java:7373) java.awt.Component.requestFocus(Component.java:7181) com.jogamp.newt.awt.NewtCanvasAWT.requestFocusAWT(NewtCanvasAWT.java:217) com.jogamp.newt.awt.NewtCanvasAWT$FocusAction$FocusActionImpl.run(NewtCanvasAWT.java:99) java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199) java.awt.EventQueue.dispatchEvent(EventQueue.java:597) java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) java.awt.EventDispatchThread.run(EventDispatchThread.java:122) |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
214 posts
|
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
![]() Also take a look here: http://jogamp.org/wiki/index.php/Jogl_FAQ#What_is_Newt.27s_Threading_Model_for_native_window_events_.3F |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
22 posts
|
This post was updated on Aug 05, 2010; 8:26pm.
Removal of invokeLater() during initialization has no impact. The underlying cause seems to be a threading issue when attempting to request focus.
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
22 posts
|
I've moved to the latest automated build of JOGL, and I'm still seeing the same behavior.
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
22 posts
|
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". |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
22 posts
|
Opened Bug 406.
|
Free forum by Nabble | Edit this page |