This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

An internal error occurred during: "Search declarations". Invalid thread access

Hi,

Our CCS version is 5.2.0.00069 and we frequently encounter “internal error” when using right-click context menu’s “Search Text” or “References” function.
One error is like

An internal error occurred during: "Search declarations". Invalid thread access

Code cross-referencing becomes very inefficient with this. We have searched the CCS forum but there is no post about the same problem. Could someone help?

Mat

  • Hi Mat,

    is the problem intermittent?  Or do you get the error every time in your setup?  Unfortunately intermittent problems are typically extremely hard to track down sometimes.

    What OS do you use?   Do you see this with all projects and workspaces?  All targets?  Do you notice any other issues at the same time?

    I have not encountered this before on my installation and just tried again and was not able to reproduce this.

    Best Regards,
    Lisa

  • Lisa,

    The problem happens for some search, not for some others. I haven't found out a pattern of which type of search strings/symbols would cause the problem to manifest.

    The OS is 32-bit Win 7 Home Premium. It does happen with other projects. I currently have only one workspace. No other issue at the same time.

    Many posts in this forum ended up with deleting .metadata folder as an ultimate cure. Does this also delete useful project settings, including but not limted to, global variables and others?

     

    Matt

  • There is a similar case in https://bugs.eclipse.org/bugs/show_bug.cgi?id=355299. It is related to a bug in the 'Indexer' feature.

    Sometimes, I would just close all editors, then refresh (not build) every project in the project exlporer one project at a time, and montior the 'Indexing' progress bar at the bottom of the main window. I will refresh one project and wait until its indexing finished, then refresh another project, and so on. Closing CCS may help as well. I don't have to delete the .metadata so far.

    Another thing you can try, is to force Indexer to reparse a project. Right click a project, select the contex menu Indexer->Rebuild. Wait until Indexer finished. Do it for other projects, one at a time.

     

    As a last resort, close ccs and then delete the .pdom files under .metadata\.plugins\org.eclipse.cdt.core. Those are the cached files created by Indexer. Deleting those .pdom files should not affect any other settings including projects, global vars and so on, and it just forces Indexer to re-parse every project. If you have a lot and big projects, be patient because the Indexer needs to take time to rebuild its own cache.

    If you have a chance, can you post the .log file under the .metadata directory? It can tells us more about the problem.

     

     

     

  • Winnie,

    Sorry for being late in reply.

    We have tested the proposed solutions or walkarounds. Both "refresh" and "reindex" works with some success, but there are also chanes that some particular string doesn't get searched/indexed correctly after doing that.

    The method of deleting .pdom files works. Though it takes a few dozens of seconds upon CCS restart for indexes to get rebuild, all strings which had problem in finding references can now get resolved correctly. This seems to be a solution.

    Due to restrictions we cannot upload the .log file. But thanks very much for helping us to solve it!

     

    Matt