Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] SWT_AWT on Mac, first impressions

Hi all,

Analyzing some thread dumps because of a freeze, we find something
that I have not seen on Windows/Linux.

The general pattern, as far as I understand SWT_AWT, is that you would
expect to integrate an SWT widget and call methods on it.
You would most likely use "display.asyncExec(r)" unless your UI wants
a result back in which case you would use "display.syncExec(r)".

In our case, our AWT Event Queue thread is stuck on
"display.syncExec(r)" and the SWT event pump is stuck waiting after
AWT:

Look at this:
"Thread-0" daemon prio=5 tid=0x0000000101848000 nid=0x7fff7062c700
runnable [0x00007fff5fbfa000]
   java.lang.Thread.State: RUNNABLE
	at apple.awt.CToolkit.doAWTRunLoop(Native Method)
	at apple.awt.CToolkit.invokeAndWait(CToolkit.java:1112)
	at apple.awt.CToolkit.invokeAndWait(CToolkit.java:1093)
	at apple.awt.ComponentModel.handlePaint(ComponentModel.java:323)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:4349)
	at org.eclipse.swt.widgets.Display.applicationProc(Display.java:4426)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:101)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3159)

Is this something that happens only on Cocoa? Is it normal that the
SWT/thread0 waits after the AWT event thread?

-Christopher


Back to the top