CobaltFusion / DebugViewPP

DebugView++, collects, views, filters your application logs, and highlights information that is important to you!
Boost Software License 1.0
1.02k stars 149 forks source link

Access violation crash on pause #340

Closed ulex closed 5 years ago

ulex commented 6 years ago

Steps to reproduce: Run DebugViewPP for application with heavy DebugOutputString (1MB per second is enough).

Looks like race condition in LogSources.GetLines.

0:000> .lastevent
Last event: 500.1c10: Access violation - code c0000005 (!!! second chance !!!)
  debugger time: Thu Sep 27 18:08:26.044 2018 (UTC + 2:00)

DebugView__!fusion::debugviewpp::LogSources::GetLines+0x16e [z:\debugviewpp\debugview++lib\logsources.cpp @ 314] 

    for (auto& inputLine : m_linebuffer.GetLines())
    {
        // let the logsource decide how to create processname
        if (inputLine.pLogSource)
        {
            > inputLine.pLogSource->PreProcess(inputLine);
        }

I was trying to fix this issue, but stuck in threading model. Looks like some synchronization point is required, but I'm not sure where it should be.

janwilmans commented 6 years ago

wow, thanks for reporting, I will investigate!!