Bug 180831 [Forms] Crash during drawBackground when in advanced/antialiased mode
3.3 M5 Jared is seeing one of our forms-based editors crashing the workbench. He says: (This happens) almost every time I try to save. This happens whether I'm creating a new stream or trying to edit an existing stream (by adding a new component). I get one of two similar crashes. Either the workbench hangs and I get the following printed to my system console: Xlib: unexpected async reply (sequence 0xadd25)! or the workbench crashes with the attached core file. One of the times that the workbench locked up, I dumped the threads which showed the UI thread blocked as follows. This looks similar to the stack that's dumped to the core file: "main" prio=1 tid=0x0805c3d0 nid=0x507c waiting for monitor entry [0xbff6a000..0xbff6c1f8] at org.eclipse.swt.internal.cairo.Cairo.cairo_xlib_surface_create(Native Method) - waiting to lock <0xa38e2070> (a java.lang.Class) at org.eclipse.swt.graphics.GC.initCairo(GC.java:2657) at org.eclipse.swt.graphics.GC.setAdvanced(GC.java:2754) at org.eclipse.ui.internal.forms.widgets.FormUtil.setAntialias(FormUtil.java:507) at org.eclipse.ui.forms.widgets.Section.onPaint(Section.java:408) at org.eclipse.ui.forms.widgets.ExpandableComposite$1.paintControl(ExpandableComposite.java:510) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:204) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1097) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1121) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1106) at org.eclipse.swt.widgets.Control.gtk_expose_event(Control.java:2154) at org.eclipse.swt.widgets.Composite.gtk_expose_event(Composite.java:638) at org.eclipse.swt.widgets.Canvas.gtk_expose_event(Canvas.java:133) at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1474) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3879) at org.eclipse.swt.widgets.Display.windowProc(Display.java:3870) at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method) at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:5574) at org.eclipse.swt.widgets.Display.eventProc(Display.java:1155) at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method) at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1468) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2903) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2264) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2228) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2103) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:457) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:452) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:101) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:146) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:169) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:476) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:416) at org.eclipse.equinox.launcher.Main.run(Main.java:1124) at org.eclipse.equinox.launcher.Main.main(Main.java:1099)
bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/BusyIndicator.java
/*
					 * Create the first image and draw it on the off-screen
					 * image.
					 */
					int imageDataIndex = 0;
					ImageData imageData = progressData[imageDataIndex];
					if (timage != null && !timage.isDisposed())
						timage.dispose();
					timage = new Image(display, imageData);
					offScreenImageGC.drawImage(timage, 0, 0,
							imageData.width, imageData.height, imageData.x,
							imageData.y, imageData.width, imageData.height);
					/*
					 * Now loop through the images, creating and drawing
					 * each one on the off-screen image before drawing it on
					 * the shell.
					 */
					int repeatCount = loader.repeatCount;
					while (loader.repeatCount == 0 || repeatCount > 0) {
						if (stop || isDisposed())
							break;
						switch (imageData.disposalMethod) {
						case SWT.DM_FILL_BACKGROUND:
							/*
							 * Fill with the background color before
							 * drawing.
							 */
							/*
							 * offScreenImageGC.fillRectangle(imageData.x,
							 * imageData.y, imageData.width,