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.27k stars 40 forks source link

Move ctmod message dialogs to main thread to prevent segfault #124

Closed harpaj closed 2 years ago

harpaj commented 2 years ago

Describe the bug
Trying to install SteamTinkerLaunch (I tried version 11.11 and 11.0) crashes ProtonUp, without installing SteamTinkerLaunch. For a split-second an error message is displayed, it took me several attempts to get a screenshot of it. Then ProtonUp crashes (SegFault in terminal).

To Reproduce
Steps to reproduce the behavior:

  1. Install for Steam
  2. Add version -> SteamTinkerLaunch -> Install
  3. Error message is displayed extremely shortly (<1s)
  4. Program crashes

Expected behavior
Program doesn't crash, SteamTinkerLaunch is installed OR: The error message is displayed in a way I can act on it. In any case, ProtonUp shouldn't crash.

Screenshot Screenshot from 2022-09-24 17-25-18

Desktop (please complete the following information):

Terminal output

./ProtonUp-Qt-2.7.4-x86_64.AppImage 
ProtonUp-Qt 2.7.4 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 20.04 Linux-5.15.0-46-generic-x86_64-with-glibc2.29
Gtk-Message: 17:18:51.364: Failed to load module "canberra-gtk-module"
Gtk-Message: 17:18:51.369: Failed to load module "canberra-gtk-module"
Loaded ctmod GE-Proton
Loaded ctmod Wine-GE
Loaded ctmod Boxtron
Loaded ctmod Kron4ek Wine-Builds Vanilla
Loaded ctmod Lutris-Wine
Loaded ctmod Luxtorpeda
Loaded ctmod Proton Tkg
Loaded ctmod Roberta
Loaded ctmod SteamTinkerLaunch
Loaded ctmod SteamTinkerLaunch-git
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.
QBackingStore::endPaint() called with active painter; did you forget to destroy it or call QPainter::end() on it?
Segmentation fault (core dumped)
DavidoTek commented 2 years ago

The segment fault occurs because the message dialog is opened from a different thread, but Qt only allows message dialogs to be opened from the main thread. If the user has all dependencies installed, no message will be displayed and no segfault will occur. This should be fixed though, an "open messagebox" signal from the installer thread to the main thread should be an adequate fix.

sonic2kk commented 2 years ago

Just a heads up: There is a problem on Ubuntu 20.04 (and distros based on it) I believe where Yad (and some other programs) will not work because they rely on a newer version of glibc. Though the crash is a bug, this dependency requirement will likely prevent you from meeting all the dependencies in the first place. Ubuntu 20.04 seems to come with glibc 2.31 but some tools now depend on 2.33 or higher Ubuntu 21.04 and above seem to have a newer version of glibc. See frostworx/steamtinkerlaunch#595 for a more technical breakdown from a very kind user that reported it to STL.

It's not specific to STL, it's an upstream dependency change and Ubuntu has not updated their package on 20.04. I just noticed you said you were using Ubuntu 20.04 and wanted to point this out.