Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lutris 0.5.14 sometimes crashes when accessing Settings > Global options #5092

Closed
4 tasks done
pizzadude opened this issue Oct 22, 2023 · 66 comments · Fixed by #5133
Closed
4 tasks done

Lutris 0.5.14 sometimes crashes when accessing Settings > Global options #5092

pizzadude opened this issue Oct 22, 2023 · 66 comments · Fixed by #5133

Comments

@pizzadude
Copy link

Bug description

Lutris 0.5.14 sometimes crashes when accessing Settings > Global options in Fedora 38 KDE (wayland session). It also sometimes happens when accessing "System options" section of a Runner's options.

dmesg shows this:
lutris[2046611] general protection fault ip:7f0b2e59ad33 sp:7f0b090baf60 error:0 in libglib-2.0.so.0.7600.5[7f0b2e53a000+a0000]
lutris[3245093] general protection fault ip:7f6b3702f260 sp:7f6b12abad50 error:0 in libpango-1.0.so.0.5000.14[7f6b3700e000+39000]

I am sometimes shown this in lutris output:
Gtk:ERROR:../gtk/gtkcssinheritvalue.c:33:gtk_css_value_inherit_free: code should not be reached
**
Gtk:ERROR:../gtk/gtkcssinheritvalue.c:33:gtk_css_value_inherit_free: code should not be reached
Bail out! Gtk:ERROR:../gtk/gtkcssinheritvalue.c:33:gtk_css_value_inherit_free: code should not be reached
Bail out! Gtk:ERROR:../gtk/gtkcssinheritvalue.c:33:gtk_css_value_inherit_free: code should not be reached
fish: Job 1, '/usr/bin/lutris' terminated by signal SIGABRT (Abort)

How to Reproduce

Steps to reproduce the behavior:

  1. Open lutris
  2. Go to settings > global options
  3. Sometimes it will crash

Expected behavior

Not crash when accessing certain settings pages

Log output

DEBUG    2023-10-22 11:48:09,938 [lutris.get_missing_game_ids:202]:Checking for missing games
DEBUG    2023-10-22 11:48:13,497 [application.show_window:359]:Showing window PreferencesDialog{'parent': <lutriswindow.LutrisWindow object at 0x7f531d6e3000 (LutrisWindow at 0x55a33ac56f90)>}
DEBUG    2023-10-22 11:48:15,002 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
DEBUG    2023-10-22 11:48:15,015 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
DEBUG    2023-10-22 11:48:15,053 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
DEBUG    2023-10-22 11:48:15,062 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
DEBUG    2023-10-22 11:48:15,068 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
**
Gtk:ERROR:../gtk/gtkcssinheritvalue.c:33:gtk_css_value_inherit_free: code should not be reached
**
Gtk:ERROR:../gtk/gtkcssinheritvalue.c:33:gtk_css_value_inherit_free: code should not be reached
Bail out! Gtk:ERROR:../gtk/gtkcssinheritvalue.c:33:gtk_css_value_inherit_free: code should not be reached
Bail out! Gtk:ERROR:../gtk/gtkcssinheritvalue.c:33:gtk_css_value_inherit_free: code should not be reached
fish: Job 1, '/usr/bin/lutris -d' terminated by signal SIGABRT (Abort)

System Information

[System]
OS:              Fedora Linux 38 KDE Plasma
Arch:            x86_64
Kernel:          6.5.7-200.fc38.x86_64
Desktop:         KDE
Display Server:  wayland

[CPU]
Vendor:          GenuineIntel
Model:           Intel(R) Core(TM) i5-7300U CPU @ 2.60GHz
Physical cores:  2
Logical cores:   4

[Memory]
RAM:             7.6 GB
Swap:            7.6 GB

[Graphics]
Vendor:          Intel
OpenGL Renderer: Mesa Intel(R) HD Graphics 620 (KBL GT2)
OpenGL Version:  4.6 (Compatibility Profile) Mesa 23.1.8
OpenGL Core:     4.6 (Core Profile) Mesa 23.1.8
OpenGL ES:       OpenGL ES 3.2 Mesa 23.1.8
Vulkan Version:  1.3.243
Vulkan Drivers:  Intel(R) HD Graphics 620 (KBL GT2) (1.3.246)

Media (optional)

No response

Checklist:

  • I'm not asking for support with a game or the wine runner.
  • I have followed the above mentioned guides and have all the graphics and wine dependencies installed.
  • I have checked for existing issues that describe my problem prior to opening this one.
  • I understand that improperly formatted bug reports may be closed without explanation.
