Menu

#835 Executing certain Activities can fail randomly

OTHER
closed-wont-fix
nobody
None
3
2018-03-15
2014-09-16
No

See trace log below.

We currently have the problem that we do not control at which stack level our activities get executed in the EDT.

In this example we triggered a save operation via the GUI IDE. During the execution the progress monitor for providing update for that operation decided to run the SWT event queue where our logic now takes over and tries to save another editor. Unfortunatly the Eclipse logic prevents that.

TRACE 06:15:38,700 [main] (EditorManager.java:1382) EditorManager.saveText (HelloWorld.java) invoked
TRACE 06:15:38,701 [main] (EditorManager.java:1405) .saveText File HelloWorld.java will be saved
TRACE 06:15:38,701 [main] (EditorManager.java:464) .connect(L/foo/src/bar/HelloWorld.java) invoked
TRACE 06:15:38,701 [main] (EditorManager.java:1433) EditorManager.saveText Annotations on the IDocument are set
TRACE 06:15:38,702 [main] (EditorManager.java:487) .disconnect(L/foo/src/bar/HelloWorld.java) invoked
ERROR 06:15:38,703 [main] (ActivityHandler.java:374) failed to execute activity: EditorActivity(type: SAVED, path: SPath [path=src/bar/HelloWorld.java, project=foo])
java.lang.IllegalArgumentException: Attempted to beginRule: L/foo/src/bar/HelloWorld.java, does not match outer scope rule: L/foo/src/HelloGermany.java
at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
at org.eclipse.core.internal.jobs.ThreadJob.illegalPush(ThreadJob.java:136)
at org.eclipse.core.internal.jobs.ThreadJob.push(ThreadJob.java:327)
at org.eclipse.core.internal.jobs.ImplicitJobs.begin(ImplicitJobs.java:63)
at org.eclipse.core.internal.jobs.JobManager.beginRule(JobManager.java:286)
at org.eclipse.core.internal.resources.WorkManager.checkIn(WorkManager.java:117)
at org.eclipse.core.internal.resources.Workspace.prepareOperation(Workspace.java:1914)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1970)
at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:75)
at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:65)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.executeOperation(TextFileDocumentProvider.java:456)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.saveDocument(TextFileDocumentProvider.java:772)
at de.fu_berlin.inf.dpp.editor.EditorManager.saveEditor(EditorManager.java:1439)
at de.fu_berlin.inf.dpp.editor.EditorManager.execEditorActivity(EditorManager.java:728)
at de.fu_berlin.inf.dpp.editor.EditorManager.access$5(EditorManager.java:717)
at de.fu_berlin.inf.dpp.editor.EditorManager$2.receive(EditorManager.java:231)
at de.fu_berlin.inf.dpp.activities.EditorActivity.dispatch(EditorActivity.java:115)
at de.fu_berlin.inf.dpp.session.AbstractActivityConsumer.exec(AbstractActivityConsumer.java:85)
at de.fu_berlin.inf.dpp.editor.EditorManager$2.exec(EditorManager.java:226)
at de.fu_berlin.inf.dpp.project.internal.SarosSession$2.execute(SarosSession.java:213)
at de.fu_berlin.inf.dpp.project.internal.ActivityHandler$3.run(ActivityHandler.java:372)
at de.fu_berlin.inf.dpp.util.ThreadUtils$1.run(ThreadUtils.java:38)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3515)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3164)
at org.eclipse.ui.internal.dialogs.EventLoopProgressMonitor.runEventLoop(EventLoopProgressMonitor.java:123)
at org.eclipse.ui.internal.dialogs.EventLoopProgressMonitor.isCanceled(EventLoopProgressMonitor.java:97)
at org.eclipse.core.runtime.ProgressMonitorWrapper.isCanceled(ProgressMonitorWrapper.java:106)
at org.eclipse.core.runtime.SubMonitor$RootInfo.isCanceled(SubMonitor.java:259)
at org.eclipse.core.runtime.SubMonitor.isCanceled(SubMonitor.java:516)
at org.eclipse.core.runtime.ProgressMonitorWrapper.isCanceled(ProgressMonitorWrapper.java:106)
at org.eclipse.core.runtime.ProgressMonitorWrapper.isCanceled(ProgressMonitorWrapper.java:106)
at org.eclipse.core.runtime.ProgressMonitorWrapper.isCanceled(ProgressMonitorWrapper.java:106)
at org.eclipse.jdt.internal.core.JavaModelOperation.isCanceled(JavaModelOperation.java:541)
at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:248)
at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:515)
at org.eclipse.jdt.internal.core.CompilationUnit.makeConsistent(CompilationUnit.java:1084)
at org.eclipse.jdt.internal.core.CompilationUnit.makeConsistent(CompilationUnit.java:1064)
at org.eclipse.jdt.internal.core.CommitWorkingCopyOperation.executeOperation(CommitWorkingCopyOperation.java:124)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:728)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:793)
at org.eclipse.jdt.internal.core.CompilationUnit.commitWorkingCopy(CompilationUnit.java:391)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.commitWorkingCopy(CompilationUnitDocumentProvider.java:1361)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider$4.execute(CompilationUnitDocumentProvider.java:1432)
at org.eclipse.ui.editors.text.TextFileDocumentProvider$DocumentProviderOperation.run(TextFileDocumentProvider.java:132)
at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute(WorkspaceModifyDelegatingOperation.java:69)
at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:75)
at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:65)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.executeOperation(TextFileDocumentProvider.java:456)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.saveDocument(TextFileDocumentProvider.java:772)
at org.eclipse.ui.texteditor.AbstractTextEditor.performSave(AbstractTextEditor.java:4879)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.performSave(CompilationUnitEditor.java:1230)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.doSave(CompilationUnitEditor.java:1283)
at org.eclipse.ui.texteditor.AbstractTextEditor$TextEditorSavable.doSave(AbstractTextEditor.java:7003)
at org.eclipse.ui.Saveable.doSave(Saveable.java:214)
at org.eclipse.ui.internal.SaveableHelper.doSaveModel(SaveableHelper.java:349)
at org.eclipse.ui.internal.SaveableHelper$3.run(SaveableHelper.java:195)
at org.eclipse.ui.internal.SaveableHelper$5.run(SaveableHelper.java:277)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2600)
at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:285)
at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:264)
at org.eclipse.ui.internal.SaveableHelper.saveModels(SaveableHelper.java:207)
at org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:144)
at org.eclipse.ui.internal.EditorManager.savePart(EditorManager.java:1369)
at org.eclipse.ui.internal.WorkbenchPage.savePart(WorkbenchPage.java:3334)
at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:3347)
at org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor$3.run(SWTBotEditor.java:97)
at org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable$4.doRun(UIThreadRunnable.java:196)
at org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable$1.run(UIThreadRunnable.java:89)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3515)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3164)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
TRACE 06:15:38,707 [main] (ChecksumCacheImpl.java:75) invalidating checksum for existing file: /foo/src/HelloGermany.java [0xDC84224C051B574943A413AC7A6DDEDA]
TRACE 06:15:38,712 [main] (SharedResourcesManager.java:211) currentJob='Implicit Job'
TRACE 06:15:38,712 [main] (SharedResourcesManager.java:230) .resourceChanged() - Delta will be processed
TRACE 06:15:38,713 [main] (SharedResourcesManager.java:238) handlePostChange
C(0) /
C(0) /foo
C(0) /foo/src
C(C) /foo/src/HelloGermany.java

Discussion

  • Stefan Rossbach

    Stefan Rossbach - 2017-04-17
    • Group: 13.3.29 --> OTHER
     
  • tobous

    tobous - 2018-03-15
    • status: open-wont-fix --> closed-wont-fix
     

Log in to post a comment.