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.
Tool/software: Code Composer Studio
I have intermittent issues with project importing under CCS v7.
I have a workaround (below), so this is not a showstopper. However I am posting here in case this is helpful to other users and the CCS developer team.
In searching about this issue, I went through the following thread from July, which was not solved but was closed because the OP managed to work around the issue.
https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/611863
First, some background. Each morning, I start with a blank slate. I check out a working copy of my project, which includes the CCS project files, source code, setup files, etc. This is set up as a "portable" project so as not to be tied to a particular computer or CCS installation. Also, I delete any CCS workspace from the previous day and unzip a fresh copy that I have saved.
The reason for starting fresh is that we have dozens and dozens of CCS projects. In the past I was having issues with workspaces getting corrupt and weird things happening due to too many projects being imported. So I started deleting the workspace each morning, creating a fresh copy, and importing just what I need into it. Sometimes during the day I have issues, so my quick and easy solution is to exit CCS, delete the workspace, unzip a fresh copy, reopen CCS and import what I need to work on. This works around most issues.
The reason for unzipping a copy rather than creating a new workspace is that I got tired of having to customize certain user interface elements such as the size of the CCS window, the width of the Project Explorer, the display and positions of several other panes, the way I like the Debug perspective set up, the welcome view that opens the first time, etc. So I created a blank workspace set up the way I like it, once, and now I just unzip it each time I need restart.
(Caveat: When I recently upgraded CCS, I created that blank workspace anew with the new CCS version, to avoid cross-version problems.)
Now for the intermittent problem. Once in a while, I come in the morning, unzip my clean workspace, enter CCS, import a project into the workspace... and I get this error mid-import:
"An internal error occurred during: "C/C++ Indexer". java.util.NoSuchElementException"
When that happens, the project is not completely imported. The name of the project appears in the Project Explorer, but nothing appears in that project. Furthermore, attempting to import it again fails because the project is already in the workspace. At this point, the only solution that has worked is my famous five step salute: Exit CCS, delete the workspace, unzip a fresh copy, re-enter CCS, and re-import the project. So far it has always worked when I retry.
The strange thing is that there shouldn't be any difference in the actual files on disk between the first and second attempt. The unzipped CCS workspace should be identical each time it is unzipped. And although the project is under version control, CCS is not aware of that and is not managing the version control system. We are using Subversion, we did *NOT* install any Subversion plug-ins in CCS, and we are managing all version control actions through the command line. Furthermore, if even a single bit would change anywhere in the Subversion working copy, Subversion would notice it and would report it when we issue a "svn status" command. So I doubt if the first (failed) import process made any changes to our working copy which causes the second (successful) import to succeed. And, since this does not happen every morning, only some mornings, I doubt that could be the cause.
I'm guessing race condition somewhere in CCS or the underlying Eclipse. The C/C++ indexer tries to run but the code isn't ready for it, so it gets a no-such-element exception.
Hello,
twelve12pm said:The name of the project appears in the Project Explorer, but nothing appears in that project.
Is there a project folder of that name inside your workspace (or at the location where you imported the project to)? And if so, is there any content inside the project folder? It does indeed look like the import failed mid-way - that the indexer tried to index the project during the import and messing the import up.
twelve12pm said:the only solution that has worked is my famous five step salute: Exit CCS, delete the workspace, unzip a fresh copy, re-enter CCS, and re-import the project. So far it has always worked when I retry.
You should just be able to explicitly delete the project folder in the workspace folder in the file system and re-import the project.
twelve12pm said:I'm guessing race condition somewhere in CCS or the underlying Eclipse. The C/C++ indexer tries to run but the code isn't ready for it, so it gets a no-such-element exception.
Yes your guess sounds about right here. The indexer runs on the project before it has been successfully imported and corrupts the project. I suppose you could disable auto-indexing and after you manually import the project, you can do a manual rebuild of the index for the project. In any case, I'll check to see if this issue is a known Eclipse CDT issue.
Thank you for taking the time to write a really detailed and clear explanation of the issue and of your analysis. It is very much appreciated.
ki
Ki-Soo Lee said:Hello,
twelve12pmThe name of the project appears in the Project Explorer, but nothing appears in that project.Is there a project folder of that name inside your workspace (or at the location where you imported the project to)? And if so, is there any content inside the project folder? It does indeed look like the import failed mid-way - that the indexer tried to index the project during the import and messing the import up.
It is an intermittent issue and it did not occur today. However, the next time it happens, I will check the workspace directory to see exactly what took place there and I'll let you know.
Ki-Soo Lee said:twelve12pmthe only solution that has worked is my famous five step salute: Exit CCS, delete the workspace, unzip a fresh copy, re-enter CCS, and re-import the project. So far it has always worked when I retry.You should just be able to explicitly delete the project folder in the workspace folder in the file system and re-import the project.
Thanks. I will try that too and let you know the outcome.
Ki-Soo Lee said:twelve12pmI'm guessing race condition somewhere in CCS or the underlying Eclipse. The C/C++ indexer tries to run but the code isn't ready for it, so it gets a no-such-element exception.Yes your guess sounds about right here. The indexer runs on the project before it has been successfully imported and corrupts the project. I suppose you could disable auto-indexing and after you manually import the project, you can do a manual rebuild of the index for the project. In any case, I'll check to see if this issue is a known Eclipse CDT issue.
Thank you for taking the time to write a really detailed and clear explanation of the issue and of your analysis. It is very much appreciated.
ki
Thank you for taking the time to read my report.
I'd like to keep this thread open until this issue occurs again to facilitate reporting any new findings to you in context.