Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => CodeCompletion redesign => Topic started by: oBFusCATed on May 27, 2011, 10:46:00 am

Title: CC Crash
Post by: oBFusCATed on May 27, 2011, 10:46:00 am
I've a reproducible crash here.
Centos 5 amd64 linux, C::B latest debugger's branch, self build.

Steps to reproduce:
1. open large project
2. open a file and change something
3. save the file
4. press ctrl+shift+space
5. repeat steps 2-4, until it crashes

The steps above should be executed fast, during the parsing of the projects.

Code
<stack>
    <frame level="0"/>
    <frame level="1" function="std::_Rb_tree&lt;int, int, std::_Identity&lt;int&gt;, std::less&lt;int&gt;, std::allocator&lt;int&gt; &gt;::insert_unique(int const&amp;)" offset="0000002c"/>
    <frame level="2" function="Token::AddChild(int)" offset="0000001c"/>
    <frame level="3" function="ParserThread::DoAddToken(TokenKind, wxString const&amp;, int, int, int, wxString const&amp;, bool, bool)" offset="00000322"/>
    <frame level="4" function="ParserThread::DoParse()" offset="000016db"/>
    <frame level="5" function="ParserThread::Parse()" offset="00000076"/>
    <frame level="6" function="Parser::Parse(wxString const&amp;, bool, ParserThreadOptions&amp;)" offset="00000348"/>
    <frame level="7" function="Parser::ParseBuffer(wxString const&amp;, bool, bool, bool, wxString const&amp;, Token*, int)" offset="000000c0"/>
    <frame level="8" function="NativeParser::ParseLocalBlock(ccSearchData*, int)" offset="000002d9"/>
    <frame level="9" function="NativeParser::MarkItemsByAI(ccSearchData*, std::set&lt;int, std::less&lt;int&gt;, std::allocator&lt;int&gt; &gt;&amp;, bool, bool, bool, int)" offset="0000015e"/>
    <frame level="10" function="NativeParser::MarkItemsByAI(std::set&lt;int, std::less&lt;int&gt;, std::allocator&lt;int&gt; &gt;&amp;, bool, bool, bool, int)" offset="00000138"/>
    <frame level="11" function="NativeParser::GetCallTips(int, wxArrayString&amp;, int&amp;)" offset="00000345"/>
    <frame level="12" function="CodeCompletion::ShowCallTip()" offset="00000193"/>
    <frame level="13" function="CodeCompletion::OnShowCallTip(wxCommandEvent&amp;)" offset="0000001f"/>
    <frame level="14" function="wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&amp;, wxEvtHandler*, wxEvent&amp;)" offset="0000007f"/>
    <frame level="15" function="wxEventHashTable::HandleEvent(wxEvent&amp;, wxEvtHandler*)" offset="0000009f"/>
    <frame level="16" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="000000b9"/>
    <frame level="17" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="00000050"/>
    <frame level="18" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="00000050"/>
    <frame level="19" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="00000050"/>
    <frame level="20" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="00000050"/>
    <frame level="21" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="00000050"/>
    <frame level="22" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="00000050"/>
    <frame level="23" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="00000050"/>
    <frame level="24" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="00000050"/>
    <frame level="25" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="00000050"/>
    <frame level="26" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="00000050"/>
    <frame level="27" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="00000050"/>
    <frame level="28" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="00000050"/>
    <frame level="29" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="00000050"/>
    <frame level="30" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="00000050"/>
    <frame level="31" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="00000050"/>
    <frame level="32" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="00000050"/>
    <frame level="33" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="00000050"/>
    <frame level="34" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="00000050"/>
    <frame level="35" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="00000050"/>
    <frame level="36" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="00000050"/>
    <frame level="37"/>
    <frame level="38" function="g_closure_invoke" offset="0000010a"/>
    <frame level="39"/>
    <frame level="40" function="g_signal_emit_valist" offset="00000858"/>
    <frame level="41" function="g_signal_emit" offset="00000083"/>
    <frame level="42"/>
    <frame level="43" function="g_closure_invoke" offset="0000010a"/>
    <frame level="44"/>
    <frame level="45" function="g_signal_emit_valist" offset="00000626"/>
    <frame level="46" function="g_signal_emit" offset="00000083"/>
    <frame level="47" function="gtk_accel_group_activate" offset="000000fe"/>
    <frame level="48" function="gtk_accel_groups_activate" offset="000000ef"/>
    <frame level="49"/>
    <frame level="50"/>
    <frame level="51" function="g_closure_invoke" offset="0000010a"/>
    <frame level="52"/>
    <frame level="53" function="g_signal_emit_valist" offset="00000626"/>
    <frame level="54" function="g_signal_emit" offset="00000083"/>
    <frame level="55"/>
    <frame level="56" function="gtk_propagate_event" offset="000001c5"/>
    <frame level="57" function="gtk_main_do_event" offset="00000321"/>
    <frame level="58"/>
    <frame level="59" function="g_main_context_dispatch" offset="000001b4"/>
    <frame level="60"/>
    <frame level="61" function="g_main_loop_run" offset="000001ca"/>
    <frame level="62" function="gtk_main" offset="000000a3"/>
    <frame level="63" function="wxEventLoop::Run()" offset="0000006d"/>
    <frame level="64" function="wxAppBase::MainLoop()" offset="00000048"/>
  </stack>

Title: Re: CC Crash
Post by: ollydbg on May 27, 2011, 11:59:33 am
sounds like a bug.
As I know, if the batch parsing is running, both call tip and codecompletion list should be disabled.
Title: Re: CC Crash
Post by: Loaden on May 27, 2011, 12:06:24 pm
sounds like a bug.
As I know, if the batch parsing is running, both call tip and codecompletion list should be disabled.
If there has many project, and all into a parsing queue.
Then perhaps when do a call tip search, there still has a batch parsing of another project (another parser).
Title: Re: CC Crash
Post by: Loaden on May 27, 2011, 12:07:40 pm
So, could you give me more detail?
e.g. How many project added in workspace?
How many parser is running?
The batch parsing is done or not?
Title: Re: CC Crash
Post by: oBFusCATed on May 27, 2011, 12:11:33 pm
Something like 10 projects.
2 or 5 parallel parsers, I've also tried with "one parser for the whole workspace option", same crash.
I'm not sure what to look for in the log, but there are "adding project blabla1 to the parser" log entries