@danieljohnson2
Copy link
Contributor

Hmm. Did this happen in 0.5.13? I notice it refers to libpango, and we've started using Pango- to write the 'Missing' badge on the media for games whose directory is missing.

Try this: Go into Preferences and activate the option to "Hide badges on icons"; then restart Lutris. Now, go into settings and try those options again. Does it still crash?

@pizzadude
Copy link
Author

It still crashes sometimes when that option is checked.

@danieljohnson2
Copy link
Contributor

Hmm, so much for that theory. If it's not that little badge, I'm not sure what's happened in 0.5.14 that's affecting you. It's GTK that's blowing up, I think. Maybe it's related to KDE somehow?

I'm just guessing at this point.

@FSKiller
Copy link

I can confirm.
1 - Open Lutris
2 - Right Click a game and select Configure
3 - Click System Options just after opening Lutris
4 - Crash....
BUT
1 - Open Lutris
2 - Right clicking a game and select Configure
3 - Click Runner options
4 - Scroll a bit towards the bottom
5 - Click System Options
6 - No Longer Crashes

OS: EndeavourOS Linux x86_64
Kernel: 6.5.7
CPU: Intel i5-8600K (6) @ 4.300GHz
GPU: NVIDIA GeForce RTX 2070 Rev. A
Memory: 32035MiB
KDE Plasma

@danieljohnson2
Copy link
Contributor

Seems like maybe KDE Plasma is the common factor here.

@strycore
Copy link
Member

The system tab is making calls to various tools like xrandr and vulkan-info so that's probably what's crashing Lutris on some KDE setups.
On the Steam Deck's KDE with Lutris flatpak, no issue to report.

@FSKiller
Copy link

FSKiller commented Oct 27, 2023

Lutris with --debug:

lutris1

Dmesg shows this:

lutris_dmesg

EDIT:
Sometimes this also shows up in Dmesg:

lutris3

@strycore
Copy link
Member

Looks like the xrandr calls are getting through so it's probably vulkan-info that is causing the issue, or more precisely, how python retrieves the output of vulkan-info and loads it in the UI

@danieljohnson2
Copy link
Contributor

I'm immediately suspicious of the vkquery stuff. If the C API declarations are wrong...

@madscientist16
Copy link

This is happening for me as well. Running lutris --debug the output I get is the same as the one @FSKiller posted.

System Info:

[System]
OS:              Arch Linux rolling n/a
Arch:            x86_64
Kernel:          6.5.9-zen2-1-zen
Desktop:         KDE
Display Server:  x11

[CPU]
Vendor:          GenuineIntel
Model:           Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
Physical cores:  4
Logical cores:   8

[Memory]
RAM:             15.5 GB
Swap:            7.8 GB

[Graphics]
Vendor:          Intel
OpenGL Renderer: Mesa Intel(R) HD Graphics 530 (SKL GT2)
OpenGL Version:  4.6 (Compatibility Profile) Mesa 23.2.1-arch1.2
OpenGL Core:     4.6 (Core Profile) Mesa 23.2.1-arch1.2
OpenGL ES:       OpenGL ES 3.2 Mesa 23.2.1-arch1.2
Vulkan Version:  1.3.269
Vulkan Drivers:  Intel(R) HD Graphics 530 (SKL GT2) (1.3.255), NVIDIA GeForce 940M (1.3.242)

@Falkgaard
Copy link

Falkgaard commented Nov 2, 2023

I consistently get segfaults/coredumps when going to "System Options" of a game as well:

