Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
NativeParser lockup when parsing Visual Studio 2013 and Boost 1.55.0 headers
sodev:
When i open any of my projects that use the Visual Studio 2013 compiler or if they contain certain boost headers with the current version of CodeBlocks (r9573) CodeBlocks locks up when i open the first file. The debug window shows the following:
--- Code: ---NativeParser::OnParserStart(): Starting batch parsing for project 'visualizer'...
ReadVarNames() : Unexpected token '}' for 'plus', file 'C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/include/xstddef', line 210.
ReadVarNames() : Unexpected token '}' for 'minus', file 'C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/include/xstddef', line 225.
ReadVarNames() : Unexpected token '}' for 'multiplies', file 'C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/include/xstddef', line 240.
ReadVarNames() : Unexpected token '}' for 'equal_to', file 'C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/include/xstddef', line 255.
ReadVarNames() : Unexpected token '}' for 'less', file 'C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/include/xstddef', line 270.
ReadVarNames() : Unexpected token '<' for '_Alloc_allocate', file 'C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/include/xmemory0', line 313.
ReadVarNames() : Unexpected token '::' for 'shared_count', file 'C:/devel/boost_1_55_0/boost/smart_ptr/detail/shared_count.hpp', line 584.
ReadVarNames() : Unexpected token '}' for 'divides', file 'C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/include/xfunctional', line 211.
ReadVarNames() : Unexpected token '}' for 'modulus', file 'C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/include/xfunctional', line 224.
ReadVarNames() : Unexpected token '}' for 'negate', file 'C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/include/xfunctional', line 236.
ReadVarNames() : Unexpected token '}' for 'not_equal_to', file 'C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/include/xfunctional', line 252.
ReadVarNames() : Unexpected token '}' for 'greater', file 'C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/include/xfunctional', line 265.
ReadVarNames() : Unexpected token '}' for 'greater_equal', file 'C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/include/xfunctional', line 281.
ReadVarNames() : Unexpected token '}' for 'less_equal', file 'C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/include/xfunctional', line 294.
ReadVarNames() : Unexpected token '}' for 'logical_and', file 'C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/include/xfunctional', line 307.
ReadVarNames() : Unexpected token '}' for 'logical_or', file 'C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/include/xfunctional', line 320.
ReadVarNames() : Unexpected token '}' for 'logical_not', file 'C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/include/xfunctional', line 332.
ReadVarNames() : Unexpected token '}' for 'bit_and', file 'C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/include/xfunctional', line 345.
ReadVarNames() : Unexpected token '}' for 'bit_or', file 'C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/include/xfunctional', line 358.
ReadVarNames() : Unexpected token '}' for 'bit_xor', file 'C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/include/xfunctional', line 371.
ReadVarNames() : Unexpected token '}' for 'bit_not', file 'C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/include/xfunctional', line 383.
--- End code ---
After that CodeBlocks freezes. I checked the headers and these error messages occur when the parser sees a -> declytype() decoration of a template method, so i disabled the parsing of files without extension and i got a little further.
--- Code: ---NativeParser::OnParserStart(): Starting batch parsing for project 'visualizer'...
ReadVarNames() : Unexpected token '::' for 'shared_count', file 'C:/devel/boost_1_55_0/boost/smart_ptr/detail/shared_count.hpp', line 584.
--- End code ---
And freeze again. Now this makes no sense because that line contains pretty ordinary c++ code and directly above pretty much the same line has passed without problems.
My last working CodeBlocks version is r9272, this version shows exactly the same error messages, however there is one more line:
--- Code: ---NativeParser::OnParserEnd(): Project 'visualizer' parsing stage done!
--- End code ---
For some strange reason the very same errors don't produce a lockup. Every later revision i tested (only a few, can't remember which exactly) causes these lockups and is currently unusable for me. I tried to get the HandleMethod() function to at least recognize the decltype decoration but my code doesn't even get executed, i tried to understand the parser logic but after some hours i gave up.
ollydbg:
First, thanks for the report.
Generally, the messages like "ReadVarNames() : Unexpected token..." are debug log messages, they should not let C::B freeze, right?
When the Parser try to parse a project files, it firstly plot some message like
--- Code: ---NativeParser::OnParserStart(): Starting batch parsing for project 'visualizer'...
--- End code ---
When it finishes paring the project files, it plot something like
--- Code: ---NativeParser::OnParserEnd(): Project 'visualizer' parsing stage done!
--- End code ---
So, once you receive such message, this means the parsing job is done.
--- Quote ---My last working CodeBlocks version is r9272
--- End quote ---
So, the bug may introduced between r9272 and r9573, but I think it is still hard to find which commit has regression.
Did you build C::B against wx2.8.12? Or wx3.0.0? I don't have VC in my system, but I can download the boost sources, is it possible to have a simple project that I can test it. Thanks.
sigbjorn:
I experience a similar lockup, arch linux x64 latest, codeblock 13.12, boost 1.55
Repeats: Open workspace with the projects. Parser starts up, no parsing stage done! message.
Update/workaround: Tweak with settings (Settings/Editor/Code completion C/C++ parser, turned off parse complex macros).
avoids hang, at the cost of less precise symbol parsing
oBFusCATed:
Can someone extract a minimal sample file that reproduces the problem?
sodev:
Hmm, apparently the problem must be something else, i created a minimal sample that just contained one file with a dummy int main() that includes the problematic boost header and although the error message appeared the parser completed this time. Even enabling the parsing of the VS system headers did not cause a lockup.
I'm trying to strip down my project to figure out what to remove to make the lockup disappear.
I am building CodeBlocks against wx 2.8.12 and the recent wxWidgets trunk and both versions show this behavior. Right now i am testing with the 2.8.12 version because CodeBlocks still causes assertions if using a higher wxWidgets version :(. I am compiling it with the latest TDM-MinGW32 4.8.1.
Navigation
[0] Message Index
[#] Next page
Go to full version