NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.71k stars 13.84k forks source link

lutris: crashes when trying to open a file selection dialog #90645

Closed joepie91 closed 4 years ago

joepie91 commented 4 years ago

Describe the bug When attempting to open a file selection dialog of some sort, Lutris reproducibly crashes. This is necessary for some installers, which eg. expect you to supply your own installer file.

To Reproduce Steps to reproduce the behavior:

  1. Run lutris -i repro.yaml (see below for repro.yaml contents)
  2. Select "Test" as install source
  3. Click "Install" with the default installation directory
  4. Click "Browse..." when instructed
  5. :boom:

repro.yaml:

name: NixOS crash repro
game_slug: nixos-crash-repro
version: Test
slug: nixos-crash-repro
runner: wine

script:
  files:
    - archive: N/A:Click "Browse..."
  game:
    exe: $GAMEDIR/foo
  installer:
    - extract:
        file: archive
        dst: $GAMEDIR/foo/

Expected behavior Should produce a file selection dialog

Screenshots

2020-06-17 00:20:11,973: Package 'distro' unavailable. Unable to read Linux distribution
/usr/bin/ldconfig: Can't open cache file /nix/store/qvf11lymvw6n8g66xgj1wsm28z1viqdv-glibc-2.30/etc/ld.so.cache
: No such file or directory
2020-06-17 00:20:11,990: Failed to get libraries from ldconfig: Command '['/usr/bin/ldconfig', '-p']' returned non-zero exit status 1.
2020-06-17 00:20:12,297: Running Lutris 0.5.5
2020-06-17 00:20:12,297: Using X.Org
2020-06-17 00:20:12,297: Running Mesa driver 19.3.3 on AMD NAVI10 (DRM 3.35.0, 5.4.46, LLVM 9.0.1) (0x731f)
2020-06-17 00:20:12,298: GPU: 1002:731F 1DA2:E409 using amdgpu drivers
2020-06-17 00:20:12,298: i386 libGL.so.1 missing (needed by opengl)
2020-06-17 00:20:12,298: x86_64 libGL.so.1 missing (needed by opengl)
2020-06-17 00:20:12,298: i386 libvulkan.so.1 missing (needed by vulkan)
2020-06-17 00:20:12,298: x86_64 libvulkan.so.1 missing (needed by vulkan)
WARNING: radv is not a conformant vulkan implementation, testing use only.
2020-06-17 00:20:12,332: Vulkan is supported
2020-06-17 00:20:12,334: Updating DXVK versions
2020-06-17 00:20:12,484: Connected to lutris.net as joepie91
^[[2~2020-06-17 00:20:18,656: Getting runner information for wine
2020-06-17 00:20:18,735: Downloading file 1 of 1

(.lutris-wrapped:30185): GLib-GIO-ERROR **: 00:20:20.477: No GSettings schemas are installed on the system
Trace/breakpoint trap (core dumped)

Additional context Desktop environment: KDE Plasma. Guessing this is yet another GNOME library break.

Notify maintainers

@Chiiruno

Metadata

Note: I am using Lutris installed from unstable. Lutris on the 20.03 branch is differently broken, and just gets stuck on trying to connect to lutris.net, when trying to run the repro case. However, since the "Browse..." button for GOG installation directories works fine there, I suspect that it's only unstable which has this issue.

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute: lutris
# a list of nixos modules affected by the problem
module:
jonringer commented 4 years ago

related discussion: https://github.com/NixOS/nixpkgs/issues/1455

jtojnar commented 4 years ago

The current best practice is using wrapGAppsHook see https://nixos.org/nixpkgs/manual/#ssec-gnome-common-issues

kira-bruneau commented 4 years ago

@jtojnar I'm running into this problem too. It looks like lutris already uses wrapGAppsHook could it possibly be missing something else?

kira-bruneau commented 4 years ago

@jtojnar Sorry never mind, I tried building it directly from master and it seems to be fixed.

However, it looks like the fix was submitted 5 months ago (8f6882bb4cf), is there a reason why the hydra cache for https://nixos.org/channels/nixos-unstable would still be out of date?

jonringer commented 4 years ago

the unstable release usually lags a few days to a week, but 5 months doesn't seem right at all.

The current unstable release is only 2 days behind https://releases.nixos.org/nixpkgs/nixpkgs-20.09pre231837.2cd2e7267e5 . What's more likely is that you have 2 different channels.

try doing:

nix-channel --list
sudo nix-channel --list

they will likely be different

kira-bruneau commented 4 years ago

@jonringer Sorry again, I incorrectly assumed that hydra cache was out of date. Looking into it further I found that it only works inside my Emacs environment created with buildEnv. Outside my Emacs environment it fails, even with the latest version. It seems like the lutris derivation is not explicitly including a required dependency.

jtojnar commented 4 years ago

For file dialog you will need gtk3 package, looks like it is missing in the buildInputs.

The strictDeps warning might also be relevant as lutris is python app https://nixos.org/nixpkgs/manual/#ssec-gnome-hooks-gobject-introspection.

kira-bruneau commented 4 years ago

@jtojnar Thank you, adding gtk3 as a buildInput fixes the problem. Where do you see a strictDeps warning though? Setting strictDeps to false doesn't change the build or run output for me (except for timestamps and hashes).

jtojnar commented 4 years ago

By warning, I mean the yellow box in the document I linked.

jonringer commented 4 years ago

is it normal to have huge evaluation times for lutris-unwrapped? taking me >10mins test changes

kira-bruneau commented 4 years ago

@jonringer Hmm, that's weird, it only about 5 seconds on my machine.

jonringer commented 4 years ago

subsequent calls are pretty fast, but the initial .drv took about 10 mins to evaluate