Bug 548030 - Execution of ModelLoadJob during workspace shutdown causes BundleException
Summary: Execution of ModelLoadJob during workspace shutdown causes BundleException
Status: CLOSED MOVED
Alias: None
Product: Sphinx
Classification: Automotive
Component: Core (show other bugs)
Version: 0.11.0   Edit
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-07 06:12 EDT by Snejana Bisa CLA
Modified: 2024-05-08 14:58 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Snejana Bisa CLA 2019-06-07 06:12:04 EDT
Preconditions: an Eclipse project imported inside the workspace

Steps to reproduce the problem:
- copy a set of model files via system file operations inside the project
- trigger an eclipse application (command line) that accesses the above project

Observed (random) behavior: 

The following exception is thrown several times (once for each file copied via file-system operations):

BundleException occurred when invoking code from unknown plug-in: Cannot transiently start a module whose start level is not met..
org.osgi.framework.BundleException: Cannot transiently start a module whose start level is not met.
	at org.eclipse.osgi.container.Module.start(Module.java:413)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383)
	at org.eclipse.sphinx.platform.util.ExtendedPlatform.loadBundle(ExtendedPlatform.java:164)
	at org.eclipse.sphinx.emf.internal.filesystem.PlatformURIFileStore.existsPlatformPluginURI(PlatformURIFileStore.java:68)
	at org.eclipse.sphinx.emf.internal.filesystem.PlatformURIFileStore.fetchInfo(PlatformURIFileStore.java:87)
	at org.eclipse.core.filesystem.provider.FileStore.fetchInfo(FileStore.java:258)
	at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.emf.ecore.resource.impl.EFSURIHandlerImpl.getInfo(EFSURIHandlerImpl.java:173)
	at org.eclipse.emf.ecore.resource.impl.EFSURIHandlerImpl.getInfo(EFSURIHandlerImpl.java:179)
	at org.eclipse.emf.ecore.resource.impl.EFSURIHandlerImpl.exists(EFSURIHandlerImpl.java:305)
	at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.exists(ExtensibleURIConverterImpl.java:378)
	at org.eclipse.sphinx.emf.util.EcoreResourceUtil.exists(EcoreResourceUtil.java:218)
	at org.eclipse.sphinx.emf.resource.SchemaLocationURIHandler.resolve(SchemaLocationURIHandler.java:79)
	at org.artop.aal.common.resource.impl.AutosarResourceFactoryImpl$1.resolve(AutosarResourceFactoryImpl.java:114)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleXSISchemaLocation(XMLHandler.java:1703)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleNamespaceAttribs(XMLHandler.java:855)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:999)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:719)
	at org.artop.aal.serialization.internal.AutosarSAXXMLHandler.startElement(AutosarSAXXMLHandler.java:254)
	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
	at org.eclipse.sphinx.emf.resource.ExtendedXMLLoadImpl.load(ExtendedXMLLoadImpl.java:193)
	at org.artop.aal.common.resource.impl.AutosarXMLResourceImpl.doLoad(AutosarXMLResourceImpl.java:354)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1518)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1297)
	at org.eclipse.sphinx.emf.util.EcoreResourceUtil.loadResource(EcoreResourceUtil.java:1338)
	at org.eclipse.sphinx.emf.util.EcoreResourceUtil.loadResource(EcoreResourceUtil.java:933)
	at org.eclipse.sphinx.emf.util.EcorePlatformUtil$7.run(EcorePlatformUtil.java:723)
	at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
	at org.eclipse.emf.transaction.util.TransactionUtil.runExclusive(TransactionUtil.java:328)
	at org.eclipse.sphinx.emf.util.EcorePlatformUtil.loadResource(EcorePlatformUtil.java:719)
	at org.eclipse.sphinx.emf.workspace.loading.operations.AbstractLoadOperation$1.run(AbstractLoadOperation.java:294)
	at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
	at org.eclipse.sphinx.emf.workspace.loading.operations.AbstractLoadOperation.loadModelFilesInEditingDomain(AbstractLoadOperation.java:271)
	at org.eclipse.sphinx.emf.workspace.loading.operations.AbstractLoadOperation$2.run(AbstractLoadOperation.java:487)
	at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
	at org.eclipse.sphinx.emf.workspace.loading.operations.AbstractLoadOperation.runReloadModelFiles(AbstractLoadOperation.java:476)
	at org.eclipse.sphinx.emf.workspace.loading.operations.AbstractLoadOperation.runDetectAndReloadModelFiles(AbstractLoadOperation.java:431)
	at org.eclipse.sphinx.emf.workspace.loading.operations.FileReloadOperation.run(FileReloadOperation.java:47)
	at org.eclipse.sphinx.emf.workspace.internal.loading.ModelLoadJob.run(ModelLoadJob.java:52)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)


Enabling tracing for the Equinox OSGi Framework (debug, debug/messageBundles, debug/startlevel, monitor/activation options), has shown that these exceptions happen on workspace shutdown. 

The exceptions are thrown from org.eclipse.sphinx.emf.workspace.internal.loading.ModelLoadJob, a thread run asynchronously by LoadJobScheduler on org.eclipse.sphinx.emf.workspace.loading.LoadJobScheduler.scheduleModelLoadJob(FileLoadOperation), as a result of org.eclipse.sphinx.emf.workspace.loading.ModelLoadManager.loadFiles(Collection<IFile>, boolean, IProgressMonitor) call from org.eclipse.sphinx.emf.workspace.internal.syncing.ModelSyncRequest.perform() (line 275).


Clearly, the execution of the job performing the sync should be aborted if the workspace is shutting done.
Comment 1 Balazs Grill CLA 2024-05-07 00:16:53 EDT
This issue will be migrated to gitlab.
Comment 2 Eclipse Webmaster CLA 2024-05-08 14:58:12 EDT
This issue has been migrated to https://gitlab.eclipse.org/eclipse/sphinx/org.eclipse.sphinx/-/issues/1.