Bug 75632

Summary: Infinite loop in DefaultCommentMapper#storeLeadingComments
Product: [Eclipse Project] JDT Reporter: Jerome Lanneluc <jerome_lanneluc>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Michael.Valenta
Version: 3.1   
Target Milestone: 3.1 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
File that was being reconciled none

Description Jerome Lanneluc CLA 2004-10-05 07:38:05 EDT
I20040930 + latest JDT Core

Got an inifinite loop in DefaultCommentMapper#storeLeadingComments at line 321
while reconciling the attached file. The scanner's current position was after
the source end.
Comment 1 Jerome Lanneluc CLA 2004-10-05 07:38:44 EDT
Created attachment 15000 [details]
File that was being reconciled
Comment 2 Frederic Fusier CLA 2004-10-05 07:46:53 EDT
Problem comes from a wrong start position of comment stored in comments list.
I'll investigate...
Comment 3 Frederic Fusier CLA 2004-10-05 09:29:16 EDT
Seem to be a desynchronization during reconcile between comments list stored in
CompilationUnit and source of unit CompilationResult.
Don't know yet how this can happen!?
We're trying to add some trace...
Comment 4 Frederic Fusier CLA 2004-10-06 07:03:23 EDT
Not easily reproduceable...
By the way, I'll add a protection to avoid this kind of problem in the future.

Change done in DefaultCommentMapper.storeLeadingComments(ASTNode,int).
Comment 5 Frederic Fusier CLA 2004-10-06 15:51:24 EDT
*** Bug 75646 has been marked as a duplicate of this bug. ***
Comment 6 David Audel CLA 2004-11-02 12:50:51 EST
Verified for 3.1M3 with build I20041101