Bug 290281 - Flood of JDT errors in log when block of // comment lines was un-commented
Summary: Flood of JDT errors in log when block of // comment lines was un-commented
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: 3.6 M3   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2009-09-23 11:19 EDT by Eddie Galvez CLA
Modified: 2009-10-27 07:35 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eddie Galvez CLA 2009-09-23 11:19:17 EDT
What steps will reproduce the problem?
1. I had a java source class that had, right after the class declaration line ("public class ...") a bunch of lines (10 line long) of // commented lines
2. Selected the range, and did source/toggle comment
3. the error log was flooding (non-stop) with errors (shown below), until I re-commented the block (Add Block Comment)


-- Error Details --
Date: Wed Sep 23 11:19:36 EDT 2009
Message: Error in JDT Core during AST creation
Severity: Error
Product: Eclipse 1.2.0.20090615-0858 (org.eclipse.epp.package.rcp.product)
Plugin: org.eclipse.jdt.ui
Session Data:
eclipse.buildId=I20090611-1540
java.version=1.6.0_16
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.rcp.product
Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.rcp.product


Exception Stack Trace:
java.lang.IllegalArgumentException
	at org.eclipse.jdt.core.dom.ASTNode.setSourceRange(ASTNode.java:2614)
	at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:430)
	at org.eclipse.jdt.core.dom.ASTConverter.buildBodyDeclarations(ASTConverter.java:179)
	at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:2694)
	at org.eclipse.jdt.core.dom.ASTConverter.buildBodyDeclarations(ASTConverter.java:184)
	at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:2694)
	at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:1264)
	at org.eclipse.jdt.core.dom.CompilationUnitResolver.convert(CompilationUnitResolver.java:256)
	at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:933)
	at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:657)
	at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider$1.run(ASTProvider.java:544)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.createAST(ASTProvider.java:537)
	at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:478)
	at org.eclipse.jdt.ui.SharedASTProvider.getAST(SharedASTProvider.java:126)
	at org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.getOverrideIndicators(OverrideIndicatorLabelDecorator.java:161)
	at org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.computeAdornmentFlags(OverrideIndicatorLabelDecorator.java:136)
	at org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.decorate(OverrideIndicatorLabelDecorator.java:272)
	at org.eclipse.ui.internal.decorators.LightweightDecoratorDefinition.decorate(LightweightDecoratorDefinition.java:269)
	at org.eclipse.ui.internal.decorators.LightweightDecoratorManager$LightweightRunnable.run(LightweightDecoratorManager.java:81)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.decorate(LightweightDecoratorManager.java:365)
	at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.getDecorations(LightweightDecoratorManager.java:347)
	at org.eclipse.ui.internal.decorators.DecorationScheduler$1.ensureResultCached(DecorationScheduler.java:371)
	at org.eclipse.ui.internal.decorators.DecorationScheduler$1.run(DecorationScheduler.java:331)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Comment 1 Olivier Thomann CLA 2009-09-23 12:15:54 EDT
Could you please provide the source of the class once the comments are removed (after step 2)?
Somehow we end up with some nodes that are not properly closed. The test case is required for further investigation.
Comment 2 Olivier Thomann CLA 2009-09-30 21:24:19 EDT
Reducing severity as required test case has not been provided yet.
Comment 3 Eddie Galvez CLA 2009-10-01 09:04:35 EDT
oops. it's long gone... I was concerned with stopping the error log flood and then filed the bug, didn't think of providing the contents of the editor then (besides, the code is proprietary :-( )
Comment 4 Olivier Thomann CLA 2009-10-01 09:12:17 EDT
Without a test case, this will be closed as WORKSFORME.
The problem comes from the error recovery. So you must have some code that doesn't compile and you end up with some nodes that are not properly closed (no end position set).
If I don't have the exact test case, there is no way I can investigate it.
So please consider making changes to the code so that you can provide it otherwise the problem won't be fixed.
Comment 5 Eddie Galvez CLA 2009-10-01 09:25:22 EDT
I understand. If I find myself able, I'll get you a test case.
Comment 6 Olivier Thomann CLA 2009-10-07 12:22:33 EDT
Ok, thanks Eddie.
Closing as WORKSFORME.
Please reopen once the test case is provided.
Comment 7 Ayushman Jain CLA 2009-10-27 06:15:16 EDT
Verified for 3.6M3 using build I20091025-2000.