Kaydet (Commit) f054b918 authored tarafından Mike Kaganski's avatar Mike Kaganski

tdf#38915: don't wait on message queue if application already has quit.

Despite precautions in Application::Execute() and ImplYield(),
in my testing I sometimes see that soffice is waiting in
ImplSalYield()'s GetMessageW() when ImplGetSVData()->maAppData.mbAppQuit
is true, so that soffice.bin hangs in the background. I suspect
that this is related to the bug. Some obscure code path seems to
be able to get here after the flag is already set.

So, test also in ImplSalYield() right before GetMessageW() to
make sure. Another possibility is that we get here when the flag
is not set yet, and gets set while already waiting, but that would
mean this happens in a different thread.

Change-Id: Idb19eabcca8b5c24eac0ca76950edc1bf1e5bccb
Reviewed-on: https://gerrit.libreoffice.org/39996Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
Tested-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst 522d2117
......@@ -580,7 +580,8 @@ ImplSalYield( bool bWait, bool bHandleAllCurrentEvents )
bOneEvent = false;
} while( --nMaxEvents && bOneEvent );
if ( bWait && ! bWasMsg )
// Also check that we don't wait when application already has quit
if ( bWait && !bWasMsg && !ImplGetSVData()->maAppData.mbAppQuit )
{
if ( GetMessageW( &aMsg, nullptr, 0, 0 ) )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment