Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #324
| From | "Niva" <niva@THRWHITE.remove-dii-this> |
|---|---|
| Subject | application hangs (deadlo |
| Message-ID | <1165255300.770450.45620@f1g2000cwa.googlegroups.com> (permalink) |
| Newsgroups | comp.lang.java.gui |
| Date | 2011-04-27 15:26 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui
I use the [AWT-Windows] thread to process a native requests from our
code using JNI, on a swing application (a simple gui I wrote) - which
works great except it sometimes hangs - on specific places. I suspend
the relevant threads to examine the stack and find out the following
(for example)
________________________________________
Thread [AWT-Windows] (Suspended)
Object.wait(long) line: not available [native method]
EventQueue$1AWTInvocationLock(Object).wait() line: not available
EventQueue.invokeAndWait(Runnable) line: not available
SwingUtilities.invokeAndWait(Runnable) line: not available
Communicator.execute(byte[]) line: 109 <== our
class
WToolkit.eventLoop() line: not available [native method]
WToolkit.run() line: not available
Thread.run() line: not available
________________________________________
a short look on EventQueue thread shows:
________________________________________
Thread [AWT-EventQueue-0] (Suspended)
WComponentPeer._requestFocus(Component, boolean, boolean, long) line:
not
available [native method] [local variables
unavailable]
WFramePeer(WComponentPeer).requestFocus(Component, boolean, boolean,
long)
line: not available
JTabbedPane(Component).requestFocusHelper(boolean, boolean) line: not
available
JTabbedPane(Component).requestFocusInWindow() line: not available
JTabbedPane(JComponent).requestFocusInWindow() line: not available
DefaultKeyboardFocusManager.dispatchEvent(AWTEvent) line: not
available
NivasApplication(Component).dispatchEventImpl(AWTEvent) line: not
available
NivasApplication(Container).dispatchEventImpl(AWTEvent) line: not
available
NivasApplication(Window).dispatchEventImpl(AWTEvent) line: not
available
NivasApplication(Component).dispatchEvent(AWTEvent) line: not
available
EventQueue.dispatchEvent(AWTEvent) line: not available
SequencedEvent.dispatch() line: not available
EventQueue.dispatchEvent(AWTEvent) line: not available
EventDispatchThread.pumpOneEventForHierarchy(int, Component) line: not
available
EventDispatchThread.pumpEventsForHierarchy(int, Conditional,
Component) line: not available
EventDispatchThread.pumpEvents(int, Conditional) line: not available
EventDispatchThread.pumpEvents(Conditional) line: not available
EventDispatchThread.run() line: not available
________________________________________
other places it gets stuck on is "getComponents", "enableNativeIME",
"getLightHeavyWeightCursor" etc.
Im sure that to the eye of an expert it all makes sense. we call lock
on eventQueue which wait for something to happen, but where am I going
wrong? why doenst the event happen? are we holding something it needs?
---
* Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.gui | Previous | Next — Next in thread | Find similar
application hangs (deadlo "Niva" <niva@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000 Re: application hangs (de "Thomas Hawtin" <thomas.hawtin@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
csiph-web