$ lutris
2023-11-03 00:21:59,153: Command 'fluidsynth' not found on your system
2023-11-03 00:21:59,625: Starting Lutris 0.5.14
2023-11-03 00:21:59,628: Using NVIDIA drivers 535.113.01 for x86_64
2023-11-03 00:21:59,628: GPU: NVIDIA GeForce GTX 960M
2023-11-03 00:21:59,628: GPU: 8086:191B 17AA:3802 (i915 drivers)
2023-11-03 00:21:59,628: GPU: 10DE:139B 17AA:3802 (nvidia drivers)
Segmentation fault (core dumped)
$ lutris
2023-11-03 00:22:18,321: Command 'fluidsynth' not found on your system
2023-11-03 00:22:18,804: Starting Lutris 0.5.14
2023-11-03 00:22:18,807: Using NVIDIA drivers 535.113.01 for x86_64
2023-11-03 00:22:18,807: GPU: NVIDIA GeForce GTX 960M
2023-11-03 00:22:18,807: GPU: 8086:191B 17AA:3802 (i915 drivers)
2023-11-03 00:22:18,807: GPU: 10DE:139B 17AA:3802 (nvidia drivers)
corrupted size vs. prev_size
Aborted (core dumped)
$ lutris --debug
2023-11-03 00:30:07,333: Command 'fluidsynth' not found on your system
INFO     2023-11-03 00:30:07,822 [application.do_command_line:436]:Starting Lutris 0.5.14
INFO     2023-11-03 00:30:07,824 [startup.get_drivers:57]:Using NVIDIA drivers 535.113.01 for x86_64
INFO     2023-11-03 00:30:07,825 [startup.get_drivers:61]:GPU: NVIDIA GeForce GTX 960M
INFO     2023-11-03 00:30:07,825 [display.display_gpu_info:78]:GPU: 8086:191B 17AA:3802 (i915 drivers)
INFO     2023-11-03 00:30:07,825 [display.display_gpu_info:78]:GPU: 10DE:139B 17AA:3802 (nvidia drivers)
DEBUG    2023-11-03 00:30:08,300 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
DEBUG    2023-11-03 00:30:09,407 [lutris.get_missing_game_ids:202]:Checking for missing games
DEBUG    2023-11-03 00:30:15,064 [application.show_window:359]:Showing window EditGameConfigDialog1
DEBUG    2023-11-03 00:30:17,727 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
DEBUG    2023-11-03 00:30:18,002 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
DEBUG    2023-11-03 00:30:18,118 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
DEBUG    2023-11-03 00:30:18,178 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
DEBUG    2023-11-03 00:30:18,247 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
DEBUG    2023-11-03 00:30:28,467 [game.save:429]:Saving The Iron Oath (wine) with config ID the-iron-oath-1698958502
DEBUG    2023-11-03 00:30:28,467 [config.save:227]:Saving LutrisConfig(level=game, game_config_id=the-iron-oath-1698958502, runner=wine) config to /home/falk/.config/lutris/games/the-iron-oath-1698958502.yml
DEBUG    2023-11-03 00:30:29,756 [lutris.add_to_path_cache:160]:Adding The Iron Oath (wine) to path cache
DEBUG    2023-11-03 00:30:29,775 [application.on_app_window_destroyed:377]:Removed window EditGameConfigDialog1
DEBUG    2023-11-03 00:30:33,903 [application.show_window:359]:Showing window EditGameConfigDialog1
malloc(): unaligned tcache chunk detected
Aborted (core dumped)
$ inxi -F
System:
  Host: aska Kernel: 6.5.9-arch2-1 arch: x86_64 bits: 64 Desktop: KDE Plasma
    v: 5.27.9 Distro: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 80NV v: Lenovo ideapad Y700-15ISK
    serial: <superuser required>
  Mobo: LENOVO model: Allsparks 5A v: SDK0J40709 WIN
    serial: <superuser required> UEFI: LENOVO v: CDCN54WW date: 06/13/2017
Battery:
  ID-1: BAT0 charge: 43.8 Wh (100.0%) condition: 43.8/60.0 Wh (73.0%)
CPU:
  Info: quad core model: Intel Core i5-6300HQ bits: 64 type: MCP cache:
    L2: 1024 KiB
  Speed (MHz): avg: 800 min/max: 800/3200 cores: 1: 800 2: 800 3: 800 4: 800
Graphics:
  Device-1: Intel HD Graphics 530 driver: i915 v: kernel
  Device-2: NVIDIA GM107M [GeForce GTX 960M] driver: nvidia v: 535.113.01
  Device-3: Intel RealSense 3D Camera (Front F200) driver: uvcvideo
    type: USB
  Display: x11 server: X.Org v: 21.1.9 with: Xwayland v: 23.2.2 driver: X:
    loaded: modesetting,nvidia dri: iris gpu: i915 resolution: 1: 2560x1440~60Hz
    2: N/A
  API: EGL v: 1.5 drivers: nvidia platforms: gbm
  API: OpenGL v: 4.6.0 vendor: nvidia v: 535.113.01 renderer: NVIDIA
    GeForce GTX 960M/PCIe/SSE2
  API: Vulkan v: 1.3.269 drivers: nvidia surfaces: xcb,xlib
Audio:
  Device-1: Intel 100 Series/C230 Series Family HD Audio driver: snd_hda_intel
  API: ALSA v: k6.5.9-arch2-1 status: kernel-api
  Server-1: PipeWire v: 0.3.83 status: active
