User forums > Help

crash while parsing source files

<< < (2/7) > >>

Jenna:
No idea at the moment.

At build time, did you use a clean source-tree ?

jarro_2783:
one of the computers did, I'll redo the others and see what happens.
I'll try breaking at that function that gets called lots so that you can get a backtrace of what it was doing before it died.

jarro_2783:
backtrace stopping at the point where it goes crazy

edit: I just noticed going a few functions down that the oldToken pointer starts being the same.


--- Code: ---#0  TokensTree::RemoveToken (this=0x12dc990, oldToken=0x7f354c6b0240)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/bits/stl_tree.h:411
idx = 18279
parentToken = (Token *) 0x1
nodes = {_M_t = {
    _M_impl = {<std::allocator<std::_Rb_tree_node<int> >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<int> >> = {<No data fields>}, <No data fields>},
      _M_key_compare = {<std::binary_function<int,int,bool>> = {<No data fields>}, <No data fields>}, _M_header = {
        _M_color = std::_S_red, _M_parent = 0x0, _M_left = 0x7fff6b02a458, _M_right = 0x7fff6b02a458},
      _M_node_count = 0}}}
idx2 = <value optimized out>
#1  0x00007f3555a1ec5b in TokensTree::RemoveToken (this=0x12dc990, oldToken=0x7f354c94ccf0) at parser/token.cpp:601
idx = 6422
parentToken = <value optimized out>
nodes = {_M_t = {
    _M_impl = {<std::allocator<std::_Rb_tree_node<int> >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<int> >> = {<No data fields>}, <No data fields>},
      _M_key_compare = {<std::binary_function<int,int,bool>> = {<No data fields>}, <No data fields>}, _M_header = {
        _M_color = std::_S_red, _M_parent = 0x1d49b30, _M_left = 0x1f7e790, _M_right = 0x1adf3c0},
      _M_node_count = 50}}}
idx2 = <value optimized out>
#2  0x00007f3555a1ec5b in TokensTree::RemoveToken (this=0x12dc990, oldToken=0x7f354c75e290) at parser/token.cpp:601
idx = 392
---Type <return> to continue, or q <return> to quit---
parentToken = <value optimized out>
nodes = {_M_t = {
    _M_impl = {<std::allocator<std::_Rb_tree_node<int> >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<int> >> = {<No data fields>}, <No data fields>},
      _M_key_compare = {<std::binary_function<int,int,bool>> = {<No data fields>}, <No data fields>}, _M_header = {
        _M_color = std::_S_red, _M_parent = 0x20a4950, _M_left = 0x19f27e0, _M_right = 0x20a48f0},
      _M_node_count = 59}}}
idx2 = <value optimized out>
#3  0x00007f3555a1ebf0 in TokensTree::RemoveToken (this=0x12dc990, oldToken=0x7f354c75caf0) at parser/token.cpp:594
idx = 374
parentToken = <value optimized out>
nodes = {_M_t = {
    _M_impl = {<std::allocator<std::_Rb_tree_node<int> >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<int> >> = {<No data fields>}, <No data fields>},
      _M_key_compare = {<std::binary_function<int,int,bool>> = {<No data fields>}, <No data fields>}, _M_header = {
        _M_color = std::_S_red, _M_parent = 0x20a3de0, _M_left = 0x1e79bd0, _M_right = 0x20a4170},
      _M_node_count = 32}}}
idx2 = <value optimized out>
#4  0x00007f3555a1ebf0 in TokensTree::RemoveToken (this=0x12dc990, oldToken=0x7f354c7411f0) at parser/token.cpp:594
idx = 38
parentToken = <value optimized out>
nodes = {_M_t = {
    _M_impl = {<std::allocator<std::_Rb_tree_node<int> >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<int> >> = ---Type <return> to continue, or q <return> to quit---
{<No data fields>}, <No data fields>},
      _M_key_compare = {<std::binary_function<int,int,bool>> = {<No data fields>}, <No data fields>}, _M_header = {
        _M_color = std::_S_red, _M_parent = 0x1e92bf0, _M_left = 0x23dcad0, _M_right = 0x1b90000},
      _M_node_count = 505}}}
