Steps to reproduce:
Problem:
- No dialog appears
- Eclipse stop responding to mouse clicks and keyboard events
- After killing the eclipse - workspace is broken. Eclipse starts, but doesn't respond any more
In the log appears:
!ENTRY org.eclipse.ui 4 0 2014-09-11 16:57:28.203
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.swt.SWTError: No more handles
at org.eclipse.swt.SWT.error(SWT.java:4467)
at org.eclipse.swt.SWT.error(SWT.java:4356)
at org.eclipse.swt.SWT.error(SWT.java:4327)
at org.eclipse.swt.widgets.Display.error(Display.java:1258)
at org.eclipse.swt.widgets.Display.internal_new_GC(Display.java:2676)
at org.eclipse.swt.graphics.Image.getImageData(Image.java:1361)
at org.eclipse.swt.internal.ImageList.set(ImageList.java:405)
at org.eclipse.swt.internal.ImageList.add(ImageList.java:70)
at org.eclipse.swt.widgets.Tree.imageIndex(Tree.java:3690)
at org.eclipse.swt.widgets.TreeItem.setImage(TreeItem.java:1685)
at org.eclipse.jface.viewers.TreeViewerRow.setImage(TreeViewerRow.java:110)
at org.eclipse.jface.viewers.ViewerCell.setImage(ViewerCell.java:169)
at org.eclipse.jface.viewers.WrappedViewerLabelProvider.update(WrappedViewerLabelProvider.java:147)
at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:154)
at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:949)
at org.eclipse.jface.viewers.CheckboxTreeViewer.doUpdateItem(CheckboxTreeViewer.java:119)
at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:114)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:178)
at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:1029)
at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:472)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:178)
at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2150)
at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeViewer.java:843)
at org.eclipse.jface.viewers.AbstractTreeViewer$1.run(AbstractTreeViewer.java:818)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:791)
at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:611)
at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:762)
at org.eclipse.jface.viewers.AbstractTreeViewer.internalInitializeTree(AbstractTreeViewer.java:1543)
at org.eclipse.jface.viewers.TreeViewer.internalInitializeTree(TreeViewer.java:790)
at org.eclipse.jface.viewers.AbstractTreeViewer$5.run(AbstractTreeViewer.java:1527)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1436)
at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:366)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1397)
at org.eclipse.jface.viewers.CheckboxTreeViewer.preservingSelection(CheckboxTreeViewer.java:408)
at org.eclipse.jface.viewers.AbstractTreeViewer.inputChanged(AbstractTreeViewer.java:1519)
at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:292)
at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1675)
at com.drgarbage.bytecode.jdi.dialogs.JDIExportFromJvmDialog.fillList(JDIExportFromJvmDialog.java:475)
at com.drgarbage.bytecode.jdi.dialogs.JDIExportFromJvmDialog.createControls(JDIExportFromJvmDialog.java:170)
at com.drgarbage.bytecode.jdi.dialogs.JDIExportFromJvmDialog.<init>(JDIExportFromJvmDialog.java:127)
at com.drgarbage.bytecodevisualizer.actions.GetClassesFromJVMAction.run(GetClassesFromJVMAction.java:66)
at com.drgarbage.bytecodevisualizer.actions.GetClassesFromJVMAction.runWithEvent(GetClassesFromJVMAction.java:74)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:462)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:236)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
The exception is thrown in the last line of the following method:
The list of classes is probably too long. The SWT handler of the FilteredTree is not able to render the list.
We have to implement a workaround:
- Check the length of the list
- if the list is too long, display the first 100 entries
Fixed in r659.
We should think about a proper solution.
Done properly in r660. Displays a dialogue if more than 1000 classes in jvm. Please test, I'm to lazy to create 10000 classes :-)