<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/121134/">https://git.reviewboard.kde.org/r/121134/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On November 16th, 2014, 3:58 p.m. CET, <b>Milian Wolff</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">as I said before: Did you check whether that is actually the case? Did you add some assertions to see what other thread is calling this code?</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I'm not sure whether this is supposed to be threadsafe or not. If it must be threadsafe, you'll also need to make s_allowQuit threadsafe (QAtomicBool).</p></pre>
</blockquote>
<p>On November 16th, 2014, 4:53 p.m. CET, <b>René J.V. Bertin</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I have indeed looked at this aspect, but not exhaustively and haven't found evidence of cross-thread reference counting. Yet.
It's unclear what you mean with "that" (the thing actually the case). It "that" refers to the quitting issue, I can of course never prove that it is due to a reference counting race condition because the issue isn't reproducible reliably. I can only invalidate the idea that it is due to such a race condition, whenever it happens again with properly protected reference counting.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I think we have to leave it up to the kdelibs maintainers/authors to decide whether or not this has to be thread safe. The doxygen documentation for KJob does not mention anything about thread safety. It does however note that <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">KJob and its subclasses is meant to be used in a fire-and-forget way. It's deleting itself when it has finished using deleteLater() so the job instance disappears after the next event loop run.</em> . It is not said that a KJob cannot use a KJob itself, which could lead to concurrent reference (de)counting, nor whether a KJob instance is guaranteed to be deleted in the same thread it was created, and I think that a <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">concurrent processing</em> class that does not explicitly mention it does thread unsafe things can be assumed to be thread safe.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">There's no QAtomicBool, btw.</p></pre>
</blockquote>
<p>On November 16th, 2014, 5:36 p.m. CET, <b>Milian Wolff</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">As I told you before in other patches you send in: Please make sure you find the actual reason before changing other code in the hope of it improving things. If there is no hard evidence that your bug manifests itself because of a race in KGlobal::ref/deref, then don't change it. Adding an assertion to the code that its only accessed from the mainthread is done easily and should be hit reliably (contrary to a race condition or lock contention that Thomas proposes).</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">And also note that a KJob is not neccessarily implemented using threads. You can also use e.g. QIODevice or external processes internally to get the desired behavior.</p></pre>
</blockquote>
<p>On November 16th, 2014, 6:19 p.m. CET, <b>René J.V. Bertin</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">KJobs not using threads to implement concurrency will not cause race conditions in the reference counting; either they are in separate processes or they live in the same thread.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Let me repeat once more what I also wrote in reply to Thomas below: a feature (like reference counting) of a framework that is frequently used in multithreaded applications can be expected to be thread safe. That's why my original description states that I consider the fact that it isn't an important bug regardless of whether it's the cause of my issue. Regrettably I am a scientist trained to give background anytime I propose something, I keep forgetting that there are contexts where that actually turns out counterproductive :(</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">You suggest to use an assert or other detection of doing reference counting off the main thread, and doing so imply that reference counting should apparently happen only on that thread. There is no evidence that that is any more valid an assumption than that it should be thread safe. But I can do it ... only it won't tell us if multiple threads try to access the counter at the same time.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">NB: my initial proposition used about the cheapest way to get interlocked counting I could think of, to introduce as little side-effects as possible for applications that are not concerned by possible race conditions. I don't believe there can be any other side-effect than additional cycles (though by using QAtomicInt we have to assume that it is implemented correctly).</p></pre>
</blockquote>
<p>On November 16th, 2014, 7:06 p.m. CET, <b>René J.V. Bertin</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">A little extract, seconds after relaunching KDevelop with </p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"><span style="color: #B00040">void</span> KGlobal<span style="color: #666666">::</span>ref()
{
s_refCount.fetchAndAddOrdered(<span style="color: #666666">1</span>);
<span style="color: #008000; font-weight: bold">if</span> ( QThread<span style="color: #666666">::</span>currentThread() <span style="color: #666666">!=</span> qApp<span style="color: #666666">-></span><span style="color: #008000; font-weight: bold">thread</span>() ) {
qWarning() <span style="color: #666666"><<</span> <span style="color: #BA2121">"KGlobal::ref() called off the main thread"</span> <span style="color: #666666"><<</span> kBacktrace();
}
<span style="color: #408080; font-style: italic">//kDebug() << "KGlobal::ref() : refCount = " << int(s_refCount);</span>
}
<span style="color: #B00040">void</span> KGlobal<span style="color: #666666">::</span>deref()
{
<span style="color: #B00040">int</span> prevRefCount <span style="color: #666666">=</span> s_refCount.fetchAndAddOrdered(<span style="color: #666666">-1</span>);
<span style="color: #008000; font-weight: bold">if</span> ( QThread<span style="color: #666666">::</span>currentThread() <span style="color: #666666">!=</span> qApp<span style="color: #666666">-></span><span style="color: #008000; font-weight: bold">thread</span>() ) {
qWarning() <span style="color: #666666"><<</span> <span style="color: #BA2121">"KGlobal::ref() called off the main thread"</span> <span style="color: #666666"><<</span> kBacktrace();
}
<span style="color: #408080; font-style: italic">//kDebug() << "KGlobal::deref() : refCount = " << int(s_refCount);</span>
<span style="color: #008000; font-weight: bold">if</span> (prevRefCount <span style="color: #666666"><=</span> <span style="color: #666666">1</span> <span style="color: #666666">&&</span> <span style="color: #B00040">int</span>(s_allowQuit)) {
QCoreApplication<span style="color: #666666">::</span>instance()<span style="color: #666666">-></span>quit();
}
}
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"><span style="color: #008000; font-weight: bold">kdevelop</span><span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">68673</span><span style="color: #666666">)/</span><span style="color: #008000; font-weight: bold">kdevelop</span> <span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">cpp</span> <span style="color: #008000; font-weight: bold">support</span><span style="color: #666666">)</span> <span style="color: #008000; font-weight: bold">Cpp</span><span style="color: #666666">:</span><span style="color: #AA22FF">:instantiateDeclarationAndContext</span><span style="color: #666666">:</span> <span style="color: #008000; font-weight: bold">Resolved</span> <span style="color: #008000; font-weight: bold">bad</span> <span style="color: #008000; font-weight: bold">base-class</span> <span style="color: #BA2121">"QtSharedPointer::ExternalRefCount< T >"</span> <span style="color: #BA2121">"QtSharedPointer::ExternalRefCount< T >"</span>
<span style="color: #008000; font-weight: bold">kdevelop</span><span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">68673</span><span style="color: #666666">)/</span><span style="color: #008000; font-weight: bold">kdevelop</span> <span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">cpp</span> <span style="color: #008000; font-weight: bold">support</span><span style="color: #666666">)</span> <span style="color: #008000; font-weight: bold">Cpp</span><span style="color: #666666">:</span><span style="color: #AA22FF">:instantiateDeclarationAndContext</span><span style="color: #666666">:</span> <span style="color: #008000; font-weight: bold">Resolved</span> <span style="color: #008000; font-weight: bold">bad</span> <span style="color: #008000; font-weight: bold">base-class</span> <span style="color: #BA2121">"QtSharedPointer::ExternalRefCount< T >"</span> <span style="color: #BA2121">"QtSharedPointer::ExternalRefCount< T >"</span>
<span style="color: #008000; font-weight: bold">kdevelop</span><span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">68673</span><span style="color: #666666">)/</span><span style="color: #008000; font-weight: bold">kdevelop</span> <span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">cpp</span> <span style="color: #008000; font-weight: bold">support</span><span style="color: #666666">)</span> <span style="color: #008000; font-weight: bold">Cpp</span><span style="color: #666666">:</span><span style="color: #AA22FF">:instantiateDeclarationAndContext</span><span style="color: #666666">:</span> <span style="color: #008000; font-weight: bold">Resolved</span> <span style="color: #008000; font-weight: bold">bad</span> <span style="color: #008000; font-weight: bold">base-class</span> <span style="color: #BA2121">"QtSharedPointer::ExternalRefCount< T >"</span> <span style="color: #BA2121">"QtSharedPointer::ExternalRefCount< T >"</span>
<span style="color: #008000; font-weight: bold">KGlobal</span><span style="color: #666666">:</span><span style="color: #AA22FF">:ref</span><span style="color: #666666">()</span> <span style="color: #008000; font-weight: bold">called</span> <span style="color: #008000; font-weight: bold">off</span> <span style="color: #008000; font-weight: bold">the</span> <span style="color: #008000; font-weight: bold">main</span> <span style="color: #008000; font-weight: bold">thread</span> <span style="color: #BA2121">"</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000ba123</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100d89</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">169</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e49f1</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000012f85f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span><span style="color: #BA2121"></span>
<span style="color: #BA2121">"</span>
<span style="color: #008000; font-weight: bold">KGlobal</span><span style="color: #666666">:</span><span style="color: #AA22FF">:ref</span><span style="color: #666666">()</span> <span style="color: #008000; font-weight: bold">called</span> <span style="color: #008000; font-weight: bold">off</span> <span style="color: #008000; font-weight: bold">the</span> <span style="color: #008000; font-weight: bold">main</span> <span style="color: #008000; font-weight: bold">thread</span> <span style="color: #BA2121">"</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000ba123</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100d89</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">169</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e49f1</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000012f85f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span><span style="color: #BA2121"></span>
<span style="color: #BA2121">"</span>
<span style="color: #008000; font-weight: bold">KGlobal</span><span style="color: #666666">:</span><span style="color: #AA22FF">:ref</span><span style="color: #666666">()</span> <span style="color: #008000; font-weight: bold">called</span> <span style="color: #008000; font-weight: bold">off</span> <span style="color: #008000; font-weight: bold">the</span> <span style="color: #008000; font-weight: bold">main</span> <span style="color: #008000; font-weight: bold">thread</span> <span style="color: #BA2121">"</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000ba123</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100d89</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">169</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e49f1</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000012f85f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span><span style="color: #BA2121"></span>
<span style="color: #BA2121">"</span>
<span style="color: #008000; font-weight: bold">KGlobal</span><span style="color: #666666">:</span><span style="color: #AA22FF">:ref</span><span style="color: #666666">()</span> <span style="color: #008000; font-weight: bold">called</span> <span style="color: #008000; font-weight: bold">off</span> <span style="color: #008000; font-weight: bold">the</span> <span style="color: #008000; font-weight: bold">main</span> <span style="color: #008000; font-weight: bold">thread</span> <span style="color: #BA2121">"</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000ba123</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100d89</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">169</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e49f1</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000012f85f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span><span style="color: #BA2121"></span>
<span style="color: #BA2121">"</span>
<span style="color: #008000; font-weight: bold">KGlobal</span><span style="color: #666666">:</span><span style="color: #AA22FF">:ref</span><span style="color: #666666">()</span> <span style="color: #008000; font-weight: bold">called</span> <span style="color: #008000; font-weight: bold">off</span> <span style="color: #008000; font-weight: bold">the</span> <span style="color: #008000; font-weight: bold">main</span> <span style="color: #008000; font-weight: bold">thread</span> <span style="color: #BA2121">"</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000ba123</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100d89</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">169</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e49f1</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000012f85f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span><span style="color: #BA2121"></span>
<span style="color: #BA2121">"</span>
<span style="color: #008000; font-weight: bold">KGlobal</span><span style="color: #666666">:</span><span style="color: #AA22FF">:ref</span><span style="color: #666666">()</span> <span style="color: #008000; font-weight: bold">called</span> <span style="color: #008000; font-weight: bold">off</span> <span style="color: #008000; font-weight: bold">the</span> <span style="color: #008000; font-weight: bold">main</span> <span style="color: #008000; font-weight: bold">thread</span> <span style="color: #BA2121">"</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000ba123</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100d89</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">169</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e49f1</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000012f85f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span><span style="color: #BA2121"></span>
<span style="color: #BA2121">"</span>
<span style="color: #008000; font-weight: bold">KGlobal</span><span style="color: #666666">:</span><span style="color: #AA22FF">:ref</span><span style="color: #666666">()</span> <span style="color: #008000; font-weight: bold">called</span> <span style="color: #008000; font-weight: bold">off</span> <span style="color: #008000; font-weight: bold">the</span> <span style="color: #008000; font-weight: bold">main</span> <span style="color: #008000; font-weight: bold">thread</span> <span style="color: #BA2121">"</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000ba123</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100d89</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">169</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e49f1</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000012f85f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span><span style="color: #BA2121"></span>
<span style="color: #BA2121">"</span>
<span style="color: #008000; font-weight: bold">KGlobal</span><span style="color: #666666">:</span><span style="color: #AA22FF">:ref</span><span style="color: #666666">()</span> <span style="color: #008000; font-weight: bold">called</span> <span style="color: #008000; font-weight: bold">off</span> <span style="color: #008000; font-weight: bold">the</span> <span style="color: #008000; font-weight: bold">main</span> <span style="color: #008000; font-weight: bold">thread</span> <span style="color: #BA2121">"</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000ba123</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100d89</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">169</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e49f1</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000012f85f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span><span style="color: #BA2121"></span>
<span style="color: #BA2121">"</span>
<span style="color: #008000; font-weight: bold">KGlobal</span><span style="color: #666666">:</span><span style="color: #AA22FF">:ref</span><span style="color: #666666">()</span> <span style="color: #008000; font-weight: bold">called</span> <span style="color: #008000; font-weight: bold">off</span> <span style="color: #008000; font-weight: bold">the</span> <span style="color: #008000; font-weight: bold">main</span> <span style="color: #008000; font-weight: bold">thread</span> <span style="color: #BA2121">"</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000ba123</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100d89</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">169</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e49f1</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000012f85f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span><span style="color: #BA2121"></span>
<span style="color: #BA2121">"</span>
<span style="color: #008000; font-weight: bold">KGlobal</span><span style="color: #666666">:</span><span style="color: #AA22FF">:ref</span><span style="color: #666666">()</span> <span style="color: #008000; font-weight: bold">called</span> <span style="color: #008000; font-weight: bold">off</span> <span style="color: #008000; font-weight: bold">the</span> <span style="color: #008000; font-weight: bold">main</span> <span style="color: #008000; font-weight: bold">thread</span> <span style="color: #BA2121">"</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000ba123</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100d89</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">169</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e49f1</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000012f85f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span><span style="color: #BA2121"></span>
<span style="color: #BA2121">"</span>
<span style="color: #008000; font-weight: bold">KGlobal</span><span style="color: #666666">:</span><span style="color: #AA22FF">:ref</span><span style="color: #666666">()</span> <span style="color: #008000; font-weight: bold">called</span> <span style="color: #008000; font-weight: bold">off</span> <span style="color: #008000; font-weight: bold">the</span> <span style="color: #008000; font-weight: bold">main</span> <span style="color: #008000; font-weight: bold">thread</span> <span style="color: #BA2121">"</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000ba123</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100d89</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">169</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e49f1</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000012f85f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span><span style="color: #BA2121"></span>
<span style="color: #BA2121">"</span>
<span style="color: #008000; font-weight: bold">KGlobal</span><span style="color: #666666">:</span><span style="color: #AA22FF">:ref</span><span style="color: #666666">()</span> <span style="color: #008000; font-weight: bold">called</span> <span style="color: #008000; font-weight: bold">off</span> <span style="color: #008000; font-weight: bold">the</span> <span style="color: #008000; font-weight: bold">main</span> <span style="color: #008000; font-weight: bold">thread</span> <span style="color: #BA2121">"</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000ba123</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100d89</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">169</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e49f1</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000012f85f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span><span style="color: #BA2121"></span>
<span style="color: #BA2121">"</span>
<span style="color: #008000; font-weight: bold">KGlobal</span><span style="color: #666666">:</span><span style="color: #AA22FF">:ref</span><span style="color: #666666">()</span> <span style="color: #008000; font-weight: bold">called</span> <span style="color: #008000; font-weight: bold">off</span> <span style="color: #008000; font-weight: bold">the</span> <span style="color: #008000; font-weight: bold">main</span> <span style="color: #008000; font-weight: bold">thread</span> <span style="color: #BA2121">"</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000ba123</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100d89</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">169</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e49f1</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000012f85f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span><span style="color: #BA2121"></span>
<span style="color: #BA2121">"</span>
<span style="color: #008000; font-weight: bold">kdevelop</span><span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">68673</span><span style="color: #666666">)/</span><span style="color: #008000; font-weight: bold">kdevelop</span> <span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">cpp</span> <span style="color: #008000; font-weight: bold">support</span><span style="color: #666666">)</span> <span style="color: #008000; font-weight: bold">Cpp</span><span style="color: #666666">:</span><span style="color: #AA22FF">:instantiateDeclarationAndContext</span><span style="color: #666666">:</span> <span style="color: #008000; font-weight: bold">Resolved</span> <span style="color: #008000; font-weight: bold">bad</span> <span style="color: #008000; font-weight: bold">base-class</span> <span style="color: #BA2121">"_List_base< _Tp, _Alloc >"</span> <span style="color: #BA2121">"_List_base< _Tp, _Alloc >"</span>
<span style="color: #008000; font-weight: bold">kdevelop</span><span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">68673</span><span style="color: #666666">)/</span><span style="color: #008000; font-weight: bold">kdevelop</span> <span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">cpp</span> <span style="color: #008000; font-weight: bold">support</span><span style="color: #666666">)</span> <span style="color: #008000; font-weight: bold">Cpp</span><span style="color: #666666">:</span><span style="color: #AA22FF">:instantiateDeclarationAndContext</span><span style="color: #666666">:</span> <span style="color: #008000; font-weight: bold">Resolved</span> <span style="color: #008000; font-weight: bold">bad</span> <span style="color: #008000; font-weight: bold">base-class</span> <span style="color: #BA2121">"QVector< T >"</span> <span style="color: #BA2121">"QVector< T >"</span>
<span style="color: #008000; font-weight: bold">KGlobal</span><span style="color: #666666">:</span><span style="color: #AA22FF">:ref</span><span style="color: #666666">()</span> <span style="color: #008000; font-weight: bold">called</span> <span style="color: #008000; font-weight: bold">off</span> <span style="color: #008000; font-weight: bold">the</span> <span style="color: #008000; font-weight: bold">main</span> <span style="color: #008000; font-weight: bold">thread</span> <span style="color: #BA2121">"</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000ba123</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100d89</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">169</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e49f1</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000012f85f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span><span style="color: #BA2121"></span>
<span style="color: #BA2121">"</span>
<span style="color: #008000; font-weight: bold">KGlobal</span><span style="color: #666666">:</span><span style="color: #AA22FF">:ref</span><span style="color: #666666">()</span> <span style="color: #008000; font-weight: bold">called</span> <span style="color: #008000; font-weight: bold">off</span> <span style="color: #008000; font-weight: bold">the</span> <span style="color: #008000; font-weight: bold">main</span> <span style="color: #008000; font-weight: bold">thread</span> <span style="color: #BA2121">"</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000ba123</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100d89</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">169</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e49f1</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000012f85f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span><span style="color: #BA2121"></span>
<span style="color: #BA2121">"</span>
<span style="color: #008000; font-weight: bold">KGlobal</span><span style="color: #666666">:</span><span style="color: #AA22FF">:ref</span><span style="color: #666666">()</span> <span style="color: #008000; font-weight: bold">called</span> <span style="color: #008000; font-weight: bold">off</span> <span style="color: #008000; font-weight: bold">the</span> <span style="color: #008000; font-weight: bold">main</span> <span style="color: #008000; font-weight: bold">thread</span> <span style="color: #BA2121">"</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000ba123</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100d89</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">169</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e49f1</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000012f85f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span><span style="color: #BA2121"></span>
<span style="color: #BA2121">"</span>
<span style="color: #008000; font-weight: bold">KGlobal</span><span style="color: #666666">:</span><span style="color: #AA22FF">:ref</span><span style="color: #666666">()</span> <span style="color: #008000; font-weight: bold">called</span> <span style="color: #008000; font-weight: bold">off</span> <span style="color: #008000; font-weight: bold">the</span> <span style="color: #008000; font-weight: bold">main</span> <span style="color: #008000; font-weight: bold">thread</span> <span style="color: #BA2121">"</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000ba123</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100d89</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">169</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e49f1</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000012f85f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span><span style="color: #BA2121"></span>
<span style="color: #BA2121">"</span>
<span style="color: #008000; font-weight: bold">KGlobal</span><span style="color: #666666">:</span><span style="color: #AA22FF">:ref</span><span style="color: #666666">()</span> <span style="color: #008000; font-weight: bold">called</span> <span style="color: #008000; font-weight: bold">off</span> <span style="color: #008000; font-weight: bold">the</span> <span style="color: #008000; font-weight: bold">main</span> <span style="color: #008000; font-weight: bold">thread</span> <span style="color: #BA2121">"</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000ba123</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100d89</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">169</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e49f1</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000012f85f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span><span style="color: #BA2121"></span>
<span style="color: #BA2121">"</span>
<span style="color: #008000; font-weight: bold">KGlobal</span><span style="color: #666666">:</span><span style="color: #AA22FF">:ref</span><span style="color: #666666">()</span> <span style="color: #008000; font-weight: bold">called</span> <span style="color: #008000; font-weight: bold">off</span> <span style="color: #008000; font-weight: bold">the</span> <span style="color: #008000; font-weight: bold">main</span> <span style="color: #008000; font-weight: bold">thread</span> <span style="color: #BA2121">"</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000ba123</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100d89</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">169</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e49f1</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000012f85f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span><span style="color: #BA2121"></span>
<span style="color: #BA2121">"</span>
<span style="color: #008000; font-weight: bold">KGlobal</span><span style="color: #666666">:</span><span style="color: #AA22FF">:ref</span><span style="color: #666666">()</span> <span style="color: #008000; font-weight: bold">called</span> <span style="color: #008000; font-weight: bold">off</span> <span style="color: #008000; font-weight: bold">the</span> <span style="color: #008000; font-weight: bold">main</span> <span style="color: #008000; font-weight: bold">thread</span> <span style="color: #BA2121">"</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000ba123</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100d89</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">169</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e49f1</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000012f85f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span><span style="color: #BA2121"></span>
<span style="color: #BA2121">"</span>
</pre></div>
</p></pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">A bit more detail:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"><span style="color: #B00040">void</span> KGlobal<span style="color: #666666">::</span>ref()
{
s_refCount.fetchAndAddOrdered(<span style="color: #666666">1</span>);
<span style="color: #008000; font-weight: bold">if</span> ( QThread<span style="color: #666666">::</span>currentThread() <span style="color: #666666">!=</span> qApp<span style="color: #666666">-></span><span style="color: #008000; font-weight: bold">thread</span>() ) {
qWarning() <span style="color: #666666"><<</span> <span style="color: #BA2121">"KGlobal::ref()="</span> <span style="color: #666666"><<</span> <span style="color: #B00040">int</span>(s_refCount) <span style="color: #666666"><<</span> <span style="color: #BA2121">"called from background thread"</span> <span style="color: #666666"><<</span> QThread<span style="color: #666666">::</span>currentThread() <span style="color: #666666"><<</span> <span style="color: #BA2121">"</span><span style="color: #BB6622; font-weight: bold">\n</span><span style="color: #BA2121">"</span> <span style="color: #666666"><<</span> kBacktrace();
}
<span style="color: #408080; font-style: italic">//kDebug() << "KGlobal::ref() : refCount = " << int(s_refCount);</span>
}
<span style="color: #B00040">void</span> KGlobal<span style="color: #666666">::</span>deref()
{
<span style="color: #B00040">int</span> prevRefCount <span style="color: #666666">=</span> s_refCount.fetchAndAddOrdered(<span style="color: #666666">-1</span>);
<span style="color: #008000; font-weight: bold">if</span> ( QThread<span style="color: #666666">::</span>currentThread() <span style="color: #666666">!=</span> qApp<span style="color: #666666">-></span><span style="color: #008000; font-weight: bold">thread</span>() ) {
qWarning() <span style="color: #666666"><<</span> <span style="color: #BA2121">"KGlobal::deref()="</span> <span style="color: #666666"><<</span> <span style="color: #B00040">int</span>(s_refCount) <span style="color: #666666"><<</span> <span style="color: #BA2121">"called from background thread"</span> <span style="color: #666666"><<</span> QThread<span style="color: #666666">::</span>currentThread() <span style="color: #666666"><<</span> <span style="color: #BA2121">"</span><span style="color: #BB6622; font-weight: bold">\n</span><span style="color: #BA2121">"</span> <span style="color: #666666"><<</span> kBacktrace();
}
<span style="color: #408080; font-style: italic">//kDebug() << "KGlobal::deref() : refCount = " << int(s_refCount);</span>
<span style="color: #008000; font-weight: bold">if</span> (prevRefCount <span style="color: #666666"><=</span> <span style="color: #666666">1</span> <span style="color: #666666">&&</span> <span style="color: #B00040">int</span>(s_allowQuit)) {
QCoreApplication<span style="color: #666666">::</span>instance()<span style="color: #666666">-></span>quit();
}
}
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"><span style="color: #BA2121">" </span>
<span style="color: #BA2121">KGlobal::ref()= 20 called from background thread QThread(0x121a40e30, name = "</span><span style="color: #008000; font-weight: bold">Thread</span> <span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">pooled</span><span style="color: #666666">)</span><span style="color: #BA2121">") </span>
<span style="color: #BA2121"> "</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000b9f83</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100c4b</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">267</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e4851</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000013015f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span>
<span style="color: #BA2121">" </span>
<span style="color: #BA2121">KGlobal::ref()= 21 called from background thread QThread(0x121a40e30, name = "</span><span style="color: #008000; font-weight: bold">Thread</span> <span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">pooled</span><span style="color: #666666">)</span><span style="color: #BA2121">") </span>
<span style="color: #BA2121"> "</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000b9f83</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100c4b</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">267</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e4851</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000013015f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span>
<span style="color: #BA2121">" </span>
<span style="color: #BA2121">KGlobal::ref()= 9 called from background thread QThread(0x13ebfb7b0, name = "</span><span style="color: #008000; font-weight: bold">Thread</span> <span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">pooled</span><span style="color: #666666">)</span><span style="color: #BA2121">") </span>
<span style="color: #BA2121"> "</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000b9f83</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100c4b</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">267</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e4851</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000013015f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span>
<span style="color: #BA2121">" </span>
<span style="color: #BA2121">KGlobal::ref()= 10 called from background thread QThread(0x11c1b3660, name = "</span><span style="color: #008000; font-weight: bold">Thread</span> <span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">pooled</span><span style="color: #666666">)</span><span style="color: #BA2121">") </span>
<span style="color: #BA2121"> "</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000b9f83</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100c4b</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">267</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e4851</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000013015f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span>
<span style="border: 1px solid #FF0000">"</span>
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">...</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"><span style="color: #BA2121">" </span>
<span style="color: #BA2121">KGlobal::ref()= 269 called from background thread QThread(0x11c1b3660, name = "</span><span style="color: #008000; font-weight: bold">Thread</span> <span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">pooled</span><span style="color: #666666">)</span><span style="color: #BA2121">") </span>
<span style="color: #BA2121"> "</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000b9f83</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100c4b</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">267</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e4851</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000013015f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span>
<span style="color: #BA2121">" </span>
<span style="color: #BA2121">KGlobal::ref()= 270 called from background thread QThread(0x11c1b3660, name = "</span><span style="color: #008000; font-weight: bold">Thread</span> <span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">pooled</span><span style="color: #666666">)</span><span style="color: #BA2121">") </span>
<span style="color: #BA2121"> "</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000b9f83</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100c4b</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">267</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e4851</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000013015f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span>
<span style="color: #BA2121">" </span>
<span style="color: #BA2121">KGlobal::ref()= 271 called from background thread QThread(0x13ebfb7b0, name = "</span><span style="color: #008000; font-weight: bold">Thread</span> <span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">pooled</span><span style="color: #666666">)</span><span style="color: #BA2121">") </span>
<span style="color: #BA2121"> "</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000b9f83</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100c4b</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">267</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e4851</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000013015f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span>
<span style="color: #BA2121">" </span>
<span style="color: #BA2121">KGlobal::ref()= 273 called from background thread QThread(0x13ebfb7b0, name = "</span><span style="color: #008000; font-weight: bold">Thread</span> <span style="color: #666666">(</span><span style="color: #008000; font-weight: bold">pooled</span><span style="color: #666666">)</span><span style="color: #BA2121">") </span>
<span style="color: #BA2121"> "</span><span style="color: #BC7A00">[</span>
<span style="color: #666666">0</span>: <span style="color: #666666">0</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000b9f83</span> _Z14kRealBacktracei <span style="color: #666666">+</span> <span style="color: #666666">67</span>
<span style="color: #666666">1</span>: <span style="color: #666666">1</span> libkdecore.5.dylib <span style="color: #666666">0x0000000100100c4b</span> _ZN7KGlobal3refEv <span style="color: #666666">+</span> <span style="color: #666666">267</span>
<span style="color: #666666">2</span>: <span style="color: #666666">2</span> libkdecore.5.dylib <span style="color: #666666">0x00000001000e4851</span> _ZN4KJobC2EP7QObject <span style="color: #666666">+</span> <span style="color: #666666">65</span>
<span style="color: #666666">3</span>: <span style="color: #666666">3</span> kdevcmakemanager.so <span style="color: #666666">0x000000013015f3af</span> _ZN21CMakeCommitChangesJobC1ERKN8KDevelop4PathEP12CMakeManagerPNS0_8IProjectE <span style="color: #666666">+</span> <span style="color: #666666">31</span>
<span style="color: #BC7A00">]</span>
<span style="border: 1px solid #FF0000">"</span>
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">(pity so few people set thread names, or use setObjectName...)</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I'd say we have at least 2 threads running a cmake manager, and each thread <em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">increase</em> the refcounter repeatedly (and in rather fast succession), but for now I haven't found a single <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">deref</code> that's not done off the main thread. Yet it has been called as can be seen above.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Seems there's nothing in this scenario preventing a background thread to <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">ref()</code> while the main thread tries to <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">deref</code>.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I'll leave it to one of you guys to try this under Linux where the backtrace will maybe contain a bit more useful information.</p></pre>
<br />
<p>- René J.V.</p>
<br />
<p>On November 16th, 2014, 4:53 p.m. CET, René J.V. Bertin wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for KDE Software on Mac OS X and kdelibs.</div>
<div>By René J.V. Bertin.</div>
<p style="color: grey;"><i>Updated Nov. 16, 2014, 4:53 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kdelibs
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I have been experiencing unexpected exits from KDevelop that were not due to any kind of error in the KDevelop code; it was as if someone told the application to exit normally. This happens mostly on OS X, but also sometimes on Linux.
I finally traced this to <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">KGlobal::deref</code> reaching a zero reference count and invoking <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">QCoreApplication::quit</code> when called from one of KDevelop's KJob dtors. There does not appear to be a reference counting mismatch in the code, so the issue might be due to a race condition in KGlobal::ref/deref.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This patch introduces thread-safety to KGlobal's reference counting by turning the simple global <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">static int s_refCount</code> into a <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">static QAtomicInt s_refCount</code>. I consider this an important bug fix regardless of whether it corrects the issue I have with KDevelop.</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">On OS X 10.6.8 only for now.</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>kdecore/kernel/kglobal.cpp <span style="color: grey">(cf003a4)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/121134/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>