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

Windows: Sporadic crash in QFileIconProvider

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Incomplete
    • Affects Version/s: 5.3.1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Windows 7 32 bit, MSVC 2008

      Description

      QFileIconProvider crashes sporadically while trying to retrieve a file icon via its icon() method. This happens within GUI thread.

      Crash location is pixmapFromShellImageList function in qtbase\src\plugins\platforms\windows\qwindowstheme.cpp file, line with result = qt_pixmapFromWinHICON(hIcon):

      static QPixmap pixmapFromShellImageList(int iImageList, const SHFILEINFO &info)
      {
          QPixmap result;
      #ifdef USE_IIMAGELIST
          // For MinGW:
          static const IID iID_IImageList = {0x46eb5926, 0x582e, 0x4017, {0x9f, 0xdf, 0xe8, 0x99, 0x8d, 0xaa, 0x9, 0x50}};
      
          if (!QWindowsContext::shell32dll.sHGetImageList)
              return result;
          if (iImageList == sHIL_JUMBO && QSysInfo::WindowsVersion < QSysInfo::WV_VISTA)
              return result;
      
          IImageList *imageList = 0;
          HRESULT hr = QWindowsContext::shell32dll.sHGetImageList(iImageList, iID_IImageList, (void **)&imageList);
          if (hr != S_OK)
              return result;
          HICON hIcon;
          hr = imageList->GetIcon(info.iIcon, ILD_TRANSPARENT, &hIcon);
          if (hr == S_OK) {
      {color:red}
              result = qt_pixmapFromWinHICON(hIcon);  // HERE CRASHED
      {color}
              DestroyIcon(hIcon);
          }
          imageList->Release();
      #else
          Q_UNUSED(iImageList)
          Q_UNUSED(info)
      #endif // USE_IIMAGELIST
          return result;
      }
      

      Here is stack trace:

      Qt5Guid.dll!02fa5d00()
      [Unten angegebene Rahmen sind möglicherweise nicht korrekt und/oder fehlen, keine Symbole geladen für Qt5Guid.dll]
      qwindowsd.dll!pixmapFromShellImageList(int iImageList=4, const _SHFILEINFOW & info=

      Unknown macro: {...}

      ) Zeile 658 + 0xe Bytes C++
      qwindowsd.dll!QWindowsTheme::fileIconPixmap(const QFileInfo & fileInfo=private=

      Unknown macro: {d=0x0a42f8e0 }

      , const QSizeF & size=

      , QFlags<enum QPlatformTheme::IconOption> iconOptions=

      Unknown macro: {...}

      ) Zeile 742 + 0x17 Bytes C++
      Qt5Widgetsd.dll!652e5923()
      Qt5Widgetsd.dll!652e5ae4()
      Qt5Cored.dll!66cf6ba7()

        Attachments

        1. qtbug47535_diag.diff
          2 kB
        2. qtbug47535.zip
          1 kB

          Issue Links

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

            Activity

              People

              • Assignee:
                kleint Friedemann Kleint
                Reporter:
                amasiuk Ars Masiuk
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes