User forums > Using Code::Blocks

codecompletion parser stops parsing

<< < (2/5) > >>

ollydbg:
The error message comes from the source below:


--- Code: ---void Parser::OnBatchTimer(cb_unused wxTimerEvent& event)
{
    if (Manager::IsAppShuttingDown())
        return;

    // Current batch parser is already exists
    if (ParserCommon::s_CurrentParser && ParserCommon::s_CurrentParser != this)
    {
        m_BatchTimer.Start(1000, wxTIMER_ONE_SHOT);
        return;
    }

    bool sendStartParseEvent = false;

    CC_LOCKER_TRACK_P_MTX_LOCK(ParserCommon::s_ParserMutex)

    if (!m_StopWatchRunning)
        StartStopWatch();

    bool send_event = true;
    if (!m_PoolTask.empty())
    {
        m_Pool.BatchBegin();

        PTVector& v = m_PoolTask.front();
        for (PTVector::const_iterator it = v.begin(); it != v.end(); ++it)
            m_Pool.AddTask(*it, true);
        m_PoolTask.pop();

        m_Pool.BatchEnd();
        send_event = false; // error
    }
    else if (   !m_PriorityHeaders.empty()
             || !m_BatchParseFiles.empty()
             || !m_PredefinedMacros.IsEmpty() )
    {
        ParserThreadedTask* thread = new ParserThreadedTask(this, ParserCommon::s_ParserMutex);
        m_Pool.AddTask(thread, true);

        // Have not done any batch parsing
        if (ParserCommon::s_CurrentParser)
            send_event = false; // error
        else
        {
            ParserCommon::s_CurrentParser = this;
            m_StopWatch.Start(); // reset timer
            sendStartParseEvent = true;
        }
    }

    CC_LOCKER_TRACK_P_MTX_UNLOCK(ParserCommon::s_ParserMutex)

    if (send_event)
    {
        if (sendStartParseEvent)
            ProcessParserEvent(m_ParserState, ParserCommon::idParserStart);
        else
            ProcessParserEvent(ParserCommon::ptUndefined, ParserCommon::idParserStart, _T("Unexpected behaviour!"));
    }
}

--- End code ---

MortenMacFly:
Having a look at the code it means that the only reason would be if:
m_PoolTask.empty() && m_PriorityHeaders.empty() && m_BatchParseFiles.empty() && m_PredefinedMacros.IsEmpty()
Well we can make another else-if tree for that particular case but I wonder how this can happen...?! It would mean that nothing has to be done at all - as if there would be not a single file to be parsed, including no priority headers, which is usually never the case.

@Martin K.: What are your CC settings, can you post a screenshot of all CC settings tabs?
Can you try to strip down the WS first project by projects and the file by file to (maybe) get a minimal example? If you want to, contact me via PM so I can provide you with a personal email address if you have concerns to post it here. But maybe (if possible) you can really strip it down to a non-secret minimalist example. It must not even compile - just to reproduce this state.

Martin K.:

--- Quote from: MortenMacFly on November 22, 2012, 07:44:51 pm ---Having a look at the code it means that the only reason would be if:
m_PoolTask.empty() && m_PriorityHeaders.empty() && m_BatchParseFiles.empty() && m_PredefinedMacros.IsEmpty()
Well we can make another else-if tree for that particular case but I wonder how this can happen...?! It would mean that nothing has to be done at all - as if there would be not a single file to be parsed, including no priority headers, which is usually never the case.

@Martin K.: What are your CC settings, can you post a screenshot of all CC settings tabs?
Can you try to strip down the WS first project by projects and the file by file to (maybe) get a minimal example? If you want to, contact me via PM so I can provide you with a personal email address if you have concerns to post it here. But maybe (if possible) you can really strip it down to a non-secret minimalist example. It must not even compile - just to reproduce this state.

--- End quote ---

I have a demo, and i hope that it fails on your system also, it was a lot of probing, testing, changing the project and workspace.

This problem comes into place when i use several different compiler and no GCC (in this example MSVC2003 and MSVC2010).

Martin

MortenMacFly:

--- Quote from: Martin K. on November 22, 2012, 08:26:27 pm ---I have a demo, and i hope that it fails on your system also, [...]

--- End quote ---
Funny.

But seriously: It works for me. So I need your CC settings. I guess it has to do with it...
Settings -> Editor -> Code Completion -> all 4 tabs

oBFusCATed:
Probably the full default.conf should be needed.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version