| Summary: | Investigate why SaveableCompareEditorInput.handleDispose() method is called multiple times | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | James Blackburn <jamesblackburn+eclipse> |
| Component: | Team | Assignee: | Platform Team Inbox <platform-team-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | major | ||
| Priority: | P2 | CC: | alga777, carolynmacleod4, cloutier.jo, daniel_megert, eclipse.sprigogin, Ed.Merks, error-reports-inbox, h.klene, lmcbout, manju656, marcel.bruch, mike, mistria, moritz.eysholdt, nicolas.bros, pascal, remy.suen, robin, sptaszkiewicz, sxenos, Szymon.Brandys, tomasz.zarna |
| Version: | 3.7 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: |
https://git.eclipse.org/r/#/c/86441/ https://git.eclipse.org/r/88908 https://git.eclipse.org/c/platform/eclipse.platform.team.git/commit/?id=9966403dfd6224f510a7a536422ffb7920c51db0 |
||
| Whiteboard: | stalebug | ||
|
Description
James Blackburn
James any chance for steps? I've just spotted in when working with Current vs Index editor from EGit (see bug 347557, comment 9). The problem with EGit case is that for some cases the editor doesn't open at all and for others two editors are open. Closing one of them results in throwing the exception. It doesn't look good, but imo it's an echo of a bug in EGit which caused two editors to be open. Have you seen it working with CVS? Just got hit by this. Unlike James, I was on 4.x. This bug seems to be causing bug 348429. For whatever reasons, there are two dispose listeners (line 576 of CompareEditorInput it seems) attached to the control which causes the handleDispose() to be invoked twice. this EventTable (id=2338) level 1 listeners Listener[12] (id=1417) [0] TypedListener (id=1347) [1] TypedListener (id=1344) [2] TypedListener (id=1341) [3] TypedListener (id=1341) [4] TypedListener (id=1341) [5] TypedListener (id=1338) [6] TypedListener (id=1335) [7] TypedListener (id=1316) eventListener CompareEditorInput$4 (id=1313) [8] TypedListener (id=1406) eventListener CompareEditorInput$4 (id=1403) createContents(Composite) gets called twice for some reasons. java.lang.Throwable at org.eclipse.compare.CompareEditorInput.createContents(CompareEditorInput.java:555) at org.eclipse.compare.internal.CompareEditor.createCompareControl(CompareEditor.java:462) at org.eclipse.compare.internal.CompareEditor.access$6(CompareEditor.java:422) at org.eclipse.compare.internal.CompareEditor$4.run(CompareEditor.java:490) at org.eclipse.swt.widgets.Display.runTimer(Display.java:4266) at org.eclipse.swt.widgets.Display.messageProc(Display.java:3353) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2545) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:999) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:893) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:85) java.lang.Throwable at org.eclipse.compare.CompareEditorInput.createContents(CompareEditorInput.java:555) at org.eclipse.compare.internal.CompareEditor.createCompareControl(CompareEditor.java:462) at org.eclipse.compare.internal.CompareEditor.access$6(CompareEditor.java:422) at org.eclipse.compare.internal.CompareEditor$3.run(CompareEditor.java:378) at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:164) at org.eclipse.ui.internal.UISynchronizer$3.run(UISynchronizer.java:158) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4140) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:173) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:388) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507) at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275) at org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:960) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995) at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970) at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1166) at org.eclipse.compare.internal.CompareContainer.run(CompareContainer.java:80) at org.eclipse.compare.CompareEditorInput.run(CompareEditorInput.java:1373) at org.eclipse.compare.internal.merge.DocumentMerger.doDiff(DocumentMerger.java:460) at org.eclipse.compare.contentmergeviewer.TextMergeViewer.doDiff(TextMergeViewer.java:3275) at org.eclipse.compare.contentmergeviewer.TextMergeViewer.update(TextMergeViewer.java:4999) at org.eclipse.compare.contentmergeviewer.TextMergeViewer.updateContent(TextMergeViewer.java:2847) at org.eclipse.compare.contentmergeviewer.ContentMergeViewer.internalRefresh(ContentMergeViewer.java:743) at org.eclipse.compare.contentmergeviewer.ContentMergeViewer.inputChanged(ContentMergeViewer.java:643) at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:280) at org.eclipse.compare.CompareViewerSwitchingPane.setInput(CompareViewerSwitchingPane.java:277) at org.eclipse.compare.internal.CompareContentViewerSwitchingPane.setInput(CompareContentViewerSwitchingPane.java:158) at org.eclipse.compare.CompareEditorInput.internalSetContentPaneInput(CompareEditorInput.java:845) at org.eclipse.compare.CompareEditorInput.access$8(CompareEditorInput.java:843) at org.eclipse.compare.CompareEditorInput$11.run(CompareEditorInput.java:779) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.compare.CompareEditorInput.feed1(CompareEditorInput.java:773) at org.eclipse.compare.CompareEditorInput.feedInput(CompareEditorInput.java:751) at org.eclipse.compare.CompareEditorInput.createContents(CompareEditorInput.java:555) at org.eclipse.compare.internal.CompareEditor.createCompareControl(CompareEditor.java:462) at org.eclipse.compare.internal.CompareEditor.access$6(CompareEditor.java:422) at org.eclipse.compare.internal.CompareEditor$4.run(CompareEditor.java:490) at org.eclipse.swt.widgets.Display.runTimer(Display.java:4266) at org.eclipse.swt.widgets.Display.messageProc(Display.java:3353) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2545) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:999) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:893) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:85) *** Bug 370346 has been marked as a duplicate of this bug. *** *** Bug 372005 has been marked as a duplicate of this bug. *** bug 274823 has a similar stacktrace, though it was marked as a duplicate of the solved bug 261430 This bug was mentioned in bug 347557 comment 9 possibly related ... Also it was part of a stacktrace for bug 373398 which is marked as a duplicate of bug 348429 Finally there is another duplicate of this as bug 367234 As of today it still occurs with Juno release 4.2.0 and egit 2.0.0.201206130900-r: !SESSION 2012-07-08 12:36:26.485 ----------------------------------------------- eclipse.buildId=I20120608-1400 java.version=1.7.0_04 java.vendor=Oracle Corporation BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=de_DE Command-line arguments: -os linux -ws gtk -arch x86 *** Bug 367234 has been marked as a duplicate of this bug. *** *** Bug 409813 has been marked as a duplicate of this bug. *** Is someone looking into this? Another 6 possible duplicates here: https://bugs.eclipse.org/bugs/buglist.cgi?quicksearch=SaveableCompareEditorInput.handleDispose The IAE could be avoided by checking if compareInputChangeListener is null in SaveableCompareEditorInput#handleDispose. But I'm not sure if this would just paper over the issue instead of solving the root cause. *** Bug 418131 has been marked as a duplicate of this bug. *** *** Bug 402197 has been marked as a duplicate of this bug. *** @Matthias Bug 402197 and bug 418131 both feature a NullPointerException at: org.eclipse.egit.ui.internal.CompareUtils.getIndexTypedElement(CompareUtils.java:469) and org.eclipse.egit.ui.internal.CompareUtils.getIndexTypedElement(CompareUtils.java:581) I'm curious, what makes you think, they are related to the original IllegalArgumentException at: org.eclipse.core.runtime.ListenerList.remove(ListenerList.java:155) Got hit by this exact exception today with Eclipse 4.4 Build id: I20140510-1500.
My WS was clean without any outgoing changes. Applied a patch and from Git staging view, double clicked and opened one of the file. First i noticed the below 'Conflicting handlers' error:
Conflicting handlers for org.eclipse.ui.editors.lineNumberToggle: {ActionHandler(org.eclipse.compare.internal.TextEditorPropertyAction@602edfb5)} vs {ActionHandler(org.eclipse.compare.internal.TextEditorPropertyAction@4a794f40)}
Conflicting handlers for org.eclipse.ui.edit.text.toggleShowWhitespaceCharacters: {ActionHandler(org.eclipse.compare.internal.ShowWhitespaceAction@246cf272)} vs {ActionHandler(org.eclipse.compare.internal.ShowWhitespaceAction@55224f77)}
When i closed the file opened in compare editor the exception mentioned in comment 1 was thrown.
(In reply to Manju Mathew from comment #14) > When i closed the file opened in compare editor the exception mentioned in > comment 1 was thrown. Sorry, exception mentioned in comment 0. *** Bug 395073 has been marked as a duplicate of this bug. *** *** Bug 397759 has been marked as a duplicate of this bug. *** *** Bug 403253 has been marked as a duplicate of this bug. *** *** Bug 443557 has been marked as a duplicate of this bug. *** *** Bug 448969 has been marked as a duplicate of this bug. *** *** Bug 454060 has been marked as a duplicate of this bug. *** *** Bug 456097 has been marked as a duplicate of this bug. *** *** Bug 449613 has been marked as a duplicate of this bug. *** *** Bug 451022 has been marked as a duplicate of this bug. *** In bug 261430 there was a similar exception which was identified in bug 261430 comment 5 to be caused by a result of SaveableCompareEditorInput.handleDispose() being called twice. The same could cause this bug as mentioned in comment 3. That means we need to look at it from a more general perspective because avoiding another IAE as it was done in bug 261430 does not seem to be the right solution. We should find the reason why SaveableCompareEditorInput.handleDispose() seems to be called twice and make sure it is called only once and in the right moment. Dani, any thoughts? (In reply to Szymon Ptaszkiewicz from comment #25) > In bug 261430 there was a similar exception which was identified in bug > 261430 comment 5 to be caused by a result of > SaveableCompareEditorInput.handleDispose() being called twice. The same > could cause this bug as mentioned in comment 3. That means we need to look > at it from a more general perspective because avoiding another IAE as it was > done in bug 261430 does not seem to be the right solution. We should find > the reason why SaveableCompareEditorInput.handleDispose() seems to be called > twice and make sure it is called only once and in the right moment. > > Dani, any thoughts? Looks like a bug in the life cycle. Needs to be debugged. I've added some logging to help track this down further. If you can reproduce this, please follow the steps in bug 448968, comment 61 in order to enable the logging. Then attach the resulting trace file here. Ping. Is anyone cc'd here able to reproduce this? I really need one of those trace files in order to proceed with a fix. Stefan, I guess this is too late for RC* I can't do much without the assistance of someone who can reproduce it. Raising priority as this is currently the #2 most frequent bug for users: https://dev.eclipse.org/recommenders/committers/aeri/v2/#!/problems/54c4ef8bbee810030da07087 Proposed dummy patch: https://git.eclipse.org/r/#/c/86441/ This is not tested, nor tries to find a root cause (if we need to find one...), but it should avoid the error. New Gerrit change created: https://git.eclipse.org/r/86441 New Gerrit change created: https://git.eclipse.org/r/88908 Gerrit change https://git.eclipse.org/r/88908 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.team.git/commit/?id=9966403dfd6224f510a7a536422ffb7920c51db0 Passing null to removeCompareInputChangeListener has been avoided. To debug the underlying issue with widgetDisposed method being called multiple times, enable the org.eclipse.team.ui/compare_editor_input debugging option. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |