Bug #19025 2013-06-16 15:39

schizofrenikh

'std::bad_alloc' when loading cmake generated project

The crash occures only when code completion plugin is enabled.

The minimal project necessary to reproduce the behaviour is available here:

http://schizofrenikh.tk/pliki321/test_project.tar.gz

Environment:

Linux konserwa 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1 x86_64 GNU/Linux

Code::Blocks version: svn 9156

Build: Jan 14 2013, 07:54:56 - wx2.8.12 (Linux, unicode) - 64 bit

The build comes from repository:

http://apt.jenslody.de/testing/

Category
Plugin::CodeCompletion
Group
Platform:Linux
Status
Closed
Close date
2013-10-04 21:18
Assigned to
tpetrov
tpetrov 2013-10-02 17:12

File is missing, re-upload and reopen the bug.

schizofrenikh 2013-10-03 18:48

Here are the files:

http://filecloud.io/vc2ht658

When line :

include( src )

is commented out in CMakeLists.txt the editor works fine.

With the line present I get the following in console:

...

NativeParser::CreateParser(): Finish creating a new parser for project 'test'

ClassBrowser::OnThreadEvent(): Updating class browser...

ClassBrowser::OnThreadEvent(): Class browser updated.

NativeParser::OnParserStart(): Starting batch parsing for project 'test'...

terminate called after throwing an instance of 'std::bad_alloc'

what(): std::bad_alloc

Przerwane

Problem still present in version 9298

tpetrov 2013-10-03 19:33

I was able to reproduce it. I'll see what is going on with it.

tpetrov 2013-10-03 19:49

Hm, it seems that the generated cbp file is ill-formed.

There are this tags in it:

<Unit filename="/tmp/test/src">

<Option virtualFolder="CMake Files\" />

</Unit>

I think the unit should point to a filename, not a directory.

Could you please report this problem to cmake developers, so they can fix the generator?

I'll fix the crash in C::B, because it should not happen. But I suppose this file will cause many other similar problems.

tpetrov 2013-10-04 21:18

This bug is now fixed in HEAD.

Thank you for reporting it.