Community
Participate
Working Groups
Build Identifier: I20110111-0800 Entering completely junk code into a _Java_ editor, like: enum a b; void b(struct a *) { if (c) { enum d; if (e()) f->g; } } void h(int *) { } ...causes: java.lang.IllegalArgumentException at org.eclipse.jdt.core.dom.ASTNode.setSourceRange(ASTNode.java:2616) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:434) at org.eclipse.jdt.core.dom.ASTConverter.buildBodyDeclarations(ASTConverter.java:255) at org.eclipse.jdt.core.dom.ASTConverter.convertToEnumDeclaration(ASTConverter.java:2920) ... This stops error reporting working properly. (don't even ask) Reproducible: Always Steps to Reproduce: 1. Enter the code into a Java editor. 2. Attempt to mouse-over a bit of red-underlined text. 3. No hover will be provided, and errors will go in the Error Log.
Ayushman, please take a look time permitting. The recovery must be completely busted with this code.
Created attachment 186771 [details] Full stack
A co-worker seems to have hit the same bug. However source is not junk (not included). !SESSION 2011-11-15 10:39:21.037 ----------------------------------------------- eclipse.buildId=I20110613-1736 java.version=1.7.0 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US Framework arguments: -product org.eclipse.epp.package.java.product Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product java.lang.IllegalArgumentException at org.eclipse.jdt.core.dom.ASTNode.setSourceRange(ASTNode.java:2616) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:501) at org.eclipse.jdt.core.dom.ASTConverter.buildBodyDeclarations(ASTConverter.java:322) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:2282) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:1520) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:2450) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:532) at org.eclipse.jdt.core.dom.ASTConverter.buildBodyDeclarations(ASTConverter.java:183) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:2636) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:1218) at org.eclipse.jdt.core.dom.AST.convertCompilationUnit(AST.java:280) at org.eclipse.jdt.internal.core.CompilationUnit.buildStructure(CompilationUnit.java:203) at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:258) at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:518) at org.eclipse.jdt.internal.core.CompilationUnit.makeConsistent(CompilationUnit.java:1079) at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.makeConsistent(ReconcileWorkingCopyOperation.java:170) 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:1244) 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)
Peterm, could you please isolate a test case that could let us reproduce your issue ?
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.