diff options
author | Murray Read <ext-murray.2.read@nokia.com> | 2012-06-13 12:06:53 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-19 08:11:21 (GMT) |
commit | 8ccf7283a1a90d125a774027c6bc3028ab0d29f7 (patch) | |
tree | b0645e8a8f17422c7d744e029c603becefc9faec /src | |
parent | a56ff23fb9e6c33ff97b5b0e8619346797626755 (diff) | |
download | Qt-8ccf7283a1a90d125a774027c6bc3028ab0d29f7.zip Qt-8ccf7283a1a90d125a774027c6bc3028ab0d29f7.tar.gz Qt-8ccf7283a1a90d125a774027c6bc3028ab0d29f7.tar.bz2 |
Avoid crash cancelling timer in wrong thread on terminate
When the Symbian timer active object detects that it is cancelled in the
wrong thread, it was issuing a qFatal. But that was an overreaction, as
the situation is not necessarily fatal if the thread in which the timer
lives is about to die. For example if QThread::terminate is used outside
of the thread targeted. Instead a debug message should be issued so that
if there is a crash, the programmer should get information as to why.
The debug message, in this case, is issued with RDebug::Print to avoid
the use of Qt's message output which itself was crashing in partially
finished thread situations.
Task-number: ou1cimx1#1006699
Change-Id: I7d192eb27ba85ba2ef4f80fec3d8479f0df8f90c
Reviewed-by: Juha Kukkonen <ext-juha.kukkonen@nokia.com>
Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_symbian.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp index f209b7a..a4c113b 100644 --- a/src/corelib/kernel/qeventdispatcher_symbian.cpp +++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp @@ -281,7 +281,7 @@ void QTimerActiveObject::DoCancel() // Cancel requires a signal to continue, we're in the wrong thread to use the RTimer if (m_threadData->symbian_thread_handle.ExitType() == EExitPending) { // owner thread is still running, it will receive a stray event if the timer fires now. - qFatal("QTimerActiveObject cancelled from wrong thread"); + RDebug::Print(_L("QTimerActiveObject cancelled from wrong thread, owner thread will probably panic with stray signal")); } TRequestStatus *status = &iStatus; User::RequestComplete(status, KErrCancel); |