Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-9565

Symbian FBSClient panic on exit symbian apps

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 4.6.3
    • 4.6.3
    • None
    • Symbian ^3 + latest Qt public
    • 4c425feb08cd4aad31a99e92fec3fbbde0349d95 , 383c336be79c9757a51427f06aa68df0b4849e31

    Description

      We have found that running a Qt application using QtWebkit on symbian crashes on exit with a FBSClient panic.

      The root cause of this panic seems to be CFonts that still have references in the S60 font database implementation. In webkit there are lots of statics which do not get deleted until the process dies (or not deleted at all), this causes font handles to be leaked and panics when the Symbian Eikon environment is destroyed.

      There is a workaround to forcefully flush all font data in the following function:

      void QFontCache::cleanup()
      {
      QFontCache::instance()->clear(); // Call clear here will deref all left over handles
      QThreadStorage<QFontCache *> *cache = 0;
      QT_TRY

      { cache = theFontCache(); }

      QT_CATCH (const std::bad_alloc &)

      { // no cache - just ignore }

      if (cache && cache->hasLocalData())
      cache->setLocalData(0);
      }

      Adding "QFontCache::instance()->clear();" flushes the font database and releases all handles so that it passes the environment shutdown tests.
      I will try to provide more information on where the font data is leaked in webkit, but it seems to be necessary to flush the DB as we cannot clear static datas.

      Attachments

        Activity

          People

            e0150566 Janne Koskinen
            david.leong@nokia.com David Leong
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: