When I compile my code, try to go to the implementation of a function etc. It happens a lot. I'm using version 12.11 on Ubuntu 12.04. Is this a known issue? Am I doing something wrong?
Thanks,
Erez
Scanned 0 files for #includes, cache used 0, cache updated 0
Scanned 0 files for #includes, cache used 0, cache updated 0
Scanned 0 files for #includes, cache used 0, cache updated 0
Scanned 0 files for #includes, cache used 0, cache updated 0
Scanned 0 files for #includes, cache used 0, cache updated 0
Process terminated with status 0 (0 minutes, 9 seconds)
0 errors, 1 warnings (0 minutes, 9 seconds)
Re-parsed 1 files.
Starting re-parsing for project 'erez_proj'...
Pool task operated?!
When I compile my code, try to go to the implementation of a function etc. It happens a lot. I'm using version 12.11 on Ubuntu 12.04. Is this a known issue? Am I doing something wrong?
Thanks,
Erez
The actual log:CodeScanned 0 files for #includes, cache used 0, cache updated 0
Scanned 0 files for #includes, cache used 0, cache updated 0
Scanned 0 files for #includes, cache used 0, cache updated 0
Scanned 0 files for #includes, cache used 0, cache updated 0
Scanned 0 files for #includes, cache used 0, cache updated 0
Process terminated with status 0 (0 minutes, 9 seconds)
0 errors, 1 warnings (0 minutes, 9 seconds)
Re-parsed 1 files.
Starting re-parsing for project 'erez_proj'...
Pool task operated?!
[erezz@erez-lx:~/work/tmp]$ NativeParser::GetAllPathsByFilename(): Traversing 'my_src_code_dir' for: class_name.*
NativeParser::GetAllPathsByFilename(): Traversing ' - my_src_code_dir' for: class_name.*
NativeParser::GetAllPathsByFilename(): Found 1 files:
- my_src_code_dir/src/class_name.c
ClassBrowser::OnThreadEvent(): Updating class browser...
ClassBrowser::OnThreadEvent(): Class browser updated.
Re-parsed 1 files.
NativeParser::OnParserStart(): Starting re-parsing for project 'my_proj'...
Project 'my_proj' parsing stage done (1040 total parsed files, 31247 tokens in 0 minute(s), 0.023 seconds).
NativeParser::GetAllPathsByFilename(): Traversing 'my_src_code_dir/src' for: class_name.*
NativeParser::GetAllPathsByFilename(): Traversing ' - my_src_code_dir' for: class_name.*
NativeParser::GetAllPathsByFilename(): Found 1 files:
- my_src_code_dir/src/class_name.c
ClassBrowser::OnThreadEvent(): Updating class browser...
ClassBrowser::OnThreadEvent(): Class browser updated.
I'm now running with version 9423 from svn. I clicked ctrl+G (goto line). The IDE wasn't responsive for ~20 seconds and I saw the following logs in the shell where I ran cb from:Code[erezz@erez-lx:~/work/tmp]$ NativeParser::GetAllPathsByFilename(): Traversing 'my_src_code_dir' for: class_name.*
NativeParser::GetAllPathsByFilename(): Traversing ' - my_src_code_dir' for: class_name.*
NativeParser::GetAllPathsByFilename(): Found 1 files:
- my_src_code_dir/src/class_name.c
ClassBrowser::OnThreadEvent(): Updating class browser...
ClassBrowser::OnThreadEvent(): Class browser updated.
Re-parsed 1 files.
NativeParser::OnParserStart(): Starting re-parsing for project 'my_proj'...
Project 'my_proj' parsing stage done (1040 total parsed files, 31247 tokens in 0 minute(s), 0.023 seconds).
NativeParser::GetAllPathsByFilename(): Traversing 'my_src_code_dir/src' for: class_name.*
NativeParser::GetAllPathsByFilename(): Traversing ' - my_src_code_dir' for: class_name.*
NativeParser::GetAllPathsByFilename(): Found 1 files:
- my_src_code_dir/src/class_name.c
ClassBrowser::OnThreadEvent(): Updating class browser...
ClassBrowser::OnThreadEvent(): Class browser updated.
I'm now running with version 9423 from svn. I clicked ctrl+G (goto line). The IDE wasn't responsive for ~20 seconds and I saw the following logs in the shell where I ran cb from:Code[erezz@erez-lx:~/work/tmp]$ NativeParser::GetAllPathsByFilename(): Traversing 'my_src_code_dir' for: class_name.*
NativeParser::GetAllPathsByFilename(): Traversing ' - my_src_code_dir' for: class_name.*
NativeParser::GetAllPathsByFilename(): Found 1 files:
- my_src_code_dir/src/class_name.c
ClassBrowser::OnThreadEvent(): Updating class browser...
ClassBrowser::OnThreadEvent(): Class browser updated.
Re-parsed 1 files.
NativeParser::OnParserStart(): Starting re-parsing for project 'my_proj'...
Project 'my_proj' parsing stage done (1040 total parsed files, 31247 tokens in 0 minute(s), 0.023 seconds).
NativeParser::GetAllPathsByFilename(): Traversing 'my_src_code_dir/src' for: class_name.*
NativeParser::GetAllPathsByFilename(): Traversing ' - my_src_code_dir' for: class_name.*
NativeParser::GetAllPathsByFilename(): Found 1 files:
- my_src_code_dir/src/class_name.c
ClassBrowser::OnThreadEvent(): Updating class browser...
ClassBrowser::OnThreadEvent(): Class browser updated.
@erezz, thanks for the report.
Can you tell me how to reproduce this? I need a project to test this bug. :)
In my env, it happens every time I click ctrl+G. I guess that other users did not encounter this bug, so it's probably related to my specific project (which I can't share) + my home directory (which is mounted and is actually located on another server).If you want to see more logs, you can simply enable the debug macro in plugins\codecompletion\nativeparser.cpp
If you want to debug what happens between the "Starting re-parsing" log message and the "parsing stage done" message, you can add more specific logs (between those 2 messages) and upload a debug version that I can run.
In my env, it happens every time I click ctrl+G. I guess that other users did not encounter this bug, so it's probably related to my specific project (which I can't share) + my home directory (which is mounted and is actually located on another server).If you want to see more logs, you can simply enable the debug macro in plugins\codecompletion\nativeparser.cpp
If you want to debug what happens between the "Starting re-parsing" log message and the "parsing stage done" message, you can add more specific logs (between those 2 messages) and upload a debug version that I can run.
By change:
#define CC_NATIVEPARSER_DEBUG_OUTPUT 0
to
#define CC_NATIVEPARSER_DEBUG_OUTPUT 1
Then you will see a lot of log message in Code::Blocks Debug log.
** (codeblocks:10221): CRITICAL **: murrine_style_draw_flat_box: assertion `width >= -1' failed
[erezz@erez-lx:~/work/tmp]$ NativeParser::GetAllPathsByFilename(): Enter
NativeParser::GetAllPathsByFilename(): Traversing 'my_proj/include' for: myfile.*
NativeParser::GetAllPathsByFilename(): Traversing ' - my_proj' for: myfile.*
NativeParser::GetAllPathsByFilename(): Found 1 files:
- my_proj/include/myfile.h
NativeParser::GetAllPathsByFilename(): Leave
NativeParser::Done(): true
NativeParser::GetProjectByFilename(): /tmp/somefile.c
ClassBrowser::OnThreadEvent(): Updating class browser...
ClassBrowser::OnThreadEvent(): Class browser updated.
NativeParser::Done(): true
NativeParser::GetProjectByFilename(): /tmp/somefile.c
NativeParser::Done(): true
NativeParser::GetProjectByFilename(): /tmp/somefile.c
In my env, it happens every time I click ctrl+G. I guess that other users did not encounter this bug, so it's probably related to my specific project (which I can't share) + my home directory (which is mounted and is actually located on another server).I guess this is the cause of the your lag issue.
dir.Traverse(traverser, filespec, wxDIR_FILES);
In my env, it happens every time I click ctrl+G. I guess that other users did not encounter this bug, so it's probably related to my specific project (which I can't share) + my home directory (which is mounted and is actually located on another server).I guess this is the cause of the your lag issue.
There are some traverser in CC's code, which search the folder for some specified file names.CodeBut in your case, all the file are in-fact in another computer, which can take several seconds to do the traversing.dir.Traverse(traverser, filespec, wxDIR_FILES);
Can you try to test the project if you put them in your own computer (not remote server).
In my env, it happens every time I click ctrl+G. I guess that other users did not encounter this bug, so it's probably related to my specific project (which I can't share) + my home directory (which is mounted and is actually located on another server).I guess this is the cause of the your lag issue.
There are some traverser in CC's code, which search the folder for some specified file names.CodeBut in your case, all the file are in-fact in another computer, which can take several seconds to do the traversing.dir.Traverse(traverser, filespec, wxDIR_FILES);
Can you try to test the project if you put them in your own computer (not remote server).
I tested the same project on my local machine and it works very well. Still, I need to work on my mounted home directory... Our internal network is fast enough, so it's not a bottleneck. Any chance for a fix for this problem?
[erezz@erez-lx:~/myproj]$ find . -name *.c | wc -l
521
[erezz@erez-lx:~/myproj]$ find . -name *.h | wc -l
395
[erezz@erez-lx:~/myproj]$ find . -name *.py | wc -l
681
[erezz@erez-lx:~/myproj]$ find . -name *.sh | wc -l
81
[erezz@erez-lx:~/myproj]$ find . -name Makefile | wc -l
27
which is a total of 1705 files. It sounds strange to me that going over 1705 files takes ~30 seconds, even if it's on a network fs.Probably you can strace codeblocks to see what going on and where it is slow.
I ran c::b with strace and I saw that stat64() gets called for files that are not included in my project. My project is located in ~/dir1/dir2/myproj. I see that stat64() gets called for files in ~/dir1/dir2/otherproj. Unfortunately, otherproj is huge, so it may take time to go over all its files.
Am I doing something wrong? Is it something in my project configuration?
Thanks,
Erez
My project is located in ~/dir1/dir2/myproj. I see that stat64() gets called for files in ~/dir1/dir2/otherproj. Unfortunately, otherproj is huge, so it may take time to go over all its files.Maybe The cbp file in ~/dir1/dir2/myproj folder contains some files/reference to ~/dir1/dir2/otherproj. (This is only a guess)