Bug 6825 - Runtime exception caused eclipse CRASH
Summary: Runtime exception caused eclipse CRASH
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 critical (vote)
Target Milestone: ---   Edit
Assignee: Eduardo Pereira CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-12-11 17:10 EST by John Arthorne CLA
Modified: 2002-01-31 17:28 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2001-12-11 17:10:38 EST
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.
Comment 1 John Arthorne CLA 2001-12-14 14:43:10 EST
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...
Comment 2 John Arthorne CLA 2001-12-14 15:09:28 EST
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)
Comment 3 Kevin Haaland CLA 2001-12-19 13:20:27 EST
From stack trace looks like JFace text. 
Comment 4 Kevin Haaland CLA 2001-12-19 15:29:56 EST
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.
Comment 5 Eduardo Pereira CLA 2002-01-31 17:28:28 EST
Released a fix handling the case were an exception happend while handling 
exception in the event loop.