Bug 573070

Summary: Error in AbstractUIPlugin when shutdown "too late"
Product: [Eclipse Project] Platform Reporter: Christoph Laeubrich <laeubi>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 4.20   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Christoph Laeubrich CLA 2021-04-22 00:46:40 EDT
I have an UI plugin that is started as early as possible (and thus, shut down late), this throws the following exception on shutdown:

org.eclipse.core.runtime.AssertionFailedException: assertion failed: Die Anwendung wurde nicht initialisiert.
	at org.eclipse.core.runtime.Assert.isTrue(Assert.java:113)
	at org.eclipse.core.internal.runtime.InternalPlatform.assertInitialized(InternalPlatform.java:139)
	at org.eclipse.core.internal.runtime.InternalPlatform.getInstanceLocation(InternalPlatform.java:331)
	at org.eclipse.core.runtime.Plugin.savePluginPreferences(Plugin.java:341)
	at org.eclipse.ui.plugin.AbstractUIPlugin.savePreferenceStore(AbstractUIPlugin.java:436)
	at org.eclipse.ui.plugin.AbstractUIPlugin.stop(AbstractUIPlugin.java:539)

The AbstractUIPlugin tries to check for the are to be null or initialized but this check seem to not work anymore due to the exception:

if (instance == null || !instance.isSet())
			// If the instance area is not set there is no point in getting or setting the preferences.
			// There is nothing to save in this case.
			return;