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
    • None
    • 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

        1. image-2023-08-12-14-04-06-386.png
          6 kB
          KRosUser
        2. image-2023-08-12-14-05-08-071.png
          7 kB
          KRosUser
        3. image-2023-11-12-16-02-34-491.png
          15 kB
          KRosUser
        4. image-2023-11-12-17-43-03-695.png
          4 kB
          KRosUser
        5. openwith.patch
          1 kB
          KRosUser
        6. ROS-screen0.webm
          765 kB
          KRosUser

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated: