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

vlc: fix GLib-GIO-ERROR rg.gtk.Settings.FileChooser #75851

Closed
wants to merge 2 commits into from
Closed

vlc: fix GLib-GIO-ERROR rg.gtk.Settings.FileChooser #75851

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Dec 18, 2019

Motivation for this change

When clicking on the "Media -> Open File ..." item in the GUI VLC player, the player crashes with the following error.

(vlc:22800): GLib-GIO-ERROR **: 10:08:13.004: Settings schema 'org.gtk.Settings.FileChooser' does not contain a key named 'show-type-column'
Trace/breakpoint trap (core dumped)

Adding wrapGAppsHook to the nativeBuildInputs resolves the issue and allows users to select a file.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)

  • Built on platform(s)

    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests) (no tests exist)

  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"

    The following derivation could not be built.

    builder for '/nix/store/13qb5yp1v9r4cpabhxipqqxfkl51bqsj-InstallNDISDK_v4_Linux.tar.gz.drv' failed with exit code 1; last 10 log lines:
    
      https://ndi.tv/sdk/
    
      Once you have downloaded the file, please use the following command and
      re-run the installation:
    
      nix-prefetch-url file://$PWD/InstallNDISDK_v4_Linux.tar.gz
    
      ***
    cannot build derivation '/nix/store/0b072a09k16rgz7kaipppp626dvh1r3k-ndi-4.drv': 1 dependencies couldn't be built
    cannot build derivation '/nix/store/xzg1xvx23zfai55rm596p4y842s50rvm-obs-ndi-4.7.1.drv': 1 dependencies couldn't be built
    cannot build derivation '/nix/store/2jpgmzlvjpwazj7mf3l4zi6psln7jjxd-env.drv': 1 dependencies couldn't be built
    

    The nix-review command generated the following report.

    Result of `nix-review` [1](https://github.com/Mic92/nix-review)
    <details>
      <summary>1 package failed to build:</summary>
    
      - obs-ndi
    </details>
    <details>
      <summary>16 package were built:</summary>
    
      - cantata
      - elisa
      - libsForQt5.phonon-backend-vlc
      - libsForQt5.vlc
      - megaglest
      - minitube
      - netease-cloud-music
      - obs-linuxbrowser
      - obs-studio
      - obs-wlrobs
      - pympress
      - python27Packages.python-vlc
      - python37Packages.python-vlc
      - python38Packages.python-vlc
      - strawberry
      - tribler
    </details>
    
  • Tested execution of all binary files (usually in ./result/bin/)

    All run except the wrapper, which seems to attempt to call the wrong subwrapper. Potentially it should be calling .vlc-wrapped instead of .vlc-wrapper

    $ ./vlc-wrapper
    /nix/store/d57y6sgrxyl3zviyhvg30p7v4rc0dc1k-vlc-3.0.8/bin/.vlc-wrapper: No such file or directory
    
  • Determined the impact on package closure size (by running nix path-info -S before and after)

  • Ensured that relevant documentation is up to date (does not seem to have any documentation)

  • Fits CONTRIBUTING.md.

Notify maintainers

No maintainers specified in the .nix file, but the following contributor approved the last VLC PR.

cc @aanderse

On gnome 3.34, attempting to open a file from the VLC media menu causes the
following error.

    (vlc:22800): GLib-GIO-ERROR **: 10:08:13.004: Settings schema
    'org.gtk.Settings.FileChooser' does not contain a key named
    'show-type-column' Trace/breakpoint trap (core dumped)

Adding the wrapQtAppsHook allows gnome access to this schema setting.
@teto
Copy link
Member

teto commented Dec 18, 2019

cc @jtojnar

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/firefox-crashes-when-opening-a-file-dialog-in-pantheon/5323/1

@jtojnar
Copy link
Contributor

jtojnar commented Jan 4, 2020

We would need to prevent double-wrapping, see https://nixos.org/nixpkgs/manual/#ssec-gnome-common-issues-double-wrapped.

@ghost
Copy link
Author

ghost commented Jan 5, 2020

I got a bit stuck trying to prevent the double wrapping. I tried the method mentioned in the manual for Qt apps but this did not seem to apply any of prefixes specified in gappsWrapperArgs. I then tried this

  preFixup = ''
    qtWrapperArgs+=(
      ''${gappsWrapperArgs[@]}
    )
  '';

which did add the correct arguments to two of the binaries (vlc and vlc-wrapper), with the other binary wrappers seem to reference these two. However, when the vlc program is run and one tries to open a file, the Settings schema 'org.gtk.Settings.FileChooser' does not contain a key named 'show-type-column' error happens. This is the original error that prompted the PR.

When using the double wrapped setup, the gappsWrapperArgs are wrapped on every binary (vlc, rvlc, etc), and this seems to solve the original schema issue.

I'm not quite sure where to go from here. I checked through the repository for similar cases and it seems that these two solutions are commonly used, but neither worked out.

  • Add the arguments in a preFixup using something similar to what is above (remmina has this type of modification). As mentioned this added the prefix arguments to the wrapper scripts but the main open file issue remained.
  • Add gappsWrapperArgs when manually calling wrapProgram (telegram has this approach). This option could be done but would remove the nice machinery already existing for wrapping the Qt arguments.

I also tried the following

  • Adding the values to makeWrapperArgs directly but this did not seem to do anything.
  • Adding the prefix values of gappsWrapperArgs explicitly to qtWrapperArgs, but this had the same result as the main attempt above.

@jtojnar
Copy link
Contributor

jtojnar commented Jan 5, 2020

Sorry, there might be more issues: #76283 (comment) I guess double wrapping will have to do for now.

At the moment the double wrapping works as it solves the open file schema
issue mentioned in PR 75851, but in the future we want to prevent the
binaries in the vlc package from being wrapped by both the qtWrapperArgs and
gappsWrapperArgs.
@ghost
Copy link
Author

ghost commented Jan 5, 2020

I added a note about the double wrapping to remember in the future.

@stale
Copy link

stale bot commented Jul 3, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 3, 2020
@SuperSandro2000
Copy link
Member

Closing due to ghost user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 10.rebuild-darwin: 1-10 10.rebuild-linux: 11-100
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants