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

RAPPS : wrong icons used for uninstalled programs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 0.4.15
    • Applications
    • None

    Description

      reactos-bootcd-0.4.15-dev-6846-gb3c1f65-x86-gcc-lin-dbg

      • Install Filezilla, K-Meleon, Firefox 48
      • Uninstall FF 48 from RAPPS interface
      • Refresh (F5)
      • Firefox 48 is still listed (while no longer prensent) and wrong icon is used
      • Same behavior when "renaming" or "removing" the file where the icon is supposed to be extracted then launching RAPPS (see below due to wrong assumption on ExtractIconW returned value on missing files)

      and when "last" element is uninstalled, a "blank" icon is displayed while default icon (IDI_MAIN) is expected : https://git.reactos.org/?p=reactos.git;a=blob;f=base/applications/rapps/appview.cpp;hb=fa4b38d902d13072b7b982a4411a31cb84ab24b3#l1305 

      Faulty code : https://git.reactos.org/?p=reactos.git;a=blob;f=base/applications/rapps/appview.cpp;hb=fa4b38d902d13072b7b982a4411a31cb84ab24b3#l1292 from learn_more in https://github.com/reactos/reactos/commit/33c2903e6d4fda32215f553c2189c13d52ed31de 

      err:(win32ss/user/user32/windows/cursoricon.c:1906) GetIconInfo failed. 

      ExtractIconW does not return NULL on non-existing file. See MSDN

      The return value is a handle to an icon. If the file specified was not an executable file, DLL, or icon file, the return is 1. If no icons were found in the file, the return value is NULL. 

      Local fix by patch : rapps.patchsee below, current default icon when Armagetron main file is not present

      This patch checks for existence with GetFileAttributesW. One alternative could be to compare (!hIcon || (hIcon == 1)) as a condition to switch to default icon

      Better patch : rapps_v2.patch

       

      Attachments

        1. image-2023-11-05-18-56-13-290.png
          image-2023-11-05-18-56-13-290.png
          52 kB
        2. image-2023-11-05-20-06-58-988.png
          image-2023-11-05-20-06-58-988.png
          41 kB
        3. image-2023-11-05-21-07-54-595.png
          image-2023-11-05-21-07-54-595.png
          42 kB
        4. putty.log
          49 kB
        5. rapps_v2.patch
          0.7 kB
        6. rapps.patch
          0.8 kB

        Activity

          People

            katayama_hirofumi_mz Katayama Hirofumi MZ
            KRosUser KRosUser
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: