From webbugs review ID 644155:
company: SAS Institute
synopsis: SWT application hangs with embedded swing components
description: Problem: Application hangs with "Xlib: unexpected async reply" message printed while running an SWT application with embedded Swing components.
Environment: Linux (Fedora Core 4)
JDK 1.6 (problem seen with builds 68 and 70)
GTK Look and Feel (problem seen with GTK 2.6.7 and 2.6.10)
The problem does not occur at all with JDK 5.0, and it does not occur on JDK 6.0 unless the GTK look and feel is used (Metal works fine). SWT 3.2 also displays the same problem, again only with JDK 6.0 and only with the GTK look and feel.
Un-tar the attached application, edit the "run" script for your environment, and run it.
About 25% of the time for me, it will immediately print out a message like:
Xlib: unexpected async reply (sequence 0x2e0)!
At this point the application is mostly unresponsive.
The application is a very simple example of embedding Swing into an SWT application via the SWT_AWT bridge. The source for the app is included in the tar file (see /com.sas.swtswing/com/sas/swtswing/Main.java).