idx2 = <value optimized out>
#5  0x00007f3555a1ebf0 in TokensTree::RemoveToken (this=0x12dc990, oldToken=0x7f354c7410a0) at parser/token.cpp:594
idx = 37
parentToken = <value optimized out>
nodes = {_M_t = {
    _M_impl = {<std::allocator<std::_Rb_tree_node<int> >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<int> >> = {<No data fields>}, <No data fields>},
      _M_key_compare = {<std::binary_function<int,int,bool>> = {<No data fields>}, <No data fields>}, _M_header = {
        _M_color = std::_S_red, _M_parent = 0x200cad0, _M_left = 0x16c29c0, _M_right = 0x1ee2570},
      _M_node_count = 3}}}
idx2 = <value optimized out>
#6  0x00007f3555a1efd0 in TokensTree::RemoveFile (this=0x12dc990, index=5) at parser/token.cpp:709
idx = <value optimized out>
the_token = (Token *) 0x1
match1 = <value optimized out>
match2 = 176
the_list = (TokenIdxSet &) @0x7f35504cc768: {_M_t = {
    _M_impl = {<std::allocator<std::_Rb_tree_node<int> >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<int> >> = {<No data fields>}, <No data fields>},
---Type <return> to continue, or q <return> to quit---
      _M_key_compare = {<std::binary_function<int,int,bool>> = {<No data fields>}, <No data fields>}, _M_header = {
        _M_color = std::_S_red, _M_parent = 0x7f35503e4100, _M_left = 0x7f35503d5ee0, _M_right = 0x7f35503cf140},
      _M_node_count = 21}}}
#7  0x00007f3555a0a989 in Parser::ReparseModifiedFiles (this=0x12d4ef8) at parser/parser.cpp:939
filename = {<wxStringBase> = {static npos = 18446744073709551615,
    m_pchData = 0x49cb7b19}, <No data fields>}
files_list = {c = {<std::_Deque_base<wxString,std::allocator<wxString> >> = {
      _M_impl = {<std::allocator<wxString>> = {<__gnu_cxx::new_allocator<wxString>> = {<No data fields>}, <No data fields>}, _M_map = 0x1ed5d80, _M_map_size = 8, _M_start = {_M_cur = 0x1e92900, _M_first = 0x1e92900,
          _M_last = 0x1e92b00, _M_node = 0x1ed5d98}, _M_finish = {_M_cur = 0x1e92900, _M_first = 0x1e92900,
          _M_last = 0x1e92b00, _M_node = 0x1ed5d98}}}, <No data fields>}}
#8  0x00007f3555a0ad39 in Parser::OnTimer (this=0x7f3550000020, event=@0x7f355c52c2b8) at parser/parser.cpp:898
No locals.
#9  0x00007f355d41108f in wxEvtHandler::ProcessEventIfMatches () from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#10 0x00007f355d4112a2 in wxEvtHandler::SearchDynamicEventTable () from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#11 0x00007f355d411352 in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#12 0x00007f355ddc8ee6 in wxTimerBase::Notify () from /usr/lib/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
#13 0x00007f355dcbd334 in ?? () from /usr/lib/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#14 0x00007f355f80e20b in ?? () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#15 0x00007f355f80ece2 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#16 0x00007f355f80f525 in ?? () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#17 0x00007f355f80f81d in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#18 0x00007f3562974512 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#19 0x00007f355dcb444d in wxEventLoop::Run () from /usr/lib/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
#20 0x00007f355dd485cb in wxAppBase::MainLoop () from /usr/lib/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
#21 0x000000000042f5fb in CodeBlocksApp::OnRun (this=0x7f3550000020) at app.cpp:760
retval = <value optimized out>
#22 0x00007f355d3ae50c in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#23 0x000000000042ed22 in main (argc=1, argv=0x7f355c52c2b8) at app.cpp:251
No locals.

--- End code ---

Jenna:
Are you able to create a demo-project (as small as possible), that leads to the crash ?

I see why it crashs (most likely):

--- Code: ---parentToken = (Token *) 0x1
--- End code ---
in RemoveToken will reliable lead to a crash, because it should either be a vaild pointer or 0.

jarro_2783:
www.cse.unsw.edu.au/~jarrydb/cbcrash.tar.bz2

changing the file parser.hpp and saving it causes the crash.
It also needs boost 1.38, and I couldn't get it to crash without having that in my search path, so when it asks for the boost global variable you'll have to give it the path to 1.38.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version