Fixed a potential live-lock situation: Signals from the QThread can get lost, before we reach the QEventLoop->exec(), even if the required connections already exists. It seems that QApplication::processEvents() will discard signals for our QEventLoop, if that QEventLoop is not running yet! Without the QApplication::processEvents(), those signals would simply be enqueued until we call QEventLoop->exec(). In reality this bug was never triggered under normal circumstances, but it seems on some systems it can take longer to perform the "fade in" than to finish the initialization thread. In that situation the bug *was* triggered and caused the live-lock...
This commit is contained in:
parent
d92fb7fbcc
commit
3c1938af3c
@ -30,7 +30,7 @@
|
||||
#define VER_LAMEXP_MINOR_LO 4
|
||||
#define VER_LAMEXP_TYPE Beta
|
||||
#define VER_LAMEXP_PATCH 1
|
||||
#define VER_LAMEXP_BUILD 890
|
||||
#define VER_LAMEXP_BUILD 891
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Tool versions (minimum expected versions!)
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <QThread>
|
||||
#include <QMovie>
|
||||
#include <QKeyEvent>
|
||||
#include <QTimer>
|
||||
|
||||
#include "WinSevenTaskbar.h"
|
||||
|
||||
@ -110,7 +111,12 @@ void SplashScreen::showSplash(QThread *thread)
|
||||
}
|
||||
|
||||
//Loop while thread is running
|
||||
loop->exec();
|
||||
while(thread->isRunning())
|
||||
{
|
||||
QTimer::singleShot(15000, loop, SLOT(quit()));
|
||||
loop->exec();
|
||||
if(thread->isRunning()) qWarning("Potential deadlock in Init thread!");
|
||||
}
|
||||
|
||||
//Fade out
|
||||
for(int i = 100; i >= 0; i--)
|
||||
|
Loading…
Reference in New Issue
Block a user