Community
Participate
Working Groups
I ran into a bug in the UI that caused a runtime exception (see bug 6824). This exception was caused by a JDT bug, but I wanted to report here the fact that eclipse completely CRASHED immediately after the error dialog was closed. This suggests that some exception occurred *during* the exception handling code in the Workbench class. There is no logging of this, so I can't give any details about what happened (the best the boot loader can do is printStackTrace(), but at that point it's too late). To be extra safe, maybe the call to handleExceptionInEventLoop could also be run in a try/catch block, at least in the case of relatively minor runtime exceptions.
This has happened twice again today. This is pretty serious, you lose all context, UI layouts, open editor buffers, built state, etc. Eclipse just disappears...
Ok, I hacked the boot loader to capture the exception stack trace, and reproduced the error. The stack trace below represents the error that causes Eclipse to crash. Note that it is the same exception as the reference PR, but it is happening in the event loop of the MessageDialog. Since there is no protective code around the MessageDialog invocation, this crashes the workbench. There are no consistent steps to reproduce. Roughly, it happens after hitting Ctrl+S in an editor. Immediately after the save/build progress dialog closes, I click in the content outline and the error occurs. java.lang.IllegalArgumentException: Index out of bounds at org.eclipse.swt.SWT.error(SWT.java:1873) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.custom.StyledText.getLocationAtOffset(StyledText.java:3295) at org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI.getMinimumLocation(Linked PositionUI.java:323) at org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI.paintControl(LinkedPositi onUI.java:307) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java(Compiled Code)) at org.eclipse.swt.widgets.Control.windowProc(Control.java(Compiled Code)) at org.eclipse.swt.widgets.Display.windowProc(Display.java(Compiled Code)) at org.eclipse.swt.internal.win32.OS.RedrawWindow(Native Method) at org.eclipse.swt.widgets.Control.update(Control.java(Compiled Code)) at org.eclipse.swt.widgets.Display.update(Display.java(Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java:554) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.jface.dialogs.MessageDialog.openError(MessageDialog.java:318) at org.eclipse.ui.internal.Workbench.handleExceptionInEventLoop(Workbench.java:373) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java(Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:758) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:82 0) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362)
From stack trace looks like JFace text.
Eduardo, Pls verify that the triggering bug has been fixed. If its in JFace text pls work with Kai to resolve. ALso note that the real intent of this defect is to point out a problem in our code that handles exceptions.
Released a fix handling the case were an exception happend while handling exception in the event loop.