Network:
  Device-1: Intel Dual Band Wireless-AC 3165 Plus Bluetooth driver: iwlwifi
  IF: wlp8s0 state: up mac: 84:ef:18:ad:a4:58
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    driver: r8169
  IF: enp9s0 state: down mac: c8:5b:76:5e:63:af
  IF-ID-1: nordlynx state: unknown speed: N/A duplex: N/A mac: N/A
Bluetooth:
  Device-1: N/A driver: btusb type: USB
  Report: btmgmt ID: hci0 state: up address: 84:EF:18:AD:A4:5C bt-v: 4.2
Drives:
  Local Storage: total: 4.51 TiB used: 2.72 TiB (60.3%)
  ID-1: /dev/nvme0n1 vendor: Corsair model: Force MP510 size: 894.25 GiB
  ID-2: /dev/sda vendor: Seagate model: BUP BK size: 3.64 TiB type: USB
Partition:
  ID-1: / size: 863.1 GiB used: 192.12 GiB (22.3%) fs: ext4
    dev: /dev/nvme0n1p3
  ID-2: /boot size: 299.4 MiB used: 107.5 MiB (35.9%) fs: vfat
    dev: /dev/nvme0n1p1
Swap:
  ID-1: swap-1 type: partition size: 16 GiB used: 0 KiB (0.0%)
    dev: /dev/nvme0n1p2
Sensors:
  System Temperatures: cpu: 55.0 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Processes: 208 Uptime: 2h 36m Memory: total: 16 GiB available: 15.45 GiB
  used: 5.49 GiB (35.6%) Shell: fish inxi: 3.3.30

Hybrid GPU laptop, but I do optimus-manager --switch nvidia to toggle the discrete GPU.

@Liverel
Copy link

Liverel commented Nov 10, 2023

Ok, this affects me as well. This bug is really annoying. It never happened for me in 0.5.13, and now it happens almost every time I go into system options.

@strycore
Copy link
Member

if only any of the people affected was able to do a bisect.

@danieljohnson2
Copy link
Contributor

danieljohnson2 commented Nov 10, 2023

I believe I'm seeing it in a Fedora 39 KDE Plasma VM. But it's not reliable at all; seems to crash sometimes if you start Lutris from the panel, go to preferences, and just click among the views for a bit. But more often, no crash.

If I can get a repo out of this VM, I can bisect this. But it's so ghosty right now.

So far, I've seen no crashes when I start from the command line, though it's the same Lutris 0.5.14 from the repo.

If somebody else is having this more reliably than I, could try running lutris from the command line and see if it still crashes? I can't think why this would matter, but...

Never mind, I've seen it crash from the command line too. Seems to happen more if I go directly to Global Options and don't visit anything else first.

@danieljohnson2
Copy link
Contributor

Well, it's too ghosty to bisect but I tried NOP-ing out the vkquery.py stuff, and it still crashes. So it's not just a messed up declaration in there, at least.

@madscientist16
Copy link

Bisecting led me to this commit 259c4f4

@strycore
Copy link
Member

so it's likely in one of the subprocess calls. A crash in vkquery.py would likely produce a better python stacktrace.

@strycore
Copy link
Member

Bisecting led me to this commit 259c4f4

that sort of makes sense. That code doesn't even respect the utility functions we have to call subprocess and looks very flimsy.
Thanks for looking into it.

@Ruakij
Copy link

Ruakij commented Nov 10, 2023

I also have this issue, but i found a different commit, so i assume its because of a different reason?
For some time Lutris also starts up very slowly (10-30s).

Starts stuttering (~3s) at 2bd8806
Freezes/Crashes at 9acc43b

I havent tested with a clean config yet.

System Information
[System]
OS: EndeavourOS rolling rolling
Arch: x86_64
Kernel: 6.6.1-arch1-1
Desktop: KDE
Display Server: wayland

[CPU]
Vendor: AuthenticAMD
Model: AMD Ryzen 7 5700G with Radeon Graphics
Physical cores: 8
Logical cores: 16

[Memory]
RAM: 30.7 GB
Swap: 8.0 GB

[Graphics]
Vendor: AMD
OpenGL Renderer: AMD Radeon Graphics (renoir, LLVM 16.0.6, DRM 3.54, 6.6.1-arch1-1)
OpenGL Version: 4.6 (Compatibility Profile) Mesa 23.2.1-arch1.2
OpenGL Core: 4.6 (Core Profile) Mesa 23.2.1-arch1.2
OpenGL ES: OpenGL ES 3.2 Mesa 23.2.1-arch1.2
Vulkan Version: 1.3.269
Vulkan Drivers: AMD Radeon Graphics (RADV RENOIR) (1.3.255)


