Author Topic: cb hangs and I get "Pool task operated?!" message  (Read 16351 times)

Offline erezz

  • Multiple posting newcomer
  • *
  • Posts: 53
cb hangs and I get "Pool task operated?!" message
« on: October 24, 2013, 10:42:51 am »
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

Offline erezz

  • Multiple posting newcomer
  • *
  • Posts: 53
Re: cb hangs and I get "Pool task operated?!" message
« Reply #1 on: October 24, 2013, 10:47:09 am »
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:

Code
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?!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: cb hangs and I get "Pool task operated?!" message
« Reply #2 on: October 24, 2013, 10:50:15 am »
Try a night build or/and provide a simple project plus steps to reproduce the problem.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: cb hangs and I get "Pool task operated?!" message
« Reply #3 on: October 24, 2013, 12:07:05 pm »
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:

Code
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?!

i have my doubts that this is the build log. Please make a rebuild and post the log from the build log tab

greetings

Offline erezz

  • Multiple posting newcomer
  • *
  • Posts: 53
Re: cb hangs and I get "Pool task operated?!" message
« Reply #4 on: October 28, 2013, 02:51:59 pm »
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.

Offline erezz

  • Multiple posting newcomer
  • *
  • Posts: 53
Re: cb hangs and I get "Pool task operated?!" message
« Reply #5 on: October 28, 2013, 02:53:56 pm »
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.

Of course, I can't upload my project to the forum. I hope that the logs above can help.

Erez

Offline erezz

  • Multiple posting newcomer
  • *
  • Posts: 53
Re: cb hangs and I get "Pool task operated?!" message
« Reply #6 on: October 28, 2013, 03:00:30 pm »
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.

And one more note - cb spends its time (those ~20 seconds) between the  "Starting re-parsing" log message and the "parsing stage done" message. I hope it helps.

Erez

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: cb hangs and I get "Pool task operated?!" message
« Reply #7 on: October 28, 2013, 03:36:00 pm »
@erezz, thanks for the report.
Can you tell me how to reproduce this? I need a project to test this bug. :)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline erezz

  • Multiple posting newcomer
  • *
  • Posts: 53
Re: cb hangs and I get "Pool task operated?!" message
« Reply #8 on: October 28, 2013, 03:47:23 pm »
@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 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.

Erez

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: cb hangs and I get "Pool task operated?!" message
« Reply #9 on: October 28, 2013, 03:52:59 pm »
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 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.
If you want to see more logs, you can simply enable the debug macro in plugins\codecompletion\nativeparser.cpp
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.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline erezz

  • Multiple posting newcomer
  • *
  • Posts: 53
Re: cb hangs and I get "Pool task operated?!" message
« Reply #10 on: October 28, 2013, 04:35:51 pm »
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 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.
If you want to see more logs, you can simply enable the debug macro in plugins\codecompletion\nativeparser.cpp
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.


Recompiled cb with this flag set, and now everything works well... If it happens again, I will send a report.

Offline erezz

  • Multiple posting newcomer
  • *
  • Posts: 53
Re: cb hangs and I get "Pool task operated?!" message
« Reply #11 on: October 28, 2013, 05:21:59 pm »
Found a scenario in which cb hangs for ~30 seconds: I go to management->symbols and select view = "current file's symbols". cb freezes and when it's back I got this error:

Code
** (codeblocks:10221): CRITICAL **: murrine_style_draw_flat_box: assertion `width >= -1' failed

Then, I moved to other c files in the project. cb freezes again, I don't see any logs and when it's back, I see logs that looks OK:

Code
[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

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: cb hangs and I get "Pool task operated?!" message
« Reply #12 on: October 29, 2013, 03:24:08 am »
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.
Code
dir.Traverse(traverser, filespec, wxDIR_FILES);
But in your case, all the file are in-fact in another computer, which can take several seconds to do the traversing.
Can you try to test the project if you put them in your own computer (not remote server).
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline erezz

  • Multiple posting newcomer
  • *
  • Posts: 53
Re: cb hangs and I get "Pool task operated?!" message
« Reply #13 on: October 29, 2013, 07:48:51 am »
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.
Code
dir.Traverse(traverser, filespec, wxDIR_FILES);
But in your case, all the file are in-fact in another computer, which can take several seconds to do the traversing.
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?

Thanks,
Erez

Offline erezz

  • Multiple posting newcomer
  • *
  • Posts: 53
Re: cb hangs and I get "Pool task operated?!" message
« Reply #14 on: October 30, 2013, 09:10:48 am »
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.
Code
dir.Traverse(traverser, filespec, wxDIR_FILES);
But in your case, all the file are in-fact in another computer, which can take several seconds to do the traversing.
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?

BTW - I went over my project to see how many files it contains:

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

Erez