DavidoTek / ProtonUp-Qt

Install and manage GE-Proton, Luxtorpeda & more for Steam and Wine-GE & more for Lutris with this graphical user interface.
https://davidotek.github.io/protonup-qt
GNU General Public License v3.0
1.17k stars 39 forks source link

Deleted-corrupted userdata/0/config/shortcuts.vdf makes shortcut names appear as blank #278

Closed redirectto closed 10 months ago

redirectto commented 10 months ago

Describe the bug
ProtonUp-Qt gamelist showed a lot of shortcuts I had already removed from steam. After some tweaking it only shows steam games names, non-steam games appear as blank.

To Reproduce
Steps to reproduce the behavior:

  1. I modified /home/deck/.local/share/Steam/userdata/0/config/shortcuts.vdf to remove the unnecessary shortcuts
  2. I probably did it wrong and did not make any backup of the original file.
  3. Either modify shortcuts.vdf to a corrupted state or delete the file.
  4. Check game list.

6ex. I tried to copy the same file from userdata//config but it doesn't work 7ex. I also tried recreating the file from scratch but I don't know how to do that properly.

Expected behavior
I expected to fix the first issue by removing the unnecessary games since steam and other apps load the shortcuts from /home/deck/.local/share/Steam/userdata//config/shortcuts.vdf but now the games either don't appear or have blank names.

Screenshots
https://i.imgur.com/L6IF1ZD.png

Desktop (please complete the following information):

Terminal output
This output appear in an infinite loop

QCoreApplication::postEvent: Unexpected null receiver
sonic2kk commented 10 months ago

It looks like the image you posted is unavailable. You can attach screenshots directly to GitHub posts though :-)

I modified /home/deck/.local/share/Steam/userdata/0/config/shortcuts.vdf to remove the unnecessary shortcuts

Note that this is a binary VDF format and is different to other VDF files such as config.vdf, which is essentially a plain-text format. I'm not sure how you edited it (doing it in a text editor will probably lead to corruption), but if you used a hex editor/maybe some VDF parser that can modify the file, that's no worries.

For your own future endeavours, it is probably best to remove shortcuts by either deleting the shortcuts from Steam by hand, or by deleting the shortcuts.vdf file (the nuclear option :sweat_smile:). For manual deletion, there is a category for shortcuts, and you can also select and remove multiple entries from Desktop Mode on Steam Deck/Steam Big Picture.

After some tweaking it only shows steam games names, non-steam games appear as blank.

So this is the core of the problem if I'm understanding. You modified the shortcuts.vdf file, and now the shortcuts are showing up blank.

This is probably a result of the VDF file being corrupted and the VDF library is unable to read the file names correctly. Probably the best approach is to hide loaded shortcuts whose names are blank.

I expected to fix the first issue by removing the unnecessary games since steam and other apps load the shortcuts from /home/deck/.local/share/Steam/userdata//config/shortcuts.vdf but now the games either don't appear or have blank names.

This is also where ProtonUp-Qt loads the shortcuts from, and it uses a library to parse the file. Since the file has been manually edited, I think it is fair to discard entries that can't be read properly (i.e. with a blank name).


The action item here for ProtonUp-Qt is to perhaps not parse Steam apps in general whose names are blank (not len(SteamApp.app_name.strip) perhaps?).

redirectto commented 10 months ago

I don't know why but imgur seems not to work properly. Here is the screenshot. L6IF1ZD So I guess I should remove both shortcuts.vdf files and create every single shortcut from scratch that way proton up qt will detect the games properly, that will hurt since I will also need to delete and recreate shadercaches and compatdata. If I want to edit the vdf files, I should use a hex editor or a text editor such as notepad++ but being careful with the special characters.

DavidoTek commented 10 months ago

So I guess I should remove both shortcuts.vdf [...] that will hurt [...]

I guess It should be possible to fix the corrupted file, but that's quite a complex task.

I should use a hex editor or a text editor such as notepad++

I'm working on something if you want to edit the shortcuts in the future. I hope I'll get this finished soon ;)

grafik

redirectto commented 10 months ago

I just deleted both shortcuts.vdf files and re added an app (citra emulator) but it still shows no name inside Protonupqt. Screenshot_20230819_153857 Maybe it has something to do with /home/deck/.local/share/Steam/config/config.vdf

sonic2kk commented 10 months ago

May be related to #275, which should be included in ProtonUp-Qt 2.8.2 (#276). This is not available as a Flatpak just yet (flathub/net.davidotek.pupgui2#21).

My shortcuts.vdf does not have the casing issue that #275 fixes, on my Linux Desktop or Steam Deck, so I can't reproduce the problem to confirm myself.

sonic2kk commented 10 months ago

ProtonUp-Qt v2.8.2 was released as Flatpak and should be available from Flathub shortly.

@redirectto Once ProtonUp-Qt v2.8.2 is available to you, please re-test and see if your issue is resolved. Fingers crossed!

redirectto commented 10 months ago

Hooray! now it's fixed and works as intended Screenshot_20230820_005744 Thank you guys