Log from 2bd8806

INFO     2023-11-10 20:26:36,597 [startup.init_lutris:173]:Starting Lutris 0.5.12
DEBUG    2023-11-10 20:26:36,615 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
INFO     2023-11-10 20:26:36,631 [startup.check_driver:65]:Running AMD Mesa driver 23.2.1 on AMD Radeon Graphics (renoir, LLVM 16.0.6, DRM 3.54, 6.6.1-arch1-1) (0x1638)
INFO     2023-11-10 20:26:36,631 [startup.check_driver:77]:GPU: 1002:1638 1458:D000 (amdgpu drivers)
DEBUG    2023-11-10 20:26:41,637 [lutriswindow.update_store:450]:Showing 20 games
INFO     2023-11-10 20:26:41,659 [startup.update_runtimes:218]:Startup complete
DEBUG    2023-11-10 20:26:44,006 [application.show_window:330]:Showing window EditGameConfigDialog26
DEBUG    2023-11-10 20:26:45,861 [system.execute:57]:Executing / u s r / b i n / l s p c i
DEBUG    2023-11-10 20:26:45,885 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
DEBUG    2023-11-10 20:26:45,888 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
DEBUG    2023-11-10 20:26:45,890 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
DEBUG    2023-11-10 20:26:54,014 [application.on_app_window_destroyed:348]:Removed window EditGameConfigDialog26
INFO     2023-11-10 20:26:54,017 [application.do_shutdown:943]:Shutting down Lutris

Log from 9acc43b

Fr 10. Nov 20:29:44 CET 2023
INFO     2023-11-10 20:29:45,307 [startup.init_lutris:190]:Starting Lutris 0.5.12
DEBUG    2023-11-10 20:29:45,327 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
INFO     2023-11-10 20:29:45,344 [startup.check_driver:72]:Running AMD Mesa driver 23.2.1 on AMD Radeon Graphics (renoir, LLVM 16.0.6, DRM 3.54, 6.6.1-arch1-1) (0x1638)
INFO     2023-11-10 20:29:45,344 [startup.check_driver:84]:GPU: 1002:1638 1458:D000 (amdgpu drivers)
DEBUG    2023-11-10 20:29:53,966 [application.show_window:339]:Showing window EditGameConfigDialog26
DEBUG    2023-11-10 20:29:54,868 [sysoptions.add_icd_search_path:145]:Added '/home/ruakij/.local/share/vulkan' to vulkan ICD search path
DEBUG    2023-11-10 20:29:54,868 [sysoptions.add_icd_search_path:145]:Added '/usr/share/vulkan' to vulkan ICD search path
DEBUG    2023-11-10 20:29:54,868 [sysoptions.get_vk_icd_files:180]:Added '['/usr/share/vulkan/icd.d/nvidia_icd.json', '/usr/share/vulkan/icd.d/radeon_icd.i686.json', '/usr/share/vulkan/icd.d/radeon_icd.x86_64.json']' to all_icd_files
[1]    319093 killed     lutris --debug
Fr 10. Nov 20:30:30 CET 2023

Couldnt get it to crash, so killed it instead.


Log from 0.5.14 with slow start:

Fr 10. Nov 20:37:35 CET 2023
INFO     2023-11-10 20:37:41,159 [application.do_command_line:436]:Starting Lutris 0.5.14
INFO     2023-11-10 20:37:41,160 [startup.get_drivers:70]:Running AMD Mesa driver 23.2.1 on AMD Radeon Graphics (renoir, LLVM 16.0.6, DRM 3.54, 6.6.1-arch1-1) (0x1638)
INFO     2023-11-10 20:37:41,161 [display.display_gpu_info:78]:GPU: 1002:1638 1458:D000 (amdgpu drivers)
DEBUG    2023-11-10 20:37:51,004 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
DEBUG    2023-11-10 20:37:51,771 [lutris.get_missing_game_ids:202]:Checking for missing games
DEBUG    2023-11-10 20:38:02,756 [application.show_window:359]:Showing window PreferencesDialog{'parent': <lutriswindow.LutrisWindow object at 0x7f5b182de700 (LutrisWindow at 0x5636b18d49e0)>}
DEBUG    2023-11-10 20:39:52,422 [application.on_app_window_destroyed:377]:Removed window PreferencesDialog{'parent': <lutriswindow.LutrisWindow object at 0x7f5b182de700 (LutrisWindow at 0x5636b18d49e0)>}
INFO     2023-11-10 20:39:53,801 [application.do_shutdown:1028]:Shutting down Lutris
Fr 10. Nov 20:39:53 CET 2023

