osate / osate2

Open Source AADL2 Tool Environment
http://osate.org
Eclipse Public License 2.0
36 stars 8 forks source link

null pointer error on OSATE startup when AADL Properties view is open #191

Closed reteprelief closed 11 years ago

reteprelief commented 11 years ago

If you exit OSATE with the AADL Properties view open, OSATE will encounter a null pointer exception when trying to initialize the property viewer. It tries to retrieve the injector for aadl2, but that may not have been initialized.

reteprelief commented 11 years ago

There seems to be a race condition as it does not always occur. We need to make sure the registerInjector for aadl2 gets called before the property viewer, which resides in the properties.ui plug-in, asks for it. Probably have brake the dependency cycle and maybe place the viewer in a separate plugin ?

juli1 commented 11 years ago

What is the package that should initialize the Injector first ? Maybe we have to introduce a manual dependency to it so that we make sure it is started first.

reteprelief commented 11 years ago

I also get the following sometimes, when I have the tesxt editor and the instance model editor open and its is reopened when OSATE starts again.

org.eclipse.core.runtime.CoreException: Plug-in org.osate.xtext.aadl2.ui was unable to load class org.osate.xtext.aadl2.ui.Aadl2ExecutableExtensionFactory. at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194) at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:176) at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugin.java:273) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)

joeseibel commented 11 years ago

Fixed with 00ee7be0ea5c79d4e8a19c5e5fc64e3c990d8cbc by moving the property view from org.osate.ui to org.osate.xtext.aadl2.ui. Note that I also changed the property view's extension ID to match its new location. This means that workspaces with an open property view will complain about the view not being found. Simply close the property view and reopen it. This will only happen once per workspace.