Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328380 - endless errors: "Notifying selection listeners", StackOverflowError in CPPTemplates parsing
Summary: endless errors: "Notifying selection listeners", StackOverflowError in CPPTem...
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-indexer (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: 8.0   Edit
Assignee: Markus Schorn CLA
QA Contact: Markus Schorn CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-21 12:05 EDT by Mike Reed CLA
Modified: 2010-11-09 10:43 EST (History)
2 users (show)

See Also:


Attachments
log, showing nothing more than endless StackOverflowErrors from this issue. (234.15 KB, application/octet-stream)
2010-10-21 12:10 EDT, Mike Reed CLA
no flags Details
different log, from different workspace (117.36 KB, application/octet-stream)
2010-10-22 15:14 EDT, Mike Reed CLA
no flags Details
improved safeguard against the recursion (2.53 KB, patch)
2010-11-04 12:14 EDT, Markus Schorn CLA
mschorn.eclipse: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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