@danieljohnson2
Copy link
Contributor

OK, I've NOPped out the get_locale_list() code and that does seem to avert the crash.

But I also tried to replace the call to Popen with our own system.execute() and that did not help a bit. I do not understand what's causing us to crash here.

I tried switching to locale.locale_alias.values() to get the list, and that crashes, but seems to crash less often.

@danieljohnson2
Copy link
Contributor

I think I see it; it's not how we get the locales, it's how big it is. This i a drop down with 873 locales in it on my VM; I think that's triggering a GTK bug of some kind here.

I'll put together a branch that limits the drop down to the UTF-8 options, which are "(recommended)", and you'd have to type in any other locale. Might be an acceptable solution if it works.

danieljohnson2 added a commit that referenced this issue Nov 10, 2023
It's still a long list, but all locales seemed to be caused crashes. You can always type in some other locale, if UTF-8 is not your thing.

Resolves #5092
@danieljohnson2
Copy link
Contributor

OK, branch is ready.

If you are having this crash, please download this branch here, and the run the bin/lutris script inside.

With this branch, the Locale dropdown will list only UTF-8 locales if you have any, which is still a lot really. You'll have to type in your own locale if you want EBCDIC, sorry. But I hope this will avoid the crashes people have been having.

@strycore
Copy link
Member

That dropdown has to go and needs to be replaced with a text field.
In its current state, even without the crashes, it's completely unusable and really makes a bad impression.

@danieljohnson2
Copy link
Contributor

I think that's just a revert away- it was a text field before, if I recall. But if we could provide a reasonable - and short - set of options here that'd be better than a text field. My branch isn't that, though.

Still, I hope interested parties will still test it, see if I'm onto something here. If so, I expect a text field would fix the issue as well or better.

@strycore
Copy link
Member

