Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 194699 - Eclipse crash on startup
Summary: Eclipse crash on startup
Status: RESOLVED DUPLICATE of bug 194917
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Mik Kersten CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-27 21:46 EDT by Eugene Kuleshov CLA
Modified: 2007-07-23 18:43 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Kuleshov CLA 2007-06-27 21:46:21 EDT
What happens is that I had to kill Workbench because of some modal dialog from some 3rd party plugin lost keyboard focus. After that Eclipse was crashing on startup. So, I had to remove all Mylyn plugins to get my workbench back and then add them back after restarting again.

I am not exactly sure if it is actually related to Mylyn, but there is an NPE in MonitorUiPlugin.stop() that need to be fixed anyways. Here is the stack trace from crash.

!SESSION 2007-06-27 21:29:56.535 -----------------------------------------------
eclipse.buildId=I20070608-1718
java.version=1.6.0
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_CA
Command-line arguments:  -os win32 -ws win32 -arch x86 -clean

!ENTRY org.eclipse.core.resources 2 10035 2007-06-27 21:29:59.426
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

!ENTRY org.eclipse.ui.workbench 4 0 2007-06-27 21:30:06.910
!MESSAGE Widget disposed too early!
!STACK 0
java.lang.RuntimeException: Widget disposed too early!
	at org.eclipse.ui.internal.WorkbenchPartReference$1.widgetDisposed(WorkbenchPartReference.java:169)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:116)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:943)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:740)
	at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:662)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:743)
	at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:662)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:743)
	at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:662)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:743)
	at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:662)
	at org.eclipse.swt.widgets.Canvas.releaseChildren(Canvas.java:117)
	at org.eclipse.swt.widgets.Decorations.releaseChildren(Decorations.java:782)
	at org.eclipse.swt.widgets.Shell.releaseChildren(Shell.java:1134)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:743)
	at org.eclipse.swt.widgets.Widget.dispose(Widget.java:410)
	at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:457)
	at org.eclipse.swt.widgets.Shell.dispose(Shell.java:653)
	at org.eclipse.jface.window.Window.close(Window.java:330)
	at org.eclipse.jface.window.ApplicationWindow.close(ApplicationWindow.java:306)
	at org.eclipse.ui.internal.WorkbenchWindow.hardClose(WorkbenchWindow.java:1600)
	at org.eclipse.ui.internal.WorkbenchWindow.busyClose(WorkbenchWindow.java:699)
	at org.eclipse.ui.internal.WorkbenchWindow.access$0(WorkbenchWindow.java:675)
	at org.eclipse.ui.internal.WorkbenchWindow$2.run(WorkbenchWindow.java:790)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.ui.internal.WorkbenchWindow.close(WorkbenchWindow.java:788)
	at org.eclipse.ui.internal.Workbench$60.runWithException(Workbench.java:3358)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296)
	at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:797)
	at org.eclipse.ui.internal.Workbench$25.runWithException(Workbench.java:1342)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2309)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
	at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1144)

!ENTRY org.eclipse.mylyn 4 0 2007-06-27 21:30:07.535
!MESSAGE Mylar Monitor stop failed

!STACK 0
java.lang.NullPointerException
	at org.eclipse.mylyn.monitor.ui.MonitorUiPlugin.stop(MonitorUiPlugin.java:143)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl$3.run(BundleContextImpl.java:1040)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.stop(BundleContextImpl.java:1036)
	at org.eclipse.osgi.framework.internal.core.BundleHost.stopWorker(BundleHost.java:457)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.suspend(AbstractBundle.java:526)
	at org.eclipse.osgi.framework.internal.core.Framework.suspendBundle(Framework.java:1148)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.decFWSL(StartLevelManager.java:675)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:291)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.shutdown(StartLevelManager.java:261)
	at org.eclipse.osgi.framework.internal.core.SystemBundle.suspend(SystemBundle.java:188)
	at org.eclipse.osgi.framework.internal.core.Framework.shutdown(Framework.java:622)
	at org.eclipse.osgi.framework.internal.core.Framework.close(Framework.java:525)
	at org.eclipse.osgi.framework.internal.core.OSGi.close(OSGi.java:41)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.shutdown(EclipseStarter.java:399)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:197)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1144)
Comment 1 Mik Kersten CLA 2007-06-28 12:33:26 EDT
That Mylyn NPE is fine and we print that message on purpose, in case you had tried to deactivate the plug-in without restarting and something went wrong.  In this case it's the workbench that was no longer around.  How is this a critical bug and what does it have to do with Mylyn?
Comment 2 Eugene Kuleshov CLA 2007-06-28 12:45:13 EDT
(In reply to comment #1)
> That Mylyn NPE is fine and we print that message on purpose, in case you had
> tried to deactivate the plug-in without restarting and something went wrong. 
> In this case it's the workbench that was no longer around.  How is this a
> critical bug and what does it have to do with Mylyn?

Sorry, I probably didn't explain this clearly. I wasn't been able to resolve Eclipse crash with this corresponding stack trace and wasn't been able to start Eclipse at all (hence critical bug). It just kept crashing.

I was only able to start Eclipse again only after I removed all Mylyn plugins (and only them) from that configuration and that is why I thought that it look like something related to Mylyn.
Comment 3 Mik Kersten CLA 2007-06-28 13:16:12 EDT
I can't investigate further now but assume that there is nothing stop-ship here.
Comment 4 Eugene Kuleshov CLA 2007-06-28 14:00:00 EDT
It is probably minor, though line 143 of MonitorUiPlugin have 2 potential NPE slots, that better to report separately instead of catching and logging NPE (which is not a descriptive error):

  getWorkbench().getActiveWorkbenchWindow().getShell().removeShellListener(shellLifecycleListener);
Comment 5 Mik Kersten CLA 2007-07-23 14:51:06 EDT
I have seen this failure happen as a result of bug 194917.  Manually editing or removing workingsets.xml (in .plugins) or allowing Eclipse 2-3 chances to restart can be used to work-around this problem until we fix it.

I added a paranoid null check to MonitorUiPlugin as suggested, but do not know of a scenario where the workbnech would get into that state.

*** This bug has been marked as a duplicate of bug 194917 ***
Comment 6 Mik Kersten CLA 2007-07-23 14:51:30 EDT
Wrong assignment.
Comment 7 Mik Kersten CLA 2007-07-23 18:43:16 EDT

*** This bug has been marked as a duplicate of bug 194917 ***