Project: SWT
Bug 291326 [SWT/AWT] Freeze when making a sync SWT call in response to certain Swing events
Reported: 2009-10-05 07:12:37 | Status: resolved fixed

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 Build Identifier: swt-N20090930-2000-cocoa-macosx-x86_64 Calling synchronously SWT from the AWT event dispatch thread can result in a freeze of the application. This happens when SWT is waiting synchronously after AWT. Here is the SWT event thread in such a case: "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) Reproducible: Sometimes Steps to Reproduce: Call SWT synchronously in response to a Swing component event.

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java