From what I understand, the locale option (which I've never used) is useful for Japanese or Russian games.
We certainly don't need a 2km long dropdown. Having a curated list of 15 to 20 most sensible locales in a dropdown with the option of providing a custom value would be a good alternative.

That said, MAME has a dropdown for the machine option and that has over 4000 entries. I've never had anyone complain about it crashing.

@madscientist16
Copy link

If you are having this crash, please download this branch here, and the run the bin/lutris script inside.

Still crashes for me on that branch.

I think I see it; it's not how we get the locales, it's how big it is. This i a drop down with 873 locales in it on my VM; I think that's triggering a GTK bug of some kind here.

I don't think the number of locales is the problem here, since I only have 7 locales on my system and It's crashing.

@strycore
Copy link
Member

strycore commented Nov 11, 2023

@madscientist16 can you try replacing all occurrences of "choices": some_function with "choices": [] in sysoptions.py, confirm it no longer crashes then reintroduce the original choices little by little?

@danieljohnson2
Copy link
Contributor

Well, nobody wants to retest this now, so I'll pop a PR to be merged if you like the new drop-down. I hope it will fix the crash too.

@strycore
Copy link
Member

Even without further testing, this is much more user friendly.

Now, anyone has any theories on why this would only happen on KDE?

@danieljohnson2
Copy link
Contributor

Now, anyone has any theories on why this would only happen on KDE?

Clearly, KDE sees how GNOMEy we've become and Does Not Approve.

@pizzadude
Copy link
Author

Hi, sorry for the late reply. I can confirm Lutris doesn't crash with that branch.

@danieljohnson2
Copy link
Contributor

OK, I'll take 'yes' for an answer and merge this PR myself.

@skeezmoe
Copy link

Been getting these segfaults as well and using the lutris script from master did not fix the issue

$ lutris -d
INFO     2023-12-14 06:49:21,079 [application.do_command_line:436]:Starting Lutris 0.5.14
INFO     2023-12-14 06:49:21,080 [startup.get_drivers:70]:Running AMD Mesa driver 23.2.1 on AMD Radeon RX 6750 XT (navi22, LLVM 16.0.6, DRM 3.54, 6.6.6-arch1-1) (0x73df)
INFO     2023-12-14 06:49:21,080 [display.display_gpu_info:78]:GPU: 1002:73DF 1043:05E7 (amdgpu drivers)
DEBUG    2023-12-14 06:49:21,214 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
DEBUG    2023-12-14 06:49:21,457 [lutris.get_missing_game_ids:202]:Checking for missing games
DEBUG    2023-12-14 06:49:26,149 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
DEBUG    2023-12-14 06:49:26,188 [application.show_window:359]:Showing window RunnerConfigDialogwine
DEBUG    2023-12-14 06:49:26,976 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
DEBUG    2023-12-14 06:49:26,979 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
DEBUG    2023-12-14 06:49:26,986 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
DEBUG    2023-12-14 06:49:26,989 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
DEBUG    2023-12-14 06:49:26,991 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
/usr/lib/python3.11/site-packages/gi/overrides/Gio.py:42: Warning: g_object_ref: assertion '!object_already_finalized' failed
  return Gio.Application.run(self, *args, **kwargs)
Segmentation fault (core dumped)

$ lutris -d
INFO     2023-12-14 06:49:44,909 [application.do_command_line:436]:Starting Lutris 0.5.14
INFO     2023-12-14 06:49:44,911 [startup.get_drivers:70]:Running AMD Mesa driver 23.2.1 on AMD Radeon RX 6750 XT (navi22, LLVM 16.0.6, DRM 3.54, 6.6.6-arch1-1) (0x73df)
INFO     2023-12-14 06:49:44,911 [display.display_gpu_info:78]:GPU: 1002:73DF 1043:05E7 (amdgpu drivers)
DEBUG    2023-12-14 06:49:45,042 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
DEBUG    2023-12-14 06:49:45,285 [lutris.get_missing_game_ids:202]:Checking for missing games
DEBUG    2023-12-14 06:49:49,734 [application.show_window:359]:Showing window EditGameConfigDialog6
DEBUG    2023-12-14 06:49:50,521 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
DEBUG    2023-12-14 06:49:50,524 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
DEBUG    2023-12-14 06:49:50,532 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
DEBUG    2023-12-14 06:49:50,534 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
DEBUG    2023-12-14 06:49:50,536 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
DEBUG    2023-12-14 06:49:54,656 [application.on_app_window_destroyed:377]:Removed window EditGameConfigDialog6
DEBUG    2023-12-14 06:49:57,486 [xrandr._get_vidmodes:16]:Retrieving video modes from XrandR
DEBUG    2023-12-14 06:49:57,522 [application.show_window:359]:Showing window RunnerConfigDialogwine
free(): invalid pointer
Segmentation fault (core dumped)

@danieljohnson2
Copy link
Contributor

danieljohnson2 commented Dec 13, 2023

Not sure what's causing this, but I've going through and made sure we've got function signatures on every single C API we use- some were missing. Could have caused memory corruption.

I'd ask you, @skeezmoe, to get the very latest master and see if that has helped at all.

@Liverel
Copy link

Liverel commented Dec 14, 2023

Even the drop-down hamburger menu can cause Lutris to crash randomly when opened. This is pretty bad. I've never had issues like this in 0.5.13. This has to be some kind of bad commit somewhere in the 0.5.14 release that's causing these issues. pretty buggy release.

@danieljohnson2
Copy link
Contributor

It's been quite solid for me, but @strycore been seeing crashes and has tried to bisect it; the latest master has been more stable for him since he reverted a seemingly innocuous commit.

These crashes sound like memory corruption to me, and I've been hunting for something that could cause that. I've tried to beef up the libvulkan integration just hours before your comment.

If you haven't tried the very, very latest @Liverel, I think you should. Download the latest code (don't try to install it) and run the 'bin/lutris' script therein; perhaps we've made some progress on this.

A thread-safety issue in our GTK usage is possible, but I've turned up nothing like that so far. That would be triggered by doing some particular thing in Lutris, but we did just change the startup UI...

I wish we could see a clearer pattern here; could people with this issue post the 'Hardware Information'? Maybe there's a pattern. Like, are you all on KDE? That was the pattern for this issue originally, and I was able to get somewhere with that...

@danieljohnson2
Copy link
Contributor

Maybe I should be more suspicious of the new startup stuff. It downloads runtime updates in the background, which only happens occasionally so it can't just be the actual update itself causing so many crashes. But there's a fancy new UI to show progress in the sidebar and there are threads involved too. Sooo...

Here's a branch with all that cut out; it can't update at all and the new UI is no longer present in the main window.

If anybody is still having the crashes, please download this butchered branch and let us know if it is better. It'll be a big clue if it is, though we can't ship something like this.

@s3gfaultx
Copy link

I have this exact issue now and I'm happy to help test solutions.

