News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

CC parser hangs/fails

Started by Alpha, December 15, 2012, 12:21:34 AM

Previous topic - Next topic

Alpha

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?

ollydbg

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

MortenMacFly

...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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Alpha

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)

The last part of the debug log says:

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:

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

MortenMacFly

Quote from: Alpha on December 15, 2012, 04:27:43 PM
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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Alpha

Quote from: MortenMacFly on December 16, 2012, 07:47:15 AM
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.

Quote from: MortenMacFly on December 16, 2012, 07:47:15 AM
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.

Alpha

Quote from: Alpha on December 16, 2012, 04:52:59 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.