Bug 481259 - CDT Team Shared Index Does not import Correctly
Summary: CDT Team Shared Index Does not import Correctly
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-indexer (show other bugs)
Version: 8.6.0   Edit
Hardware: All Linux
: P3 critical with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-02 12:33 EST by Farshad Tajalli CLA
Modified: 2020-09-04 15:21 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Farshad Tajalli CLA 2015-11-02 12:33:25 EST
CDT Version: 8.6.0.201502131403

I export the index of a C/C++ project into .settings/cdt-index.zip. When I import that project later, the index does not import properly. From the debug traces, I can tell that the shared index is imported with no problem, however, index is not loaded into the editor.

Steps To Reproduce:
1. Create a project
2. Build the index
3. Export the team-shared index to: .settings/cdt-index.zip
4. Remove the project from the Workspace
4. Re-Import the project to the Workspace


Here is the Debugging information:
Indexer: Removing project AttachProcessGDBTest; delete=true
Indexer: Adding new project AttachProcessGDBTest
Indexer: Setup is postponed: AttachProcessGDBTest
Indexer: Creation for project AttachProcessGDBTest
Indexer: PDOMImporter start
Indexer: PDOMImporter completed, ok=true
Indexer: Imported shared index for project AttachProcessGDBTest
Indexer: start PDOMUpdateTask
C/C++ Indexer: Project 'AttachProcessGDBTest' (0 sources, 0 headers)
    Options: indexer='PDOMFastIndexer', parseAllFiles=true, unusedHeaders=useCPP, skipReferences=false, skipImplicitReferences=false, skipTypeReferences=false, skipMacroReferences=false.
    Database: 475136 bytes
    Timings: 7 total, 0 parser, 0 resolution, 0 index update.
    Errors: 0 internal, 0 include, 0 scanner, 0 syntax errors.
    Names: 0 declarations, 0 references, 0(0.00%) unresolved.
    Cache[45MB]: 87 hits, 1(1.14%) misses.
Indexer: completed PDOMUpdateTask[8ms]

Here is the error that I get, when I try to click on a symbol:

Description	Resource	Path	Location	Type
Function 'printf' could not be resolved	AttachProcessGDBTest.cpp	/AttachProcessGDBTest	line 27	Semantic Error
Comment 1 Marc-André Laperle CLA 2015-11-09 12:45:11 EST
Have you had the chance to try with CDT 8.8? Just making sure it's not already fixed :)
Comment 2 Farshad Tajalli CLA 2015-11-09 16:43:05 EST
The same issue exists with CDT Version: 8.8.0.201509131935. 
I have just tested in in Windows.
Comment 3 Marc-André Laperle CLA 2015-11-12 22:25:00 EST
Thanks, I can reproduce this. I'll try to look into this since I know a bit about this code because of bug 183781. I stepped through the code a bit to see if the index file was being loaded and that if it was the same index being used in code analysis. I also checked that printf was in the loaded index. All of that seems OK so this is quite odd! I'll have to debug some more.