I have made a few progress:
1 - -pg does not help : the gmon.out is empty. I have seen somewhere on the net how to enable gprof for multithreaded applications. Perhaps it would help
For now, the good old printf method is sometimes unbeatable (simple and effective).
2 - when amount of parser threads is set to 1 per project, the freeze does occur
when the amount of parser threads is set to 2 or more per project, there are no more freeze.
Using 1 parser for the whole workspace does not provoke the freeze. However, on the work computer (Win XP), the CodeCompletion does not give results. It works however on Win7
3 - I have tried to launch Code::Blocks in the debugger gdb, and paused the process during the freeze: I end up each time in a ntdll!DbgUiConnectToDbg. So not a lot of help here for now. (and yes, I was using Code::Blocks with debug symbols enabled).
So in short : I have found a workaround for making it work on both machines. This is however not really satisfying, because I still do not understand what happens exactly. So I will continue to search for an explanation (why do we have a freeze with 1 parser and not with 2 ?)
Seb