Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: Alpha on December 15, 2012, 12:21:34 am

Title: CC parser hangs/fails
Post by: Alpha on December 15, 2012, 12:21:34 am
Rev 8663 on Windows appears to fail to start the CC parser.  It logs that a new parser has been created, then CPU usage drops to zero.  Requesting tooltip/completion results in the still-parsing message.  If I try to close the project (or Code::Blocks), the program stops responding.
I tried inspecting the threads/stack by debugging Code::Blocks with Code::Blocks, but my unskilled eyes were unable to find anything related.  Also, inspection of recent commits did not reveal anything that should be related to the parser.

Ideas?
Title: Re: CC parser hangs/fails
Post by: ollydbg on December 15, 2012, 07:17:04 am
What steps did you try to let CC hang. For my experience, sometimes, CC will hang, but it's hard to find a reproduce way. :P
Title: Re: CC parser hangs/fails
Post by: MortenMacFly on December 15, 2012, 08:52:34 am
...what do you see in the debug log if you try to cc anything? Usually there is written in what stage the parser is and why it does not continue.
Title: Re: CC parser hangs/fails
Post by: Alpha on December 15, 2012, 04:27:43 pm
Steps:

The last part of the debug log says:
Code
Caching GCC default include dir: C:\libraries\MinGW\lib\gcc\mingw32\4.7.1\include\c++
Caching GCC default include dir: C:\libraries\MinGW\lib\gcc\mingw32\4.7.1\include\c++\mingw32
Caching GCC default include dir: C:\libraries\MinGW\lib\gcc\mingw32\4.7.1\include\c++\backward
Caching GCC default include dir: C:\libraries\MinGW\lib\gcc\mingw32\4.7.1\include
Caching GCC default include dir: C:\libraries\MinGW\include
Caching GCC default include dir: C:\libraries\MinGW\lib\gcc\mingw32\4.7.1\include-fixed
Passing list of files to batch-parser.
Header to parse with priority: 'C:\libraries\MinGW\lib\gcc\mingw32\4.7.1\include\c++\cstddef'
Header to parse with priority: 'C:\libraries\MinGW\include\w32api.h'
Header to parse with priority: 'C:\Libraries\wxMSW-2.8.12\include\wx\defs.h'
Header to parse with priority: 'C:\Libraries\wxMSW-2.8.12\include\wx\dlimpexp.h'
Header to parse with priority: 'C:\Libraries\wxMSW-2.8.12\include\wx\toplevel.h'
Header to parse with priority: 'C:\Libraries\cb_patch\src\include\sdk.h'
Add 6 priority parsing file(s) for project 'Code::Blocks wx2.8.x'...
Added 808 file(s) for project 'Code::Blocks wx2.8.x' to batch-parser...
No active project available.
Create new parser for project 'Code::Blocks wx2.8.x'
Updating class browser...
Class browser updated.
Starting batch parsing for project 'Code::Blocks wx2.8.x'...

If I request a tooltip, it says:
Code
The Parser is still parsing files. > Reasons:
- still priority headers to parse
- still system priority headers to parse
- still batch parse files to parse
- still pre-defined macros to operate
- still need to mark files as local
- thread pool is not done yet
Title: Re: CC parser hangs/fails
Post by: MortenMacFly on December 16, 2012, 07:47:15 am
Steps:
  • Launch Code::Blocks
  • Open CodeBlocks.cbp (the problem starts here every time, but it also has the same problem if I open my own simpler projects)
Well this is what I do nearly every day and it just works...?! ???
Do you have done something special? Why, if you remove the targets step-by-step? This may lead to the target and therefore file which may fail. Do you have CC patches applied from 3rd party sources that could cause this? Try a C::B build with a clean CC from SVN trunk.
Title: Re: CC parser hangs/fails
Post by: Alpha on December 16, 2012, 04:52:59 pm
Well this is what I do nearly every day and it just works...?! ???
I know ???... my thoughts exactly.  I was very surprised when it started.

Do you have done something special? Why, if you remove the targets step-by-step? This may lead to the target and therefore file which may fail. Do you have CC patches applied from 3rd party sources that could cause this? Try a C::B build with a clean CC from SVN trunk.
This is from completely vanilla source, so no changes there.  It just occurred to me that I have not tried a full rebuild recently.  Will report back if that works, or I discover anything else.
Title: Re: CC parser hangs/fails
Post by: Alpha on December 16, 2012, 06:45:46 pm
It just occurred to me that I have not tried a full rebuild recently.
Still not sure what caused the problem, but after a full rebuild, everything functions normally again.

Apologies for the noise.