Community
Participate
Working Groups
This was done in Eclipse Neon RC1, freshly installed from the SDK 1. install UML Designer (latest nightly - version 7.0.0.201603291431) 2. File > New > Example... > Travel Agency UML 3. Expand the new project. The session will open when expanding the project, and the following exception be thrown : java.lang.IllegalArgumentException: Attempted to beginRule: L/TravelAgency/representations.aird, does not match outer scope rule: org.eclipse.sirius.business.api.modelingproject.AbstractRepresentationsFileJob$1@155e70a3 at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63) at org.eclipse.core.internal.jobs.ThreadJob.illegalPush(ThreadJob.java:134) at org.eclipse.core.internal.jobs.ThreadJob.push(ThreadJob.java:333) at org.eclipse.core.internal.jobs.ImplicitJobs.begin(ImplicitJobs.java:85) at org.eclipse.core.internal.jobs.JobManager.beginRule(JobManager.java:307) at org.eclipse.core.internal.resources.WorkManager.checkIn(WorkManager.java:121) at org.eclipse.core.internal.resources.Workspace.prepareOperation(Workspace.java:2188) at org.eclipse.core.internal.resources.File.setContents(File.java:334) at org.eclipse.core.internal.resources.File.setContents(File.java:434) at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl$PlatformResourceOutputStream.flush(PlatformResourceURIHandlerImpl.java:133) at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl$PlatformResourceOutputStream.close(PlatformResourceURIHandlerImpl.java:89) at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl$WorkbenchHelper$1.close(PlatformResourceURIHandlerImpl.java:175) at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1003) at org.eclipse.sirius.common.tools.api.resource.ResourceSetSync.doSave(ResourceSetSync.java:557) at org.eclipse.sirius.common.tools.api.resource.ResourceSetSync.save(ResourceSetSync.java:509) at org.eclipse.sirius.business.api.session.AbstractSavingPolicy.save(AbstractSavingPolicy.java:59) at org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl$1.run(DAnalysisSessionImpl.java:796) at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328) at org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl.doSave(DAnalysisSessionImpl.java:806) at org.eclipse.sirius.business.internal.session.danalysis.Saver.wrappedSave(Saver.java:145) at org.eclipse.sirius.business.internal.session.danalysis.Saver.saveNow(Saver.java:114) at org.eclipse.sirius.business.internal.session.danalysis.Saver.transactionClosed(Saver.java:85) at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl$LifecycleImpl.fireLifecycleEvent(TransactionalEditingDomainImpl.java:1383) at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl$LifecycleImpl.transactionClosed(TransactionalEditingDomainImpl.java:1401) at org.eclipse.emf.transaction.impl.TransactionImpl.close(TransactionImpl.java:733) at org.eclipse.emf.transaction.impl.TransactionImpl.commit(TransactionImpl.java:474) at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:155) at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:488) at org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl.doExecute(WorkspaceCommandStackImpl.java:208) at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165) at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219) at org.obeonetwork.dsl.uml2.design.api.utils.UmlViewpoints.enableReused(UmlViewpoints.java:73) at org.obeonetwork.dsl.uml2.design.internal.listeners.UmlDesignerSessionListener.notify(UmlDesignerSessionListener.java:44) at org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl.notifyListeners(DAnalysisSessionImpl.java:1019) at org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl.open(DAnalysisSessionImpl.java:1181) at org.eclipse.sirius.ui.tools.internal.views.common.modelingproject.OpenRepresentationsFileJob.performOpenSession(OpenRepresentationsFileJob.java:149) at org.eclipse.sirius.ui.tools.internal.views.common.modelingproject.OpenRepresentationsFileJob.runInWorkspace(OpenRepresentationsFileJob.java:113) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Very probably caused by/related to Bug #490164 - Give better feedback on unsuccesful session opening, and in particular https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=2acb5761b8e4fffc836e0f21354438c3608f3bd6 which introduces the AbstractRepresentationsFileJob$1 class visible in the stack.
A change recently submitted to EcoreTools and which could be related..(or not) but it adds a new "Waiting" call in the wizard. https://git.eclipse.org/c/ecoretools/org.eclipse.ecoretools.git/commit/?id=0ef6f91fa10f2aedc3c2f9bd2806400a76aaf59f
This bug seems not linked to UML Designer. I have the same stack with a modeling project containing a basicfamily semantic model. No idea how to reproduce this problem for the moment.
To complete comment 3, the stacktrace is not exactly the same: java.lang.RuntimeException: The modeling project "basicfamily.sample" is invalid: Problem during loading models: Attempted to beginRule: P/basicfamily.sample, does not match outer scope rule: org.eclipse.sirius.business.api.modelingproject.AbstractRepresentationsFileJob$1@ad69e04 at org.eclipse.sirius.ui.tools.internal.views.common.modelingproject.OpenRepresentationsFileJob.runInWorkspace(OpenRepresentationsFileJob.java:123) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: java.lang.IllegalArgumentException: Attempted to beginRule: P/basicfamily.sample, does not match outer scope rule: org.eclipse.sirius.business.api.modelingproject.AbstractRepresentationsFileJob$1@ad69e04 at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63) at org.eclipse.core.internal.jobs.ThreadJob.illegalPush(ThreadJob.java:134) at org.eclipse.core.internal.jobs.ThreadJob.push(ThreadJob.java:333) at org.eclipse.core.internal.jobs.ImplicitJobs.begin(ImplicitJobs.java:85) at org.eclipse.core.internal.jobs.JobManager.beginRule(JobManager.java:307) at org.eclipse.core.internal.resources.WorkManager.checkIn(WorkManager.java:121) at org.eclipse.core.internal.resources.Workspace.prepareOperation(Workspace.java:2188) at org.eclipse.core.internal.resources.Resource.refreshLocal(Resource.java:1586) at org.eclipse.core.internal.resources.File.refreshLocal(File.java:316) at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl$WorkbenchHelper.createPlatformResourceInputStream(PlatformResourceURIHandlerImpl.java:205) at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl.createInputStream(PlatformResourceURIHandlerImpl.java:525) at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:360) at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:354) at org.eclipse.sirius.business.internal.migration.AbstractVersionSAXParser.getVersion(AbstractVersionSAXParser.java:74) at org.eclipse.sirius.business.internal.resource.AirDResourceFactory.createResource(AirDResourceFactory.java:95) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.createResource(ResourceSetImpl.java:434) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandCreateResource(ResourceSetImpl.java:243) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$ResourceLocator.demandCreateResource(ResourceSetImpl.java:772) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$MappedResourceLocator.getResource(ResourceSetImpl.java:1199) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:352) at org.eclipse.sirius.business.internal.session.SessionFactoryImpl.loadSessionModelResource(SessionFactoryImpl.java:118) at org.eclipse.sirius.business.internal.session.SessionFactoryImpl.createSession(SessionFactoryImpl.java:102) at org.eclipse.sirius.business.internal.session.SessionManagerImpl.getSession(SessionManagerImpl.java:253) at org.eclipse.sirius.ui.tools.internal.views.common.modelingproject.OpenRepresentationsFileJob.performOpenSession(OpenRepresentationsFileJob.java:143) at org.eclipse.sirius.ui.tools.internal.views.common.modelingproject.OpenRepresentationsFileJob.runInWorkspace(OpenRepresentationsFileJob.java:113) ... 2 more
I have the steps to reproduce systematically scenario of comment 3 but it needs to put breakpoint in the code (to avoid the unreliable reproduction conditions) : * Launch a workspace with the Sirius code * Launch a runtime * Create a VSP with a basicfamily as semantic model, activate the Viewpoint "persons" and create a simple diagram * Close all opened editors * Close the runtime * Add a breakpoint at line 203 of org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl.WorkbenchHelper.createPlatformResourceInputStream(String, Map<?, ?>): On the line "if (!file.isSynchronized(IResource.DEPTH_ONE))" * Restart the runtime * Expand the VSP * The debug stops on the breakpoint * Modify the aird file with an external editor (add a blank line for example) * Resume the debug: KO you have the same problem as explained in comment 3.
New Gerrit change created: https://git.eclipse.org/r/73568
New Gerrit change created: https://git.eclipse.org/r/73690
After analysis, the rule added to AbstractRepresentationsFileJob in bug 490164 to avoid conflicting execution is not enough. Indeed, during the execution of this job, some resources modifications in worskpace can occur. So the rule of this job must "include" rules of such modifications. The Workspace rule is the right one as modications can concern all files (according to Viewpoint Modeling project dependency). The gerrit https://git.eclipse.org/r/73568 concerns this changes.
With the change of gerrit https://git.eclipse.org/r/73568, we can observe a deadlock on ModelingToggleNatureAction. To resume, the ModelingToggleNatureAction takes the lock on "Workspace Rule", schedules the job OpenRepresentationsFileJob and wait the end of the execution of the job. The OpenRepresentationsFileJob needs the "Workspace Rule" to be launched: deadlock. Randum failures occur on ConvertProjectToModelingProjectTest.testConvertToModelingProjectWithoutRepresentationFileButSemanticResources. This is probably linked to the above problem (but now more clearly identified by a deadlock). The gerrit https://git.eclipse.org/r/73690 explicitly launches the action in a workspace modify operation with workspace scheduling rule and does not scheduled a job for the representations file opening but directly executes it.
Gerrit change https://git.eclipse.org/r/73568 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=55d48ca454d9c6f3a3741c930e4dff1e39358cae
Gerrit change https://git.eclipse.org/r/73690 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=ea0a51ede1a426798c801c62ba5b393d0adeec83
Fixed in Sirius 4.0 RC3
Validated on Sirius 4.0.0.201605261201 with remote debug. Conversion of project to a modeling project with and without exisitng aird also works fine.
Available in Sirius 4.0.0.