Project: SWT
Bug 258675 [Viewers] Arithmetic exception when typing show types dialog
Reported: 2008-12-12 12:50:10 | Status: resolved fixed

Build ID: M20080911-1700 Steps To Reproduce: This bug isn't 100% reproducible, but when running eclipse on AIX via Exceed, when I open the show types dialog (using CTRL+SHIFT+T) and start typing the error dialog informs me of an Arithmetic exception. Sometimes, every letter typed after that causes the same exception to show up. Stack trace is below. More information: java.lang.ArithmeticException: divide by zero at org.eclipse.ui.dialogs.FilteredItemsSelectionDialog$ItemsListLabelProvider.getSeparatorLabel(FilteredItemsSelectionDialog.java:1720) at org.eclipse.ui.dialogs.FilteredItemsSelectionDialog$ItemsListLabelProvider.getText(FilteredItemsSelectionDialog.java:1653) at org.eclipse.ui.dialogs.FilteredItemsSelectionDialog$ItemsListLabelProvider.update(FilteredItemsSelectionDialog.java:1691) at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:145) at org.eclipse.jface.viewers.AbstractTableViewer.doUpdateItem(AbstractTableViewer.java:386) at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:466) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:880) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.StructuredViewer.refreshItem(StructuredViewer.java:1476) at org.eclipse.jface.viewers.AbstractTableViewer.replace(AbstractTableViewer.java:1043) at org.eclipse.ui.dialogs.FilteredItemsSelectionDialog$ContentProvider.updateElement(FilteredItemsSelectionDialog.java:2898) at org.eclipse.jface.viewers.AbstractTableViewer$1.handleEvent(AbstractTableViewer.java:78) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:822) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:829) at org.eclipse.swt.widgets.Table.checkData(Table.java:257) at org.eclipse.swt.widgets.TableItem.paint(TableItem.java:1066) at org.eclipse.swt.widgets.Table.onPaint(Table.java:2707) at org.eclipse.swt.widgets.Table.handleEvents(Table.java:1282) at org.eclipse.swt.widgets.Table$1.handleEvent(Table.java:163) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:822) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:829) at org.eclipse.swt.widgets.Composite.XExposure(Composite.java:1403) at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1104) at org.eclipse.swt.widgets.Display.windowProc(Display.java:3751) at org.eclipse.swt.internal.motif.OS._XtDispatchEvent(Native Method) at org.eclipse.swt.internal.motif.OS.XtDispatchEvent(OS.java:3906) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2809) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.ui.dialogs.FilteredResourcesSelectionDialog.open(FilteredResourcesSelectionDialog.java:352) at org.eclipse.ui.internal.ide.handlers.OpenResourceHandler.queryFileResource(OpenResourceHandler.java:154) at org.eclipse.ui.internal.ide.handlers.OpenResourceHandler.execute(OpenResourceHandler.java:88) at org.eclipse.ui.internal.ide.handlers.OpenResourceHandler.run(OpenResourceHandler.java:176) at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.execute(ActionDelegateHandlerProxy.java:289) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:472) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:824) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:882) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:571) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:512) at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:127) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:903) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:821) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:829) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:935) at org.eclipse.swt.widgets.Widget.XKeyPress(Widget.java:1160) at org.eclipse.swt.widgets.Composite.XKeyPress(Composite.java:1436) at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1106) at org.eclipse.swt.widgets.Display.windowProc(Display.java:3751) at org.eclipse.swt.internal.motif.OS._XtDispatchEvent(Native Method) at org.eclipse.swt.internal.motif.OS.XtDispatchEvent(OS.java:3906) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2809) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236)

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java