<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Il 16/02/2016 10:04, Michael Schnell ha
scritto:<br>
</div>
<blockquote cite="mid:56C2E615.5050605@lumino.de" type="cite">a
(potential) bug (in "Glib2" whatever this exactly means)</blockquote>
<br>
Glib2 means version 2 of GTK Glib, which is used by Qt (and by GTK)
to implement the main event loop.<br>
libglib-2.0.so.0<br>
<br>
The full picture (from stack trace) is as follows:<br>
<br>
<ol>
<li>The main loop of Lazarus (under Qt WS) calls AppWaitMessage in
qtobject.inc </li>
<li>qtobject calls QCoreApplication::processEvents in
qcoreapplication_c.cpp</li>
<li>qcoreapplication_c.cpp calls QEventDispatcherGlib in
libQtGui.so.4</li>
<li>QEventDispatcherGlib calls g_main_context_iteration in
libglib-2.0.s0.0 (the Glib2)</li>
<li>if g_main_context_iteration has pending messages, it calls
g_main_context_dispatch</li>
<li>g_main_context_dispatch calls
QCoreApplicationPrivate::sendPostedEvents<br>
</li>
</ol>
When the user code calls Application.ProcessMessages the same
sequence occurs:<br>
AppProcessMessages in QtObjects.inc is called, which then calls
QCoreApplication::processEvents, and all the steps from 2 on are
identical.<br>
<br>
My feeling is that the bug is sort of this: if the call to
Application.ProcessMessages causes a recursion, and a new different
message has arrived in the meantime, g_main_context_iteration()
understands rightly that there is a pending message to dispatch, but
it decides wrongly to dispatch again the old one, instead of the new
one.<br>
</body>
</html>