Community
Participate
Working Groups
Build Identifier: 3.7.1 (20110916-0149) This is either a Subversive bug, or a Team framework bug. We have an IStructureCreator. When getStructure is called, we are given an input. If compare is comparing two files, say, those inputs (which in this example are ResourceElement from subversive) respond properly to getContents with an InputStream. When compare is called on the project folder that contains the files to compare, a compare editor comes up with the file in the top-left pane. Upon double clicking that our structure creator gets called, but when we call getContents on the ResourceElement, it fails. With a debugger we saw that "op" is null. In fact, AFTER our structure creator was asked to create things, that op gets set. So this could be a Team framework bug of calling things in a wrong order? (handle open vis-a-vis handle double click?) Two stacks that can be helpful: When comparing two files directly: The first breakpoint hit shows that the ResourceElement "op" is getting set, and our structure creator has not been called yet: Thread [ModalContext] (Suspended (breakpoint at line 507 in ResourceCompareInput$ResourceElement)) ResourceCompareInput$ResourceElement.getFetcher() line: 507 ThreeWayResourceCompareInput$CompareNode(ResourceCompareInput$BaseCompareNode).getFetcher() line: 627 ThreeWayResourceCompareInput(ResourceCompareInput).prepareInput(IProgressMonitor) line: 187 ThreeWayResourceCompareInput(CompareEditorInput).run(IProgressMonitor) line: 484 ModalContext$ModalContextThread.run() line: 121 here's the stack of who calls our structure creator: Thread [main] (Suspended (entry into method getStructure in EventFlowStructureCreator)) EventFlowStructureCreator.getStructure(Object) line: 128 StructureDiffViewer$StructureInfo.createStructure(IProgressMonitor) line: 160 StructureDiffViewer$StructureInfo.refresh(IProgressMonitor) line: 133 StructureDiffViewer$StructureInfo.setInput(ITypedElement, boolean, IProgressMonitor) line: 104 EventFlowStructureDiffViewer(StructureDiffViewer).compareInputChanged(ICompareInput, boolean, IProgressMonitor) line: 342 StructureDiffViewer$2.run(IProgressMonitor) line: 74 StructureDiffViewer$6.run() line: 322 BusyIndicator.showWhile(Display, Runnable) line: 70 EventFlowStructureDiffViewer(StructureDiffViewer).compareInputChanged(ICompareInput, boolean) line: 319 EventFlowStructureDiffViewer(StructureDiffViewer).compareInputChanged(ICompareInput) line: 307 EventFlowStructureDiffViewer(StructureDiffViewer).inputChanged(Object, Object) line: 278 EventFlowStructureDiffViewer(ContentViewer).setInput(Object) line: 280 EventFlowStructureDiffViewer(StructuredViewer).setInput(Object) line: 1690 CompareEditorInput$10(CompareViewerSwitchingPane).setInput(Object) line: 277 CompareEditorInput$10(CompareStructureViewerSwitchingPane).setInput(Object) line: 132 ThreeWayResourceCompareInput(CompareEditorInput).feedInput() line: 747 ThreeWayResourceCompareInput(CompareEditorInput).createContents(Composite) line: 555 CompareEditor.createCompareControl() line: 462 CompareEditor.createPartControl(Composite) line: 414 EditorReference.createPartHelper() line: 670 EditorReference.createPart() line: 465 EditorReference(WorkbenchPartReference).getPart(boolean) line: 595 EditorPane(PartPane).setVisible(boolean) line: 313 PresentablePart.setVisible(boolean) line: 180 PresentablePartFolder.select(IPresentablePart) line: 270 LeftToRightTabOrder.select(IPresentablePart) line: 65 TabbedStackPresentation.selectPart(IPresentablePart) line: 473 EditorStack(PartStack).refreshPresentationSelection() line: 1245 EditorStack(PartStack).setSelection(LayoutPart) line: 1198 EditorStack(PartStack).showPart(LayoutPart, Object) line: 1597 EditorStack(PartStack).add(LayoutPart, Object) line: 493 EditorStack.add(LayoutPart, Object) line: 103 EditorStack(PartStack).add(LayoutPart) line: 479 EditorStack.add(LayoutPart) line: 112 EditorSashContainer.addEditor(EditorPane, EditorStack) line: 63 EditorAreaHelper.addToLayout(EditorPane, EditorStack) line: 225 EditorAreaHelper.addEditor(EditorReference, String, boolean) line: 213 EditorManager.createEditorTab(EditorReference, String) line: 808 EditorManager.openEditorFromDescriptor(EditorDescriptor, IEditorInput, IMemento) line: 707 EditorManager.openEditor(String, IEditorInput, boolean, IMemento) line: 666 WorkbenchPage.busyOpenEditorBatched(IEditorInput, String, boolean, int, IMemento) line: 2942 WorkbenchPage.busyOpenEditor(IEditorInput, String, boolean, int, IMemento) line: 2850 WorkbenchPage.access$11(WorkbenchPage, IEditorInput, String, boolean, int, IMemento) line: 2842 WorkbenchPage$10.run() line: 2793 BusyIndicator.showWhile(Display, Runnable) line: 70 WorkbenchPage.openEditor(IEditorInput, String, boolean, int, IMemento) line: 2789 WorkbenchPage.openEditor(IEditorInput, String, boolean, int) line: 2773 WorkbenchPage.openEditor(IEditorInput, String, boolean) line: 2764 CompareUIPlugin$1.run() line: 523 CompareUIPlugin.syncExec(Runnable) line: 1263 CompareUIPlugin.internalOpenEditor(CompareEditorInput, IWorkbenchPage, IReusableEditor, boolean) line: 534 CompareUIPlugin.openCompareEditor(CompareEditorInput, IWorkbenchPage, IReusableEditor, boolean) line: 496 CompareUI.openCompareEditorOnPage(CompareEditorInput, IWorkbenchPage, boolean) line: 168 CompareUI.openCompareEditor(CompareEditorInput, boolean) line: 137 CompareUI.openCompareEditor(CompareEditorInput) line: 121 ResourceCompareInput.openCompareEditor(ResourceCompareInput, boolean) line: 118 CompareResourcesInternalOperation$4$1.run() line: 177 UILockListener.doPendingWork() line: 164 UISynchronizer$3.run() line: 158 RunnableLock.run() line: 35 UISynchronizer(Synchronizer).runAsyncMessages(boolean) line: 135 Display.runAsyncMessages(boolean) line: 4140 Display.readAndDispatch() line: 3757 Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 2696 Workbench.runUI() line: 2660 Workbench.access$4(Workbench) line: 2494 Workbench$7.run() line: 674 Realm.runWithDefault(Realm, Runnable) line: 332 Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 667 PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149 IDEApplication.start(IApplicationContext) line: 123 EclipseAppHandle.run(Object) line: 196 EclipseAppLauncher.runApplication(Object) line: 110 EclipseAppLauncher.start(Object) line: 79 EclipseStarter.run(Object) line: 344 EclipseStarter.run(String[], Runnable) line: 179 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object...) line: 597 Main.invokeFramework(String[], URL[]) line: 622 Main.basicRun(String[]) line: 577 Main.run(String[]) line: 1410 Main.main(String[]) line: 1386 NOW the stacks when someone calls compare with on the project folder itself, after seeing the compare editor come up and double click on the file that has a change: our getStructure called first (which is problematic): Thread [main] (Suspended (entry into method getStructure in EventFlowStructureCreator)) EventFlowStructureCreator.getStructure(Object) line: 128 StructureDiffViewer$StructureInfo.createStructure(IProgressMonitor) line: 160 StructureDiffViewer$StructureInfo.refresh(IProgressMonitor) line: 133 StructureDiffViewer$StructureInfo.setInput(ITypedElement, boolean, IProgressMonitor) line: 104 EventFlowStructureDiffViewer(StructureDiffViewer).compareInputChanged(ICompareInput, boolean, IProgressMonitor) line: 342 StructureDiffViewer$2.run(IProgressMonitor) line: 74 StructureDiffViewer$6.run() line: 322 BusyIndicator.showWhile(Display, Runnable) line: 70 EventFlowStructureDiffViewer(StructureDiffViewer).compareInputChanged(ICompareInput, boolean) line: 319 EventFlowStructureDiffViewer(StructureDiffViewer).compareInputChanged(ICompareInput) line: 307 EventFlowStructureDiffViewer(StructureDiffViewer).inputChanged(Object, Object) line: 278 EventFlowStructureDiffViewer(ContentViewer).setInput(Object) line: 280 EventFlowStructureDiffViewer(StructuredViewer).setInput(Object) line: 1690 CompareStructureViewerSwitchingPane(CompareViewerSwitchingPane).setInput(Object) line: 277 CompareStructureViewerSwitchingPane.setInput(Object) line: 132 CompareEditorInput$12.run() line: 805 BusyIndicator.showWhile(Display, Runnable) line: 70 ThreeWayResourceCompareInput(CompareEditorInput).feedDefault1(ISelection) line: 801 CompareEditorInput.access$4(CompareEditorInput, ISelection) line: 800 CompareEditorInput$7.doubleClick(DoubleClickEvent) line: 676 CompareEditorInput$10(CompareViewerPane).doubleClick(DoubleClickEvent) line: 274 StructuredViewer$1.run() line: 845 SafeRunner.run(ISafeRunnable) line: 42 JFaceUtil$1.run(ISafeRunnable) line: 49 SafeRunnable.run(ISafeRunnable) line: 175 ThreeWayResourceCompareInput$4(StructuredViewer).fireDoubleClick(DoubleClickEvent) line: 843 ThreeWayResourceCompareInput$4(AbstractTreeViewer).handleDoubleSelect(SelectionEvent) line: 1462 StructuredViewer$4.widgetDefaultSelected(SelectionEvent) line: 1246 OpenStrategy.fireDefaultSelectionEvent(SelectionEvent) line: 249 OpenStrategy.access$0(OpenStrategy, SelectionEvent) line: 246 OpenStrategy$1.handleEvent(Event) line: 307 EventTable.sendEvent(Event) line: 84 Tree(Widget).sendEvent(Event) line: 1053 Display.runDeferredEvents() line: 4165 Display.readAndDispatch() line: 3754 Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 2696 Workbench.runUI() line: 2660 Workbench.access$4(Workbench) line: 2494 Workbench$7.run() line: 674 Realm.runWithDefault(Realm, Runnable) line: 332 Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 667 PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149 IDEApplication.start(IApplicationContext) line: 123 EclipseAppHandle.run(Object) line: 196 EclipseAppLauncher.runApplication(Object) line: 110 EclipseAppLauncher.start(Object) line: 79 EclipseStarter.run(Object) line: 344 EclipseStarter.run(String[], Runnable) line: 179 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object...) line: 597 Main.invokeFramework(String[], URL[]) line: 622 Main.basicRun(String[]) line: 577 Main.run(String[]) line: 1410 Main.main(String[]) line: 1386 and only later do the inputs get their "op" set which would allow them to answer getContents: Thread [main] (Suspended (breakpoint at line 507 in ResourceCompareInput$ResourceElement)) ResourceCompareInput$ResourceElement.getFetcher() line: 507 ThreeWayResourceCompareInput$CompareNode(ResourceCompareInput$BaseCompareNode).getFetcher() line: 627 ThreeWayResourceCompareInput$4(ResourceCompareInput$ResourceCompareViewer).handleOpen(SelectionEvent) line: 543 StructuredViewer$6.handleOpen(SelectionEvent) line: 1256 OpenStrategy.fireOpenEvent(SelectionEvent) line: 275 OpenStrategy.access$2(OpenStrategy, SelectionEvent) line: 269 OpenStrategy$1.handleEvent(Event) line: 309 EventTable.sendEvent(Event) line: 84 Tree(Widget).sendEvent(Event) line: 1053 Display.runDeferredEvents() line: 4165 Display.readAndDispatch() line: 3754 Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 2696 Workbench.runUI() line: 2660 Workbench.access$4(Workbench) line: 2494 Workbench$7.run() line: 674 Realm.runWithDefault(Realm, Runnable) line: 332 Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 667 PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149 IDEApplication.start(IApplicationContext) line: 123 EclipseAppHandle.run(Object) line: 196 EclipseAppLauncher.runApplication(Object) line: 110 EclipseAppLauncher.start(Object) line: 79 EclipseStarter.run(Object) line: 344 EclipseStarter.run(String[], Runnable) line: 179 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object...) line: 597 Main.invokeFramework(String[], URL[]) line: 622 Main.basicRun(String[]) line: 577 Main.run(String[]) line: 1410 Main.main(String[]) line: 1386 Reproducible: Always
update version
Eddie, are you able to reproduce it with CVS? If so, it's definitely a Team bug, otherwise I would move it to Subversive.
See comment 2, moving to Subversive for comment.
Sorry for the delay. Against a CSV project, I encountered no issues, since when you ask for a project compare, they don't load the same editor experience! (they just go to synchronize view)
I can't reproduce the situation itself, but as I understand from your description there are situations when compare input is required at earlier time than it is ready with the current Subversive version. So, according to this information I've moved initialization of the compare input to the earlier stage, so it should be ready before this call: ThreeWayResourceCompareInput$4(AbstractTreeViewer).handleDoubleSelect(SelectionEvent) line: 1462
ok. if you can let me know which release will carry this fix, we could consume this (as we ship SVN w our eclipse product)
*** Bug 246495 has been marked as a duplicate of this bug. ***
Can this bug be updated with /where/ this fix went?