From 55625badfab6bfe49c60ab5cd9a586c6bd511579 Mon Sep 17 00:00:00 2001 From: Oleh Vasyura Date: Wed, 21 Jul 2010 13:48:57 +0300 Subject: Fix crash caused by not clearing the QPixmapCache on application exit. The qt_cleanup() function will call CCoeEnv::DestroyEnvironment() on application shutdown. This destruction will in turn tear down the various server sessions associated with the application. One of these sessions is the FBSERV session and if the QPixmapCache attempts to delete a CFbsBitmap after the session has been destroyed, the app will crash. The solution is call QPixmapCache::cleanup() before we destroy the environment. This is inline with what the other platforms do. Reviewed-by: Jason Barron --- src/gui/kernel/qapplication_s60.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 117c1d5..1c06100 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1460,6 +1460,8 @@ void qt_cleanup() qt_S60Beep = 0; } QFontCache::cleanup(); // Has to happen now, since QFontEngineS60 has FBS handles + QPixmapCache::clear(); // Has to happen now, since QS60PixmapData has FBS handles + qt_cleanup_symbianFontDatabaseExtras(); // S60 structure and window server session are freed in eventdispatcher destructor as they are needed there -- cgit v0.12