Bug #13181 2008-02-22 11:25
henning_b
Crash while saving template code
While testing some Boost code, I had experienced a reproducable crash:
Every time I comment in line 1 and 2 (see below) then save and then comment out line 2 or 1 again and save I get a crash. CB says nothing, just closes. Windows also gives no information about a crash. I've tried this some times and it's reproducable for me.
I'm using WinXP64.
Maybe it has to do with the heavy templated code of Boost an parsing symbols that use such code.
Code:
#include <boost/statechart/state_machine.hpp>
#include <boost/statechart/simple_state.hpp>
#include <boost/statechart/event.hpp>
#include <iostream>
namespace sc = boost::statechart;
struct EvStartStop : sc::event<EvStartStop> {};
struct EvReset : sc::event<EvReset> {};
struct Active;
struct StopWatch : sc::state_machine<StopWatch, Active> {};
struct Stopped;
struct Active : sc::simple_state<Active, StopWatch, Stopped> {};
struct Running : sc::simple_state<Running, Active> {};
struct Stopped : sc::simple_state<Stopped, Active> {};
int main()
{
//StopWatch myWatch; //1
//myWatch.initiate(); //2
return 0;
}
- Category
- Application::Crash
- Group
- Status
- Open
- Close date
- Assigned to
History
Forgot the version of CB:
I've experienced this bug in Nigthly 4875, the updated to 4893 an got the same result.
Can't reproduce here :(
But I've got crashes with my template c++ files.
The crash was somewhere in the code completion plugin
gentoo linux amd64
wx:2.8.9.2
cb:5473
Here is a backtrace from the crash (It seems to be infinite recursion in the TokensTree::RemoveToken function) (gdb) bt #0 0x00007f17a9fdce7c in ?? () from /lib/libc.so.6 #1 0x00007f17a9fdeea8 in malloc () from /lib/libc.so.6 #2 0x00007f17aa81a74d in operator new () from /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/libstdc++.so.6 #3 0x00007f17a40d3dbb in std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::_M_copy () from /usr/lib/codeblocks/plugins/libcodecompletion.so #4 0x00007f17a40d3df8 in std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::_M_copy () from /usr/lib/codeblocks/plugins/libcodecompletion.so #5 0x00007f17a40d3df8 in std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::_M_copy () from /usr/lib/codeblocks/plugins/libcodecompletion.so #6 0x00007f17a410c77e in TokensTree::RemoveToken () from /usr/lib/codeblocks/plugins/libcodecompletion.so #7 0x00007f17a410c7e5 in TokensTree::RemoveToken () from /usr/lib/codeblocks/plugins/libcodecompletion.so #8 0x00007f17a410c7e5 in TokensTree::RemoveToken () from /usr/lib/codeblocks/plugins/libcodecompletion.so #9 0x00007f17a410c7e5 in TokensTree::RemoveToken () from /usr/lib/codeblocks/plugins/libcodecompletion.so #10 0x00007f17a410c7e5 in TokensTree::RemoveToken () from /usr/lib/codeblocks/plugins/libcodecompletion.so #11 0x00007f17a410c7e5 in TokensTree::RemoveToken () from /usr/lib/codeblocks/plugins/libcodecompletion.so #12 0x00007f17a410c7e5 in TokensTree::RemoveToken () from /usr/lib/codeblocks/plugins/libcodecompletion.so #13 0x00007f17a410c7e5 in TokensTree::RemoveToken () from /usr/lib/codeblocks/plugins/libcodecompletion.so #14 0x00007f17a410c7e5 in TokensTree::RemoveToken () from /usr/lib/codeblocks/plugins/libcodecompletion.so #15 0x00007f17a410c7e5 in TokensTree::RemoveToken () from /usr/lib/codeblocks/plugins/libcodecompletion.so #16 0x00007f17a410c7e5 in TokensTree::RemoveToken () from /usr/lib/codeblocks/plugins/libcodecompletion.so #17 0x00007f17a410c7e5 in TokensTree::RemoveToken () from /usr/lib/codeblocks/plugins/libcodecompletion.so #18 0x00007f17a410c7e5 in TokensTree::RemoveToken () from /usr/lib/codeblocks/plugins/libcodecompletion.so #19 0x00007f17a410c7e5 in TokensTree::RemoveToken () from /usr/lib/codeblocks/plugins/libcodecompletion.so #20 0x00007f17a410c7e5 in TokensTree::RemoveToken () from /usr/lib/codeblocks/plugins/libcodecompletion.so #21 0x00007f17a410c7e5 in TokensTree::RemoveToken () from /usr/lib/codeblocks/plugins/libcodecompletion.so #22 0x00007f17a410c7e5 in TokensTree::RemoveToken () from /usr/lib/codeblocks/plugins/libcodecompletion.so #23 0x00007f17a410c7e5 in TokensTree::RemoveToken () from /usr/lib/codeblocks/plugins/libcodecompletion.so #24 0x00007f17a410c7e5 in TokensTree::RemoveToken () from /usr/lib/codeblocks/plugins/libcodecompletion.so #25 0x00007f17a410c7e5 in TokensTree::RemoveToken () from /usr/lib/codeblocks/plugins/libcodecompletion.so #26 0x00007f17a410c7e5 in TokensTree::RemoveToken () from /usr/lib/codeblocks/plugins/libcodecompletion.so #27 0x00007f17a410c7e5 in TokensTree::RemoveToken () from /usr/lib/codeblocks/plugins/libcodecompletion.so #28 0x00007f17a410c7e5 in TokensTree::RemoveToken () from /usr/lib/codeblocks/plugins/libcodecompletion.so #29 0x00007f17a410c7e5 in TokensTree::RemoveToken () from /usr/lib/codeblocks/plugins/libcodecompletion.so #30 0x00007f17a410c7e5 in TokensTree::RemoveToken () from /usr/lib/codeblocks/plugins/libcodecompletion.so #31 0x00007f17a410c7e5 in TokensTree::RemoveToken () from /usr/lib/codeblocks/plugins/libcodecompletion.so #32 0x00007f17a410c7e5 in TokensTree::RemoveToken () from /usr/lib/codeblocks/plugins/libcodecompletion.so