I've allowed Lutris to open and remain idle, no crash. I've went through each and every menu item, no crash. It's not until I open Preferences -> Global Options, does it crash. Sometimes instantly, others momentarily after. But it seems that the trigger is certainly opening this menu (and only opening it, it doesn't even need to be interacted with). After trying a few times to open it repeatedly (restarting the application and accessing the menu), it seems to work without issue.

The same issue occurs when accessing an individual games properties via Configure -> System Options.

Let me know what else I can provide or offer to help with a solution.

@madscientist16
Copy link

If you are running version 0.5.14 of lutris, try downloading this repo and running the 'bin/lutris' script to see if it still crashes.

@danieljohnson2
Copy link
Contributor

@s3gfault, let us know if the latest master helps. If it does not, please try my hacked branch which removes some code I'm suspicious of. Let us know!

@Liverel
Copy link

Liverel commented Dec 14, 2023

I'm on Arch using the Plasma desktop and using lutris-git from the AUR. It's less crashy in the git version than the stable release, but it can still crash out of nowhere. Also, one thing to note is that ever since 0.5.14, the configure window takes a little bit longer to open than on 0.5.13 before it opened instantly. Now it takes a little longer. Also, on Wayland, hovering the mouse while that window opens now that it takes several miliseconds to open causes Lutris to crash, but this crash only gets triggered when my mouse is set to 1000Hz. This seems very similar to the 1000Hz mouse crash that Firefox gets when running in Wayland as well. I've never gotten this type of crash because of my mouse before on earlier Lutris releases under Wayland thou.

@danieljohnson2
Copy link
Contributor

I've noticed the similarity to the 1000 Hz mouse issue. It may be that we're reacting too slowly and causing the the pipe to back up if a lot of mouse input is incoming; I don't have this problem, but my mouse isn't so fancy.

I don't know why the config dialog is slower to open, but now that you point it out, I see it too. I shall bisect it.

@danieljohnson2
Copy link
Contributor

OK, the slowdown appears to be the integration of flatpak based runners; I'll try to optimize this.

However,for now I've made another hacked branch that cuts that out, right here.

@Liverel, or other people who are suffering crashes, please download that branch and run the 'bin/lutris' script there in. Is that any less crashy? Faster at least?

@Liverel
Copy link

Liverel commented Dec 14, 2023

OK, the slowdown appears to be the integration of flatpak based runners; I'll try to optimize this.

However,for now I've made another hacked branch that cuts that out, right here.

@Liverel, or other people who are suffering crashes, please download that branch and run the 'bin/lutris' script there in. Is that any less crashy? Faster at least?

The dialog opens instantly on that branch, and moving around the mouse while it opens doesn't cause the crash anymore.

@danieljohnson2
Copy link
Contributor

Excellent. I've added just a bit of cache in the master branch that keeps flatpak working but much more cheaply (but it won't notice you installing a new runner in flatpak until you restart Lutris).

Please try the latest master; is it also improved now?

And let us know if you are still getting other crashes.

@Liverel
Copy link

Liverel commented Dec 14, 2023

I just updated the aur lutris-git. The dialog opens instantly, and the mouse doesn't crash it anymore there either. Nice

@danieljohnson2
Copy link
Contributor

Very good. I fear there will be crashes elsewhere in Lutris; @strycore reports that the branch did not help him at all. But one step at a time!

@danieljohnson2
Copy link
Contributor

Since that seemed to help @Liverel, I've got a new branch that goes further, and tries to avoid spawning helper processes during install as well.

If you having been having crashes in the install-window, give it a try and let us know. Still shooting in the dark really, but maybe, just maybe...

@strycore
Copy link
Member

The crashs I've been having were caused by having to many events stacking up in the GUI thread. On wayland and with a high DPI mouse, it was easy to resolve.

Any operation that can lock up the UI should be done in a background task. From doing HTTP requests to reading/writing to HDD drives (sometimes HDD drives go to sleep and it takes a couple seconds for them to spin up again)

Deporting the code making HTTP requests in a thread separate from the main Gtk thread has solved all known crashes on Wayland.

If anyone is aware of crashes that still happen on the latest code, please let me know!

Lutris will just exit and say Error flushing display: Broken pipe or something similar about Wayland compositor being lost.

@abehling
Copy link

abehling commented Dec 19, 2023

#5170

I'm glad it mitigates it; I was hoping the crashes would be gone. No?

@danieljohnson2 To finish the conversation. Yes, the crashes seem to have vanished completely. I said mitigated because even before they just happend every thirtiest time or so and I didn't want to open the context menu for a hundred times just to be sure. 😄

Edit: For statistics
I am on 6.6.7-arch1-1 using Plasma on Wayland with amdgpu.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.