Hello all, Im a codeblocks user(in fact a c++ developper^_^). I found codeblocks will trapped into a deep recursive loop for search a specified file. Its from completion plugin's source file: wxArrayString NativeParser::GetAllPathsByFilename. First, it search all things from the top level at the project path(1 level higher than my project source directory); second, if the file is just a c header file without a relative source file, it then start recursively search its source file from the project top level....., then tragedy happened, the search target directory is so large, I think i can not wait it done....
I think the line const wxString prjPath = project->GetCommonTopLevelPath();
should be const wxString prjPath = project->GetBasePath();
at mostly, I should not search a source file outside my project source directory
Do you have a backtrace?
What OS and build are you using?
I use GNU/Slackware Linux 14.1. This issue can be reproduced easily:
1) Create a project within a huge directory with many many files
2) Create a new .h file(without a corresponding .c file)
3) Try open the .h file
4) Got it
Do you have a sample project?
What command do you use to open the file from step 3?
Also which version of Codeblocks do you use?
OK. I will describe all the details of the condition.
I use GNU/Slackware linux 14.1, codeblocks svn 10890
The details to reproduce the issue:
1) Assume there is a large directory(my directory has more than 120,000 sub-files and directories in it)
2) touch a new single .h file in it, aaa.h for example
3) create a project under the directory, test for example
4) Open test project, add external aaa.h into it and open it
5) cb trapped here, it eats 100% of CPU