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

Sporadic crash on QPMCache::flushDetachedPixmaps

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P1: Critical
    • None
    • 6.2.1
    • GUI: Painting
    • None
    • Windows 10, MSVC 2019
    • All

    Description

      Sporadic crash on QPMCache::flushDetachedPixmaps call.

      
      Exception thrown: read access violation.
      **QPMCache::get**(...) returned nullptr.
      
      
       	Qt6Guid.dll!qHash(const QPixmapCache::Key & k, unsigned __int64 seed) Line 258	C++
       	Qt6Guid.dll!QHashPrivate::calculateHash<QPixmapCache::Key>(const QPixmapCache::Key & t, unsigned __int64 seed) Line 103	C++
       	Qt6Guid.dll!QHashPrivate::Data<QCache<QPixmapCache::Key,QPixmapCacheEntry>::Node>::find(const QPixmapCache::Key & key) Line 592	C++
       	Qt6Guid.dll!QCache<QPixmapCache::Key,QPixmapCacheEntry>::unlink(QCache<QPixmapCache::Key,QPixmapCacheEntry>::Node * n) Line 159	C++
       	Qt6Guid.dll!QCache<QPixmapCache::Key,QPixmapCacheEntry>::trim(__int64 m) Line 187	C++
       	Qt6Guid.dll!QCache<QPixmapCache::Key,QPixmapCacheEntry>::setMaxCost(__int64 m) Line 211	C++
      >	Qt6Guid.dll!QPMCache::flushDetachedPixmaps(bool nt) Line 291	C++
       	Qt6Guid.dll!QPMCache::timerEvent(QTimerEvent * __formal) Line 312	C++
       	Qt6Cored.dll!QObject::event(QEvent * e) Line 1343	C++
       	Qt6Widgetsd.dll!QApplicationPrivate::notify_helper(QObject * receiver, QEvent * e) Line 3405	C++
       	Qt6Widgetsd.dll!QApplication::notify(QObject * receiver, QEvent * e) Line 2764	C++
       	Qt6Cored.dll!QCoreApplication::notifyInternal2(QObject * receiver, QEvent * event) Line 1063	C++
       	Qt6Cored.dll!QCoreApplication::sendEvent(QObject * receiver, QEvent * event) Line 1472	C++
       	Qt6Cored.dll!QEventDispatcherWin32Private::sendTimerEvent(int timerId) Line 407	C++
       	Qt6Cored.dll!qt_internal_proc(HWND__ * hwnd, unsigned int message, unsigned __int64 wp, __int64 lp) Line 231	C++
       	[External Code]	
       	Qt6Cored.dll!QEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags) Line 543	C++
       	Qt6Guid.dll!QWindowsGuiEventDispatcher::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags) Line 72	C++
       	Qt6Cored.dll!QEventLoop::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags) Line 140	C++
       	Qt6Cored.dll!QEventLoop::exec(QFlags<enum QEventLoop::ProcessEventsFlag> flags) Line 230	C++
       	Qt6Cored.dll!QCoreApplication::exec() Line 1378	C++
       	Qt6Guid.dll!QGuiApplication::exec() Line 1861	C++
       	Qt6Widgetsd.dll!QApplication::exec() Line 2615	C++
      

      It crashes when trying to calculate qHash() for null value (QPixmapCache::Key).

      Take a look on debugger screenshot below.

      Unfortunately I have now exact steps or examples,

      but it seems that adding trivial check on null value in qHash(QPixmapCache::Key) may fix the issue.

      I got this crash on Windows 10. But probably it's relevant for all platforms.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              vhilshei Volker Hilsheimer
              studiosus Vladimir Belyavsky
              Votes:
              7 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes