| Summary: | Error while parsing /Project/header.h. ArrayIndexOutOfBoundsException | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Marc-André Laperle <malaperle> |
| Component: | cdt-indexer | Assignee: | Markus Schorn <mschorn.eclipse> |
| Status: | RESOLVED FIXED | QA Contact: | Markus Schorn <mschorn.eclipse> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cdtdoug |
| Version: | 8.0 | ||
| Target Milestone: | 8.0.2 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Marc-André Laperle
Hi Marc, the stack-trace suggests that the index gets corrupted, which is a severe issue. I need to figure out why it happens, however I have not seen the problem with my installations. Do you get that with CDT 8.0.1 or on the master branch? Did you have the problem before (e.g. with CDT 8.0)? I am using the master branch but now I can't reproduce this using the latest build 8.1.0.201111021006. However, I can reproduce this using 8.0.0. I will try to find the exact commit that fixed the problem to make sure the change is appropriate. As a test, I use the gtk+ project and I change between branches outside Eclipse, between master and gtk-2-10. Refresh on access needs to be turned on as far as I can tell. Then I rebuild the index and a large number of errors appear in the error log. (In reply to comment #2) I have reviewed the source code and I am able to reproduce the failure with a specific sequence of indexing with an urgent task. The issue has been introduced with the implementation for bug 287907 and was fixed with bug 197989. The issue is present since 7.0 and became more likely to happen because of refresh on demand. To reproduce in the debugger: * Create 3 headers h1.h - h3.h h1.h includes h2.h h2.h includes h3.h * Create 3 source files s1.cpp - s3.cpp s1.cpp, s2.cpp, s3.cpp include h1.h * Set CModelListener.sSuppressUpdateOfLastRecentlyUsed to true * Breakpoint in AbstractIndexerTask.parseLinkage(...) * Rebuild index. * Let the indexer index s1.cpp and s2.cpp * In the editor remove include from s2.h to s3.h and save it. * Let the indexer run (it injects an urgent task) --> The exception is thrown. Fixed the issue and manually tested as outlined in comment 3. Marc-Andre, please verify whether my change actually fixes the problem in your environment. *** cdt git genie on behalf of Markus Schorn ***
Bug 360710: Index corruption due to urgent task.
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=92955735be10ef645dd8ea793a8acdbd0045f677
(In reply to comment #4) > Marc-Andre, please verify whether my change actually fixes the problem in your > environment. I tested before and after the change in 8.0.2 and I confirm that it fixes the problem in my environment. I also double checked with 8.1 (master) and it works there too. Thank you! (In reply to comment #6) > (In reply to comment #4) > > Marc-Andre, please verify whether my change actually fixes the problem in your > > environment. > I tested before and after the change in 8.0.2 and I confirm that it fixes the > problem in my environment. I also double checked with 8.1 (master) and it works > there too. Thank you! Perfect. |