Nixpkgs: Atom crashes when opening the "select file" modal

Created on 6 Jul 2020  Â·  3Comments  Â·  Source: NixOS/nixpkgs

Describe the bug
Atom crashes when opening a "save file", "open file" modal with an error printed in the journal. I did a bisection and it looks like it has been introduced in e8e569ce79897885fe9f59dd164413f9b7298c4c

To Reproduce
Steps to reproduce the behavior:

  1. Open atom
  2. Create a new file
  3. Try to save file

OR

  1. Open atom
  2. File -> Add Project Folder...

Expected behavior
Modal opens.

Additional context
The error printed in the journal. There might be some noise but there is an error in libglib-2.0.so.0.6200.4 and a core dump

Jul 06 19:50:06 playa kernel: traps: atom[21060] trap int3 ip:7f9a7fe29c75 sp:7ffe01f194a0 error:0 in libglib-2.0.so.0.6200.4[7f9a7fdf0000+80000]
Jul 06 19:50:06 playa systemd[1]: Started Process Core Dump (PID 21332/UID 0).
Jul 06 19:50:06 playa xsession[2285]: /nix/store/mynp9jqx52adr2q4klxlrh1fgzwgd0j0-atom-1.42.0/bin/.atom-wrapped: line 192: 21060 Trace/breakpoint trap   (core dumped) nohup "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@" > "$ATOM_HOME/nohup.out" 2>&1
Jul 06 19:50:06 playa xsession[2285]: Fontconfig warning: "/etc/fonts/fonts.conf", line 86: unknown element "blank"
Jul 06 19:50:06 playa xsession[2285]: ** Message: 19:48:47.454: Remote error from secret service: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.secrets was not provided by any .service files
Jul 06 19:50:06 playa xsession[2285]: ** Message: 19:48:47.455: Remote error from secret service: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.secrets was not provided by any .service files
Jul 06 19:50:06 playa xsession[2285]: ** Message: 19:48:47.456: Remote error from secret service: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.secrets was not provided by any .service files
Jul 06 19:50:06 playa xsession[2285]: ** Message: 19:48:47.458: Remote error from secret service: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.secrets was not provided by any .service files
Jul 06 19:50:06 playa xsession[2285]: ** Message: 19:48:47.459: Remote error from secret service: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.secrets was not provided by any .service files
Jul 06 19:50:06 playa xsession[2285]: (atom:21060): GLib-GIO-ERROR **: 19:50:06.312: No GSettings schemas are installed on the system
Jul 06 19:50:06 playa xsession[2285]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 51831, resource id: 138412033, major code: 15 (QueryTree), minor code: 0
Jul 06 19:50:06 playa xsession[2285]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 51835, resource id: 138412033, major code: 18 (ChangeProperty), minor code: 0
Jul 06 19:50:07 playa systemd-coredump[21333]: Process 21060 (atom) of user 1000 dumped core

This is the bisection log:

git bisect start
# bad: [a1b8dae54aedcae9acc0618abc08ad9fe13fdc37] alt-ergo: 2.3.0 → 2.3.1
git bisect bad a1b8dae54aedcae9acc0618abc08ad9fe13fdc37
# good: [db75eb4257161252246ee02deaf2dd91149714f1] Merge pull request #82741 from hercules-ci/backport-20.03-80102
git bisect good db75eb4257161252246ee02deaf2dd91149714f1
# bad: [97f65b2de9c30a3376bb17f6085a74f5eddfb04c] Merge pull request #82848 from aanderse/zhf/rsyslog
git bisect bad 97f65b2de9c30a3376bb17f6085a74f5eddfb04c
# bad: [ec0923f9830bc5ce68b5067fd68ba95a7942cc06] Merge pull request #82676 from veprbl/pr/texlive_2019_final_20.03
git bisect bad ec0923f9830bc5ce68b5067fd68ba95a7942cc06
# bad: [26a5a71da51626302dd27ffccfd71dd1865fcd28] tomcat8: 8.5.42 -> 8.5.51
git bisect bad 26a5a71da51626302dd27ffccfd71dd1865fcd28
# bad: [a0adbb1bdb92561b525dfc7dd3bfff880c5d956e] libarchive: 3.4.1 -> 3.4.2
git bisect bad a0adbb1bdb92561b525dfc7dd3bfff880c5d956e
# bad: [0c3057c59dd407a5e6b3c1a1a423d544961ea922] Merge pull request #81266 from Frostman/20.03-go-1.14
git bisect bad 0c3057c59dd407a5e6b3c1a1a423d544961ea922
# good: [e378b239f6c94d0e1e49f1f9bf2646b347a205d4] grafana: switch to latest go
git bisect good e378b239f6c94d0e1e49f1f9bf2646b347a205d4
# bad: [e8e569ce79897885fe9f59dd164413f9b7298c4c] wrapGAppsHook: Fix #78803
git bisect bad e8e569ce79897885fe9f59dd164413f9b7298c4c
# good: [e78f26b977155d091345c033d807658651bbd372] Merge branch 'release-20.03' into staging-20.03
git bisect good e78f26b977155d091345c033d807658651bbd372
# first bad commit: [e8e569ce79897885fe9f59dd164413f9b7298c4c] wrapGAppsHook: Fix #78803

Notify maintainers
@worldofpeace

Metadata

  • system: "x86_64-linux"
  • host os: Linux 5.4.49, NixOS, 20.03.2447.afa9ca61924 (Markhor)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3.6
  • channels(zarel): "nixpkgs-20.09pre232692.7db146538e4"
  • channels(root): "nixos-20.03.2447.afa9ca61924"
  • nixpkgs: /home/zarel/.nix-defexpr/channels/nixpkgs

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute: atom
bug

Most helpful comment

I meant that you should check /bin/atom in the atom package.

But now I looked into it and the issue is that Atom does not use the generic builder, which all setup hooks depend on, but does its own thing:

https://github.com/NixOS/nixpkgs/blob/7403a99091311e09add64ef591d3f6503b223b46/pkgs/applications/editors/atom/default.nix#L44-L73

In particular, it does not run preFixupPhases, which is necessary for wrapGAppsHook to work.

cc Atom maintainers @offlinehacker @nequissimus @ysndr

All 3 comments

That commit caused a regression but that should have been fixed by https://github.com/NixOS/nixpkgs/commit/e544e03110063eee62ca1f1b407c4f7e0739c432

What is the content of atom/electron file? There should be gtk's gsettings-schemas in XDG_DATA_DIRS.

@jtojnar thank you for your help!

in the XDG_DATA_DIRS looks like there is no gsettings-schemas:

[zarel@playa:~/code/nixpkgs]$ echo $XDG_DATA_DIRS | tr ':' "\n" | grep -i setting

[zarel@playa:~/code/nixpkgs]$ echo $XDG_DATA_DIRS | tr ':' "\n" | grep -i schema

[zarel@playa:~/code/nixpkgs]$ echo $XDG_DATA_DIRS | tr ':' "\n" | grep -i gtk

I don't understand what is the atom/electron file you're referring to, where can I find it?

I meant that you should check /bin/atom in the atom package.

But now I looked into it and the issue is that Atom does not use the generic builder, which all setup hooks depend on, but does its own thing:

https://github.com/NixOS/nixpkgs/blob/7403a99091311e09add64ef591d3f6503b223b46/pkgs/applications/editors/atom/default.nix#L44-L73

In particular, it does not run preFixupPhases, which is necessary for wrapGAppsHook to work.

cc Atom maintainers @offlinehacker @nequissimus @ysndr

Was this page helpful?
0 / 5 - 0 ratings