| Summary: | corrupted editor contents after save actions and undo | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Nicolas Bros <nicolas.bros> | ||||||||
| Component: | Text | Assignee: | JDT-Text-Inbox <jdt-text-inbox> | ||||||||
| Status: | CLOSED DUPLICATE | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | daniel_megert, srikanth_sankaran | ||||||||
| Version: | 4.2 | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows 7 | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Nicolas Bros
Created attachment 220435 [details]
stacktrace (Document does not match the AST)
Created attachment 220436 [details]
stacktrace 2 (Overlapping text edits)
Created attachment 220438 [details]
org.eclipse.jdt.ui.prefs (save actions with cleanups)
for example, if I modify the getEClass() method to "return null;" then save, undo then undo again, I end up with:
public EClass getEClass()
{
rrn nuleClassEClass;
}
version:
Eclipse SDK
Version: 4.2.0
Build id: I20120608-1400
Jay, can you study this please ? Route to the other components as needed. Since this is a data corruption issue, we should look at this soon. I don't see the MalformedTreeException, but I do end up with lot of compilation errors on the compilation unit. Subsequent saves fail with the following error message: "A save participant caused problems. The save participant 'Code Clean Up' caused an exception: java.lang.IllegalArgumentException. See the error log for details." And the log has the following stack trace: !MESSAGE Error in JDT Core during reconcile !STACK 0 java.lang.IllegalArgumentException at org.eclipse.jdt.core.dom.ASTNode.setSourceRange(ASTNode.java:2648) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:572) at org.eclipse.jdt.core.dom.ASTConverter.buildBodyDeclarations(ASTConverter.java:183) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:2656) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:1219) at org.eclipse.jdt.core.dom.AST.convertCompilationUnit(AST.java:246) at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.makeConsistent(ReconcileWorkingCopyOperation.java:206) at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.executeOperation(ReconcileWorkingCopyOperation.java:89) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:728) at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:788) at org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationUnit.java:1247) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:126) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.access$0(JavaReconcilingStrategy.java:108) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy$1.run(JavaReconcilingStrategy.java:89) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:87) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:151) at org.eclipse.jdt.internal.ui.text.CompositeReconcilingStrategy.reconcile(CompositeReconcilingStrategy.java:86) at org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStrategy.reconcile(JavaCompositeReconcilingStrategy.java:104) at org.eclipse.jface.text.reconciler.MonoReconciler.process(MonoReconciler.java:77) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:206) (In reply to comment #6) > I don't see the MalformedTreeException, but I do end up with lot of > compilation errors on the compilation unit. Subsequent saves fail with the > following error message: Is this a recent regression ? What is the earliest version that shows the problem. The IAE could be a manifestation of the problem rather than the problem itself ? (In reply to comment #7) > Is this a recent regression ? This might be related: I had experienced a similar occurrence of editor corruption almost two years ago (Bug 332653), but I never found a surefire way to reproduce it. I am able to reproduce both the error scenarios reported in comment #0. The error is reproducible in 4.1.2 and 4.2 but none of the 3.x releases. This is because in 3.x versions, 'save' is blocking further editor operations such as undo etc. (In reply to comment #9) > I am able to reproduce both the error scenarios reported in comment #0. > > The error is reproducible in 4.1.2 and 4.2 but none of the 3.x releases. > This is because in 3.x versions, 'save' is blocking further editor > operations such as undo etc. I don't know if we are supposed to allow other editor operations during a 'save'. Moving to JDT Text for investigation. *** This bug has been marked as a duplicate of bug 346230 *** |