summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread
diff options
context:
space:
mode:
authormread <qt-info@nokia.com>2011-06-15 13:18:08 (GMT)
committermread <qt-info@nokia.com>2011-06-15 13:29:18 (GMT)
commit49fd95009bc3df7f2da46524245c51dd17ea1907 (patch)
tree96ca214c60bc62260db5f3f2ab9354cbd72dc1ab /src/corelib/thread
parentea0963bde7fb9f1486dd157f43955a11024d3e7d (diff)
downloadQt-49fd95009bc3df7f2da46524245c51dd17ea1907.zip
Qt-49fd95009bc3df7f2da46524245c51dd17ea1907.tar.gz
Qt-49fd95009bc3df7f2da46524245c51dd17ea1907.tar.bz2
QTBUG-19883 Adding top level TRAP for QThreads on Symbian
The native Symbian implementation of QThread in Qt4.8 does not have a top level TRAP, whereas it did in pthreads based implementation in Qt4.7. This causes an incompatibility in the form of a EUSER-CBASE:66 panic for code that attempts to use the cleanup stack without a TRAP of its own. This adds a top level TRAP and std::exception handler to match it and prints out warning information if they ever trigger to provide some diagnostic information which would otherwise be lost. Task-number: QTBUG-19883 Reviewed-by: Laszlo Agocs
Diffstat (limited to 'src/corelib/thread')
-rw-r--r--src/corelib/thread/qthread_symbian.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/corelib/thread/qthread_symbian.cpp b/src/corelib/thread/qthread_symbian.cpp
index c515ae6..46339a6 100644
--- a/src/corelib/thread/qthread_symbian.cpp
+++ b/src/corelib/thread/qthread_symbian.cpp
@@ -335,7 +335,15 @@ void *QThreadPrivate::start(void *arg)
createEventDispatcher(data);
emit thr->started();
- thr->run();
+ TRAPD(err, {
+ try {
+ thr->run();
+ } catch (const std::exception& ex) {
+ qWarning("QThreadPrivate::start: Thread exited on exception %s", ex.what());
+ }
+ });
+ if (err)
+ qWarning("QThreadPrivate::start: Thread exited on leave %d", err);
QThreadPrivate::finish(arg);