#441 Codeblocks blocking while open a new file from a project


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....


  • kipade

    kipade - 2016-11-28

    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

  • Teodor Petrov

    Teodor Petrov - 2016-11-28

    Do you have a backtrace?
    What OS and build are you using?

  • kipade

    kipade - 2016-11-29

    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

  • Teodor Petrov

    Teodor Petrov - 2016-11-29

    Do you have a sample project?
    What command do you use to open the file from step 3?

  • Teodor Petrov

    Teodor Petrov - 2016-11-29

    Also which version of Codeblocks do you use?

  • Teodor Petrov

    Teodor Petrov - 2016-11-29
    • Type: Undefined --> Bug_Report
  • kipade

    kipade - 2016-11-30

    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


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks