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

IconExtract example fails to extract icon ~50% of the time in --shell mode

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • 5.6.1, 5.8.0, 5.9.0
    • None
    • Windows 10 Pro x64, Qt5.9/5.8/5.6.1, MSVC2015_64

    Description

      The IconExtractor example from WinExtras suffers from inconsistent results. About 50% of the time (20 runs gave 10 successful and 10 fail runs with no apparent success pattern), the 

       

      const HRESULT hr = SHGetFileInfo(sourceFileC, 0, &info, sizeof(SHFILEINFO), flags);
      

      call seems to fail. Switching Qt versions, debug/release builds, or the choice of the file selected does not seem to affect this. A failed run for

       

      iconextractor.exe --shell "C:\Program Files\7-Zip\7zfm.exe" 
      

      gives:

      SHGetFileInfo() failed for "C:\Program Files\7-Zip\7zfm.exe", 0x5111 (_shell_s_): Unknown error 0xA94B0B00
      SHGetFileInfo() failed for "C:\Program Files\7-Zip\7zfm.exe", 0x5110 (_shell_l_): Unknown error 0xA94B0DA0
      SHGetFileInfo() failed for "C:\Program Files\7-Zip\7zfm.exe", 0x5114 (_shell_sh_): Unknown error 0xA94B0DA0
      SHGetFileInfo() failed for "C:\Program Files\7-Zip\7zfm.exe", 0x5113 (_shell_open_s_): Unknown error 0xA94B0B00
      SHGetFileInfo() failed for "C:\Program Files\7-Zip\7zfm.exe", 0x5112 (_shell_open_l_): Unknown error 0xA94B0DA0
      SHGetFileInfo() failed for "C:\Program Files\7-Zip\7zfm.exe", 0x5116 (_shell_open_sh_): Unknown error 0xA94B0DA0
      SHGetFileInfo() failed for "C:\Program Files\7-Zip\7zfm.exe", 0x15111 (_shell_sel_s_): Unknown error 0xA94B0B00
      SHGetFileInfo() failed for "C:\Program Files\7-Zip\7zfm.exe", 0x15110 (_shell_sel_l_): Unknown error 0xA94B0DA0
      SHGetFileInfo() failed for "C:\Program Files\7-Zip\7zfm.exe", 0x15114 (_shell_sel_sh_): Unknown error 0xA94B0DA0
      Wrote C:\Qt\Examples\Qt-5.9\build-winextras-Desktop_Qt_5_9_0_MSVC2015_64bit2-Debug\iconextractor\7zfm_shell_xl_48x48.png.
      Wrote C:\Qt\Examples\Qt-5.9\build-winextras-Desktop_Qt_5_9_0_MSVC2015_64bit2-Debug\iconextractor\7zfm_shell_jumbo_48x48.png.
      Wrote C:\Qt\Examples\Qt-5.9\build-winextras-Desktop_Qt_5_9_0_MSVC2015_64bit2-Debug\iconextractor\7zfm_shell_open_xl_48x48.png.
      Wrote C:\Qt\Examples\Qt-5.9\build-winextras-Desktop_Qt_5_9_0_MSVC2015_64bit2-Debug\iconextractor\7zfm_shell_open_jumbo_48x48.png.
      Wrote C:\Qt\Examples\Qt-5.9\build-winextras-Desktop_Qt_5_9_0_MSVC2015_64bit2-Debug\iconextractor\7zfm_shell_sel_xl_48x48.png.
      Wrote C:\Qt\Examples\Qt-5.9\build-winextras-Desktop_Qt_5_9_0_MSVC2015_64bit2-Debug\iconextractor\7zfm_shell_sel_jumbo_48x48.png.
      
      

      ... while a successful run gives

      Obtained icon #157 (16x16) for 0x5111
      Obtained icon #157 (32x32) for 0x5110
      Obtained icon #157 (32x32) for 0x5114
      Obtained icon #157 (16x16) for 0x5113
      Obtained icon #157 (32x32) for 0x5112
      Obtained icon #157 (32x32) for 0x5116
      Obtained icon #157 (16x16) for 0x15111
      Obtained icon #157 (32x32) for 0x15110
      Obtained icon #157 (32x32) for 0x15114
      Wrote C:\Qt\Examples\Qt-5.9\build-winextras-Desktop_Qt_5_9_0_MSVC2015_64bit2-Debug\iconextractor\7zfm_shell_s_16x16.png.
      Wrote C:\Qt\Examples\Qt-5.9\build-winextras-Desktop_Qt_5_9_0_MSVC2015_64bit2-Debug\iconextractor\7zfm_shell_l_32x32.png.
      Wrote C:\Qt\Examples\Qt-5.9\build-winextras-Desktop_Qt_5_9_0_MSVC2015_64bit2-Debug\iconextractor\7zfm_shell_sh_32x32.png.
      Wrote C:\Qt\Examples\Qt-5.9\build-winextras-Desktop_Qt_5_9_0_MSVC2015_64bit2-Debug\iconextractor\7zfm_shell_xl_48x48.png.
      Wrote C:\Qt\Examples\Qt-5.9\build-winextras-Desktop_Qt_5_9_0_MSVC2015_64bit2-Debug\iconextractor\7zfm_shell_jumbo_48x48.png.
      Wrote C:\Qt\Examples\Qt-5.9\build-winextras-Desktop_Qt_5_9_0_MSVC2015_64bit2-Debug\iconextractor\7zfm_shell_open_s_16x16.png.
      Wrote C:\Qt\Examples\Qt-5.9\build-winextras-Desktop_Qt_5_9_0_MSVC2015_64bit2-Debug\iconextractor\7zfm_shell_open_l_32x32.png.
      Wrote C:\Qt\Examples\Qt-5.9\build-winextras-Desktop_Qt_5_9_0_MSVC2015_64bit2-Debug\iconextractor\7zfm_shell_open_sh_32x32.png.
      Wrote C:\Qt\Examples\Qt-5.9\build-winextras-Desktop_Qt_5_9_0_MSVC2015_64bit2-Debug\iconextractor\7zfm_shell_open_xl_48x48.png.
      Wrote C:\Qt\Examples\Qt-5.9\build-winextras-Desktop_Qt_5_9_0_MSVC2015_64bit2-Debug\iconextractor\7zfm_shell_open_jumbo_48x48.png.
      Wrote C:\Qt\Examples\Qt-5.9\build-winextras-Desktop_Qt_5_9_0_MSVC2015_64bit2-Debug\iconextractor\7zfm_shell_sel_s_16x16.png.
      Wrote C:\Qt\Examples\Qt-5.9\build-winextras-Desktop_Qt_5_9_0_MSVC2015_64bit2-Debug\iconextractor\7zfm_shell_sel_l_32x32.png.
      Wrote C:\Qt\Examples\Qt-5.9\build-winextras-Desktop_Qt_5_9_0_MSVC2015_64bit2-Debug\iconextractor\7zfm_shell_sel_sh_32x32.png.
      Wrote C:\Qt\Examples\Qt-5.9\build-winextras-Desktop_Qt_5_9_0_MSVC2015_64bit2-Debug\iconextractor\7zfm_shell_sel_xl_48x48.png.
      Wrote C:\Qt\Examples\Qt-5.9\build-winextras-Desktop_Qt_5_9_0_MSVC2015_64bit2-Debug\iconextractor\7zfm_shell_sel_jumbo_48x48.png.

       

      Attachments

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

        Activity

          People

            docteam Qt Documentation Team
            achipa Attila Csipa
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes