Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337098

Summary: IllegalStateException while disposing Workbench
Product: [RT] RAP Reporter: Ivan Furnadjiev <ivan>
Component: WorkbenchAssignee: Project Inbox <rap-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: eclipse
Version: 1.4   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Ivan Furnadjiev CLA 2011-02-14 05:30:10 EST
In some rare cases there is an IllegalStateException when the workbench is shutdown. It is hard to reproduce, but here are the steps:
- Start the RAP Workbench Demo from the IDE
- Go to the console in the IDE and type "close" to shutdown the application
- In some rare case there is an IllegalStateException:
-----------------
osgi> close

2011-02-10 20:11:13.602:WARN:/:ERROR: Exception while executing dispose-listener.

java.lang.IllegalStateException: The service has been unregistered
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:209)
	at org.eclipse.ui.internal.Workbench.shutdown(Workbench.java:3085)
	at org.eclipse.ui.internal.Workbench.busyClose(Workbench.java:1161)
	at org.eclipse.ui.internal.Workbench.access$12(Workbench.java:1072)
	at org.eclipse.ui.internal.Workbench$22.run(Workbench.java:1338)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:66)
	at org.eclipse.ui.internal.Workbench.close(Workbench.java:1336)
	at org.eclipse.ui.internal.Workbench.close(Workbench.java:1298)
	at org.eclipse.ui.internal.Workbench$ShutdownHandler.handleEvent(Workbench.java:388)
	at org.eclipse.swt.widgets.Display.sendDisposeEvent(Display.java:710)
	at org.eclipse.swt.widgets.Display.release(Display.java:689)
	at org.eclipse.swt.graphics.Device.dispose(Device.java:282)
	at org.eclipse.rwt.internal.lifecycle.UIThread.processShutdown(UIThread.java:159)
	at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:125)
	at java.lang.Thread.run(Thread.java:662)
	at org.eclipse.rwt.internal.lifecycle.UIThread.run(UIThread.java:102)
Originally occurred when investigating Bug 336852.
Comment 1 Ivan Furnadjiev CLA 2011-05-30 05:23:20 EDT
Currently with CVS HEAD and v14_Maintenance this exception is 100% reproducible for me.
Comment 2 Ivan Furnadjiev CLA 2012-03-23 05:27:13 EDT
I can't reproduce this issue anymore. Seems to be fixed meanwhile. I will reopen the bug if I get it again.