Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-19117

"Open with..." shows wrong icon for files not present

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • 0.4.15
    • Shell
    • None

    Description

      reactos-bootcd-0.4.15-dev-6439-g8532f18-x86-gcc-lin-dbg

      • Shortcut properties >"Open with..."
      • Add a new exe to the list (nimbusnote.exe in my video)
      • Well displayed

      • Cancel
      • Rename the exe file to something else
      • Re-open "Open with..."
      • File still listed while no longer exists and wrong icon used

      Note this is systematic on LiveCD, without any pre-requisite action :

      Video : ROS-screen0.webm

      Root cause : https://git.reactos.org/?p=reactos.git;a=blob;f=dll/win32/shell32/COpenWithMenu.cpp#l864 does not handle the case where m_pAppList->GetName(pApp) fails due to : https://git.reactos.org/?p=reactos.git;a=blob;f=dll/win32/shell32/COpenWithMenu.cpp#l216 

      Log shows : 

      (dll/win32/kernel32/client/loader.c:386) LoadLibraryExW(C:\Documents and Settings\Administrator\Bureau\nimbusnote.exe) failing with status c000000f
      err:(dll/win32/shell32/COpenWithMenu.cpp:332) GetFileVersionInfoSizeW C:\Documents and Settings\Administrator\Bureau\nimbusnote.exe failed: 2 

      Expected fix : Check ExtractIconExW return value in order to manage failed load icon : openwith.patch

      Note : In order to load the "default" icon, LoadIconW(shell32_hInstance, MAKEINTRESOURCEW(IDI_SHELL_DOCUMENT)); could be used rather than ExtractIconExW(L"shell32.dll", 0, NULL, &pApp->hIcon, 1) for the sake of not hardcoding shell32.dll.

      On top : do not display missing applications : https://github.com/reactos/reactos/pull/5587

      Patch result : 

       

      Attachments

        Issue Links

          Activity

            People

              whindsaks whindsaks
              KRosUser KRosUser
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: