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.16k stars 39 forks source link

Steam not visible and "..." button crashes app on first run #370

Closed arcanon closed 2 months ago

arcanon commented 2 months ago

Please fill out following when reporting a new bug:

Describe the bug
./ProtonUp-Qt-2.9.1-x86_64.AppImage ProtonUp-Qt 2.9.1 by DavidoTek. Build Info: Official AppImage by DavidoTek. Python 3.8.2 (default, Mar 13 2020, 10:14:16) [GCC 9.3.0], PySide 6.2.4 Platform: Ubuntu 22.04 Linux-6.5.0-14-generic-x86_64-with-glibc2.29 Gtk-Message: 14:41:27.549: Failed to load module "canberra-gtk-module" Gtk-Message: 14:41:27.556: Failed to load module "canberra-gtk-module" Loading locale en / en_US Loaded ctmod GE-Proton Loaded ctmod Wine-GE Loaded ctmod Boxtron Loaded ctmod D8VK (nightly) Loaded ctmod Kron4ek Wine-Builds Vanilla Loaded ctmod Lutris-Wine Loaded ctmod Luxtorpeda Loaded ctmod Northstar Proton (Titanfall 2) Loaded ctmod Proton Tkg Loaded ctmod Proton Tkg (Wine Master) Loaded ctmod Roberta Loaded ctmod Steam-Play-None Loaded ctmod SteamTinkerLaunch Loaded ctmod SteamTinkerLaunch-git Loaded ctmod vkd3d-lutris Loaded ctmod vkd3d-proton Loaded ctmod Wine Tkg (Valve Wine) Loaded ctmod Wine Tkg (Vanilla Wine) Loaded ctmod DXVK Loaded ctmod DXVK Async Loaded ctmod DXVK (nightly) qt.pysideplugin: Environment variable PYSIDE_DESIGNER_PLUGINS is not set, bailing out. qt.pysideplugin: No instance of QPyDesignerCustomWidgetCollection was found. Gamepad error: No gamepad found. qt.pysideplugin: No instance of QPyDesignerCustomWidgetCollection was found. Traceback (most recent call last): File "/tmp/.mount_ProtonIvo955/usr/lib/python3.8/site-packages/pupgui2/pupgui2.py", line 381, in btn_manage_install_locations_clicked customid_dialog = PupguiCustomInstallDirectoryDialog(install_directory(), parent=self.ui) File "/tmp/.mount_ProtonIvo955/usr/lib/python3.8/site-packages/pupgui2/pupgui2customiddialog.py", line 32, in init self.setup_ui() File "/tmp/.mount_ProtonIvo955/usr/lib/python3.8/site-packages/pupgui2/pupgui2customiddialog.py", line 53, in setup_ui self.set_selected_launcher(self.install_locations_dict[self.launcher] or 'steam') # Default combobox selection to "Steam" if unknown launcher for some reason KeyError: ''

sonic2kk commented 2 months ago

Can't reproduce with Flatpak or AppImage v2.9.1, or running from source @ 6cf1def3bf1ee9775b2639ed41aad1ff96ae2afa.

Steam not being visible likely means that ProtonUp-Qt cannot find your Steam installation. Where is Steam installed on your PC?

I think the KeyError: '' is coming from Steam not being found when you try to add a custom install directory, and thus causing a crash. I haven't confirmed this, though.

sonic2kk commented 2 months ago

Confirmed that if no valid launchers are found, trying to open the Custom Install Directory dialog results in a crash.

The KeyError is coming from self.launcher being blank, and we're attempting to use this as a key to access the launcher to select by default. When you open the Custom Install Dialog with Steam selected it will default the selection to Steam, if Lutris is selected it will select Lutris, and so on, as a bit of context-aware behaviour.

It is supposed to fall back to 'steam' if the launcher is unknown, but the logic we use to do this doesn't work. It seems like if you try to do dictionary[key] or alternative_value, Python will not gracefully handle keys that do not exist. This is unlike an inline if. For example:

I have a fix in mind that will update this check to be like the working example above (this appears to be where the crash happens):

https://github.com/DavidoTek/ProtonUp-Qt/blob/7ef58ff9d03ac63db0c0ff74c737f7497996b0eb/pupgui2/pupgui2customiddialog.py#L53


Provided the above fix can work, this will not resolve the issue of Steam not being found for you. It would be good to know where Steam is installed. Does it match any of these locations? These are where ProtonUp-Qt checks:

sonic2kk commented 2 months ago

The crash should be fixed in v2.9.2 (only available as AppImage right now), although still not sure why ProtonUp-Qt couldn't find Steam.

arcanon commented 2 months ago

steam was not installed yet, that was my bad.