| Summary: | Multiple problems caused by Compare Editor | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Boris Bokowski <bokowski> | ||||||||
| Component: | Compare | Assignee: | Tomasz Zarna <tomasz.zarna> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | major | ||||||||||
| Priority: | P3 | CC: | brian.vosburgh, owong, remy.suen | ||||||||
| Version: | 3.4 | ||||||||||
| Target Milestone: | 3.4.1 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows XP | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
What is strange here is that some parts of the log point to meaningless (in terms of an exception thrown) lines: --- java.lang.NullPointerException at org.eclipse.compare.internal.merge.DocumentMerger.doDiff(DocumentMerger.java:452) 452: RangeDifference[] e= null; --- org.eclipse.swt.SWTException: Graphic is disposed at org.eclipse.swt.SWT.error(SWT.java:3777) at org.eclipse.swt.SWT.error(SWT.java:3695) at org.eclipse.swt.SWT.error(SWT.java:3666) at org.eclipse.swt.graphics.Image.getBounds(Image.java:1148) at org.eclipse.swt.custom.CLabel.getTotalSize(CLabel.java:225) at org.eclipse.swt.custom.CLabel.computeSize(CLabel.java:157) at org.eclipse.compare.contentmergeviewer.ContentMergeViewer.getHeaderHeight(ContentMergeViewer.java:1054) 1054: */ --- Any thoughts? Is it possible that some of your/my code is outdated? I sync with head every day, even though I produce most of the changes :) The NPE in SaveableCompareEditorInput and IllegalArgumentException from Cache look fine, I mean their stack traces look fine. Boris, any chance for some steps to reproduce? As for the warnings part, it's very similar to what Krzysztof reported last year in bug 203461, don't you think? DocumentMerger.java:452 looks like this to me:
for (int i= 0; i < e.length; i++) {
and ContentMergeViewer:1054 looks like:
headerHeight= Math.max(headerHeight, fDirectionLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).y);
(In reply to comment #2) > DocumentMerger.java:452 looks like this to me: > > for (int i= 0; i < e.length; i++) { > > and ContentMergeViewer:1054 looks like: > > headerHeight= Math.max(headerHeight, fDirectionLabel.computeSize(SWT.DEFAULT, > SWT.DEFAULT, true).y); > My fault, wrong workspace, sorry. Looks like another victim of fixing bug 228004. IMO we're dealing here with couple of issues. This is what I've figured out so far: 1. In regards to the warnings from the log I think we should reopen bug 203461. It's a pity we didn't get any steps, but still it looks like a real problem. 2. The IllegalArgumentException thrown in ListenerList.remove is caused by superfluous nulling the contextListener in ModelCompareEditorInput (see bug 228004) 3. The NPE in SaveableCompareEditorInput$InternalResourceSaveableComparison.registerSaveable has a very similar cause. Nulling "saveable" in SaveableCompareEditorInput, may force us to recreate it, and throw the NullPointerException while registering the new saveable. Again, see bug 228004. 4. I'm still investigation "Graphic is disposed" exceptions. 5. The NPE in DocumentMerger.doDiff looks like a timing issue to me. Is it possible that the differencer (runnable from DocumentMerger.doDiff) got cancelled and we didn't handle the interruption properly? *** Bug 239869 has been marked as a duplicate of this bug. *** Just wanted to say that I was getting the IAE on ListenerList myself on I20080715-1015. To reproduce the error, I had to double-click on one modified file in the 'Synchronize' view and then immediately double-click on another modified file. My line numbers seems to match Boris's exactly. java.lang.IllegalArgumentException at org.eclipse.core.runtime.ListenerList.remove(ListenerList.java:155) at org.eclipse.team.internal.core.Cache.removeCacheListener(Cache.java:83) at org.eclipse.team.internal.ui.mapping.ModelCompareEditorInput.handleDispose(ModelCompareEditorInput.java:84) at org.eclipse.compare.CompareEditorInput$4.widgetDisposed(CompareEditorInput.java:528) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:117) Created attachment 107624 [details] Fix v01 Patch fixing IAE on ListenerList and NPE on SaveableCompareEditorInput$InternalResourceSaveableComparison (which are points 2 and 3 from comment 5). As suggested in point 1, I opened bug 203461 to address handlers conflict issue. For problems described in points 4 and 5 I will open separate bugs as finding a cause/fix for them is still in progress. Created attachment 107625 [details]
mylyn/context/zip
(In reply to comment #8) > For problems described in points 4 and 5 I will open separate bugs as finding a > cause/fix for them is still in progress. See bug 241105 and bug 241007 accordingly. Released both in HEAD and R3_4_maintenance stream. (In reply to comment #10) > See bug 241105 and bug 241007 accordingly. The later bug is bug 241107. *** Bug 245964 has been marked as a duplicate of this bug. *** |
Created attachment 104353 [details] log file Lots of errors (and warnings) in my log, I am running I20080606-0100. I had a good number of follow-up problems it seems, including a refactoring that could not be performed because of a "widget is disposed". I had to close all editors to get back into a good state. Attaching the .log file...