Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 328380

Summary: endless errors: "Notifying selection listeners", StackOverflowError in CPPTemplates parsing
Product: [Tools] CDT Reporter: Mike Reed <mnr102>
Component: cdt-indexerAssignee: Markus Schorn <mschorn.eclipse>
Status: RESOLVED FIXED QA Contact: Markus Schorn <mschorn.eclipse>
Severity: major    
Priority: P3 CC: cdtdoug, mnr102
Version: 8.0   
Target Milestone: 8.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
log, showing nothing more than endless StackOverflowErrors from this issue.
none
different log, from different workspace
none
improved safeguard against the recursion mschorn.eclipse: iplog-

Description Mike Reed CLA 2010-10-21 12:05:22 EDT
Build Identifier: CDT: 20100917-0705 & Platform Build id: M20100909-0800

This error comes & goes, and was gone all morning.  Then I started writing a new method, and it's popping up after each modification + save of the file.  A dialog pops up saying "'Notifying selection listeners' has encountered a problem.  An internal error occurred during: "Notifying selection listeners".  The details show only java.lang.StackOverflowError.  Log suggested that maybe the DOM got built incorrectly, and then the indexer for templates freaks out.  NOTE: I've rebuilt the entire index multiple times, hoping it would fix this problem, but it does not.

Reproducible: Always

Steps to Reproduce:
1. Write some non-templated method, save file.
2. Error pops up.
3.
Comment 1 Mike Reed CLA 2010-10-21 12:10:35 EDT
Created attachment 181418 [details]
log, showing nothing more than endless StackOverflowErrors from this issue.

Uploading logs, which don't shed much light onto why this is occurring.  It's pretty easily reproduceable for me, so get in touch if there's a way to increase logging, or if I can export DOM or indexer files, etc.

Thx,
Mike
Comment 2 Mike Reed CLA 2010-10-22 15:14:02 EDT
Created attachment 181541 [details]
different log, from different workspace

Attaching a different log of a similar occurrence, from a different workspace.  I can get this error to pop up any time I select a particular method name.
Comment 3 Mike Reed CLA 2010-10-28 10:40:02 EDT
Bumping importance.  This bug is now affecting all of my workspaces for a given source tree, and the only way around getting the pop-ups every 5 seconds is to turn off the indexer.

Can I help debug this?  Easily reproduceable here.

Thx,
Mike
Comment 4 Markus Schorn CLA 2010-11-04 12:14:49 EDT
Created attachment 182393 [details]
improved safeguard against the recursion

I am interested in debugging the issue. For that I need a way to reproduce it. Do you have a piece of code that you can give away (eiter via bugzilla or via direct email to me), which also triggers the bug?

We already have some safeguard in place that should have caught the recursion, I have improved it.
Comment 5 Markus Schorn CLA 2010-11-04 12:17:18 EDT
Improved safeguard in 8.0 > 20101104.
Please verify that it actually helps with your code-base.
Comment 6 CDT Genie CLA 2010-11-04 12:23:02 EDT
*** cdt cvs genie on behalf of mschorn ***
Bug 328380: Improved safeguard against infinite recursion.

[*] CPPTypedefSpecialization.java 1.22 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTypedefSpecialization.java?root=Tools_Project&r1=1.21&r2=1.22
Comment 7 Mike Reed CLA 2010-11-09 10:43:09 EST
(In reply to comment #5)
> Improved safeguard in 8.0 > 20101104.
> Please verify that it actually helps with your code-base.

Hi Mark,
Thanks for the interest in this one.  I don't have a small project that can reproduce this.  I can't figure out which typedef is causing heartburn for the Indexer.  Could CDT possibly log the offending typedef which causes this recursion?

I'll download your fix in a build greater than 20101104.  Is it safe to have 2 different versions of the CDT plugin installed in the same Eclipse platform?

Thx,
Mike