I fixed the deadlock in trunk (svn r7361).
Not sure whether it's the best way, but it works.
Here is the patch I used:
Index: parser.cpp
===================================================================
--- parser.cpp (Revision 7360)
+++ parser.cpp (Arbeitskopie)
@@ -1001,12 +1001,14 @@
bool Parser::ForceStartParsing()
{
- wxCriticalSectionLocker locker(s_ParserCritical);
if (!m_IsParsing && !m_BatchTimer.IsRunning() && !Done())
{
- m_BatchTimer.Start(100, wxTIMER_ONE_SHOT);
if (m_ParsingType == ptUndefined)
+ {
+ wxCriticalSectionLocker locker(s_ParserCritical);
m_ParsingType = ptAddFileToParser;
+ }
+ m_BatchTimer.Start(100, wxTIMER_ONE_SHOT);
return true;
}
else
The deadlock has occured, because
ForceStartParsing uses
s_ParserCrtical as
wxCriticalSectionLocker and
Done() does the same.
I moved the locker into the body of the if-clause, because that's the only place where something is changed.
I also moved the timer start, so it is surely fired after changing the parsing-type.
@cc-gurus (Loaden and ollydbg) :
please check the changes, I did not find any side-effects.