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

firefox: fix gnome printing dialog crash #25518

Closed
wants to merge 3 commits into from

Conversation

bdimcheff
Copy link
Contributor

@bdimcheff bdimcheff commented May 5, 2017

Motivation for this change

wrapGappsHook was insufficient to fix a firefox (and firefox-bin) crash
when opening a print dialog without passing gsettings_desktop_schemas

See #24880 for more discussion.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Sorry, something went wrong.

wrapGappsHook was insufficient to fix a firefox (and firefox-bin) crash
when opening a print dialog without gsettings_desktop_schemas

See NixOS#24880 for more discussion.
@mention-bot
Copy link

@bdimcheff, thanks for your PR! By analyzing the history of the files in this pull request, we identified @taku0, @garbas and @abbradar to be potential reviewers.

@bdimcheff
Copy link
Contributor Author

hmmm i guess a file got moved in master since I branched off from unstable, one sec

@bdimcheff
Copy link
Contributor Author

ok I need to wait for the hydra to catch up because I don't want to recompile gcc and everything, but I'll keep an eye out when most of the upstream binaries are compiled

@abbradar
Copy link
Member

abbradar commented May 5, 2017

It's not good I didn't catch this (we have some sort of nondeterminism, maybe I have desktop schemas installed to environment by something -- I'll investigate later). Can you show the error visible when Firefox crashes? Also, what desktop environment do you use?

@bdimcheff
Copy link
Contributor Author

GLib-GIO-ERROR **: Settings schema 'org.gnome.system.proxy' is not installed and I'm running i3 from lightdm. It does look like (in nixpkgs) gnome/kde/xfce login sets all sorts of variables that seem like they may cause the nondeterminism.

I just tried nix-shell -p firefox --run "firefox" --pure which actually didn't crash when I tried to print, but it was missing all sorts of icons and stuff:

(firefox:1265): Gtk-WARNING **: Could not find the icon 'folder'. The 'hicolor' theme
was not found either, perhaps you need to install it.
You can get a copy from:
        http://icon-theme.freedesktop.org/releases

(firefox:1265): Gtk-WARNING **: Error loading theme icon 'folder' for stock: Icon 'folder' not present in theme Adwaita

(firefox:1265): Gtk-WARNING **: Error loading theme icon 'dialog-warning' for stock: Icon 'dialog-warning' not present in theme Adwaita

(firefox:1265): Gtk-WARNING **: Error loading theme icon 'dialog-question' for stock: Icon 'dialog-question' not present in theme Adwaita

I wonder if firefox is detecting some gnome3 stuff and so it's trying to use gnome3 everything, but with --pure there's not enough for it to even try?

Anyhow, my guess is if everything works with --pure it should work generally, no? If that's the goal I can play around with it a bit and see if I can get it working.

fwiw chrome[ium] still crashes for me on the native print dialog without the wrapper. I haven't tried --pure yet.

@vcunat
Copy link
Member

vcunat commented May 5, 2017

Unsetting XDG_DATA_DIRS should be enough to test this, I think. Some DEs put lots of stuff on that path.

It's really strange that wrapGapps didn't prevent #25505 on master; I'm sorry to have meddled with this at the layer of the wrapper – I didn't notice these are attempted on the unwrapped firefox already.

@bdimcheff
Copy link
Contributor Author

@vcunat yeah I actually don't know if my change is necessary on master because I was building off of the most recent nixpkgs unstable that passed in hydra, since I didn't want to rebuild everything locally. We can definitely hold off on this PR until your changes are live and I can test it in various ways.

@Mic92
Copy link
Member

Mic92 commented Jun 25, 2017

Is this still a problem? nix-shell -p firefox-bin --pure --run 'firefox' (also for firefox) works for me with a recent master.

@garbas
Copy link
Member

garbas commented Jun 25, 2017

This also works for me (just printed this page)

@bdimcheff
Copy link
Contributor Author

yeah this works for me too... for some reason under kde i still get a crash, but with --pure I don't, but that might just be my fault somehow.

@bdimcheff bdimcheff closed this Jul 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants