Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign

Is CC crash, or Debugger plugin?

<< < (8/23) > >>

Jenna:

--- Quote from: oBFusCATed on July 22, 2011, 01:27:03 pm ---The tooltip crash seems to be gone, but I've got a deadlock probably...
[...]

What I've done is:
1. Searched for a function in the symbol browser
2. The multi choice dlg showed
3. I've double clicked on a result

--- End quote ---

I get the same deadlock, but it happens immediately after I type the searcgstring and hit enter.

I think it happens, because ClassBrowser::OnSearch uses s_TokensTreeCritical and calls m_Tree->Expand(start); in line 746, which leads to a call of ClassBrowser::OnTreeItemExpanding and than ClassBrowserBuilderThread::ExpandItem.
ClassBrowserBuilderThread::ExpandItem also uses s_TokensTreeCritical to create a locker and here it hangs (of course), because we are still in the lock created in ClassBrowserBuilderThread::ExpandItem.

oBFusCATed:
Another problem with the tree is that it is flickering very badly during code editing, on my Centos.

ollydbg:

--- Quote from: oBFusCATed on July 22, 2011, 11:44:32 pm ---Another problem with the tree is that it is flickering very badly during code editing, on my Centos.

--- End quote ---
did you enable the real time parsing (which means parsing while editing), see the code below:

--- Code: ---void NativeParser::OnParserEnd(wxCommandEvent& event)
{
    if (!Manager::IsAppShuttingDown())
        Manager::Get()->GetLogManager()->DebugLog(_("NativeParser received parser end event."));

    Parser* parser = static_cast<Parser*>(event.GetEventObject());
    cbProject* project = static_cast<cbProject*>(event.GetClientData());
    const ParsingType type = static_cast<ParsingType>(event.GetInt());

    switch (type)
    {
    case ptCreateParser:
        {
            wxString log(F(_("Project '%s' parsing stage done!"), project
                         ? project->GetTitle().wx_str() : _T("*NONE*")));
            Manager::Get()->GetLogManager()->Log(log);
            Manager::Get()->GetLogManager()->DebugLog(log);
            CC_PROFILE_TIMER_LOG();
        }
        break;

    case ptAddFileToParser:
        Manager::Get()->GetLogManager()->DebugLog(F(_T("Add files to parser for project '%s'"), project
                                                  ? project->GetTitle().wx_str() : _T("*NONE*")));
        break;

    case ptReparseFile:
        Manager::Get()->GetLogManager()->DebugLog(F(_T("Reparsing modified files for project '%s'"), project
                                                  ? project->GetTitle().wx_str() : _T("*NONE*")));
        if (parser != m_Parser)
        {
            std::pair<cbProject*, Parser*> info = GetParserInfoByCurrentEditor();
            if (info.second && info.second != m_Parser)
            {
                Manager::Get()->GetLogManager()->DebugLog(_T("Start switch from OnParserEnd::ptReparseFile"));
                SwitchParser(info.first, info.second);
            }
        }
        break;

    case ptUndefined:
        Manager::Get()->GetLogManager()->DebugLog(F(_T("Parser event handling error of project '%s'"), project
                                                  ? project->GetTitle().wx_str() : _T("*NONE*")));
        return;
    }

    if (!event.GetString().IsEmpty())
        Manager::Get()->GetLogManager()->DebugLog(event.GetString());

    UpdateClassBrowser();
    m_TimerParsingOneByOne.Start(500, wxTIMER_ONE_SHOT);

    event.Skip();
}
--- End code ---

look, the UpdateClassBrowser() will always be called after one parse finishes.

oBFusCATed:
Of course I have it enabled :)
Probably Freeze and Thaw should be used?

ollydbg:

--- Quote from: oBFusCATed on July 23, 2011, 08:02:33 pm ---Of course I have it enabled :)
Probably Freeze and Thaw should be used?

--- End quote ---
I just read some source code, and find that it use Freeze and Thaw, see:

--- Code: ---void ClassBrowserBuilderThread::BuildTree(bool useLock)
--- End code ---

You can disable realtime parsing to see whether it happened again.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version