Project: SWT
Bug 407555 StackOverflowError in SWT widgets on Mac OS
Reported: 2013-05-08 12:11:12 | Status: resolved fixed

When trying to display the UML Class diagram during profiling using Execution analysis, we repeatedly get StockOverflowError in SWT widget causing the workbench to crash. This problem only shows up in Mac OS, not on Linux or Windows. Here's the stack trace (repeated many times over and over again): java.lang.StackOverflowError at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method) at org.eclipse.swt.internal.cocoa.NSView.displayIfNeeded(NSView.java:142) at org.eclipse.swt.widgets.Control.update(Control.java:4912) at org.eclipse.swt.widgets.Control.update(Control.java:4897) at org.eclipse.hyades.uml2sd.ui.view.SDWidget.getDrawBuffer(SDWidget.java:1143) at org.eclipse.hyades.uml2sd.ui.view.SDWidget.drawContents(SDWidget.java:1240) at org.eclipse.hyades.uml2sd.ui.view.ScrollView$1.paintControl(ScrollView.java:143) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:230) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4136) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1458) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1481) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466) at org.eclipse.swt.widgets.Control.drawWidget(Control.java:1244) at org.eclipse.swt.widgets.Canvas.drawWidget(Canvas.java:167) at org.eclipse.swt.widgets.Widget.drawRect(Widget.java:741) at org.eclipse.swt.widgets.Canvas.drawRect(Canvas.java:162) at org.eclipse.swt.widgets.Display.windowProc(Display.java:5473) at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method) at org.eclipse.swt.internal.cocoa.NSView.displayIfNeeded(NSView.java:142) at org.eclipse.swt.widgets.Control.update(Control.java:4912) at org.eclipse.swt.widgets.Control.update(Control.java:4897) at org.eclipse.hyades.uml2sd.ui.view.SDWidget.getDrawBuffer(SDWidget.java:1143) at org.eclipse.hyades.uml2sd.ui.view.SDWidget.drawContents(SDWidget.java:1240) at org.eclipse.hyades.uml2sd.ui.view.ScrollView$1.paintControl(ScrollView.java:143) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:230) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4136) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1458) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1481) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466) at org.eclipse.swt.widgets.Control.drawWidget(Control.java:1244) at org.eclipse.swt.widgets.Canvas.drawWidget(Canvas.java:167) at org.eclipse.swt.widgets.Widget.drawRect(Widget.java:741) at org.eclipse.swt.widgets.Canvas.drawRect(Canvas.java:162) at org.eclipse.swt.widgets.Display.windowProc(Display.java:5473) at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method) at org.eclipse.swt.internal.cocoa.NSView.displayIfNeeded(NSView.java:142) at org.eclipse.swt.widgets.Control.update(Control.java:4912) at org.eclipse.swt.widgets.Control.update(Control.java:4897) at org.eclipse.hyades.uml2sd.ui.view.SDWidget.getDrawBuffer(SDWidget.java:1143) at org.eclipse.hyades.uml2sd.ui.view.SDWidget.drawContents(SDWidget.java:1240) at org.eclipse.hyades.uml2sd.ui.view.ScrollView$1.paintControl(ScrollView.java:143)

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSView.java 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/Control.java