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

Atom crashes when opening the "select file" modal #92487

Closed
zarelit opened this issue Jul 6, 2020 · 3 comments · Fixed by #93621
Closed

Atom crashes when opening the "select file" modal #92487

zarelit opened this issue Jul 6, 2020 · 3 comments · Fixed by #93621
Labels
0.kind: bug Something is broken

Comments

@zarelit
Copy link
Member

zarelit commented Jul 6, 2020

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 e8e569c

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
@zarelit zarelit added the 0.kind: bug Something is broken label Jul 6, 2020
@jtojnar
Copy link
Member

jtojnar commented Jul 6, 2020

That commit caused a regression but that should have been fixed by e544e03

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

@zarelit
Copy link
Member Author

zarelit commented Jul 6, 2020

@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?

@jtojnar
Copy link
Member

jtojnar commented Jul 7, 2020

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:

buildCommand = ''
mkdir -p $out/usr/
ar p $src data.tar.xz | tar -C $out -xJ ./usr
sed -i -e "s|Exec=.*$|Exec=$out/bin/${pname}|" $out/usr/share/applications/${pname}.desktop
mv $out/usr/* $out/
rm -r $out/share/lintian
rm -r $out/usr/
sed -i "s/${pname})/.${pname}-wrapped)/" $out/bin/${pname}
fixupPhase
share=$out/share/${pname}
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${atomEnv.libPath}:$share" \
$share/atom
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${atomEnv.libPath}" \
$share/resources/app/apm/bin/node
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
$share/resources/app.asar.unpacked/node_modules/symbols-view/vendor/ctags-linux
dugite=$share/resources/app.asar.unpacked/node_modules/dugite
rm -f $dugite/git/bin/git
ln -s ${pkgs.git}/bin/git $dugite/git/bin/git
rm -f $dugite/git/libexec/git-core/git
ln -s ${pkgs.git}/bin/git $dugite/git/libexec/git-core/git
find $share -name "*.node" -exec patchelf --set-rpath "${atomEnv.libPath}:$share" {} \;
'';

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

cc Atom maintainers @offlinehacker @NeQuissimus @ysndr

@worldofpeace worldofpeace mentioned this issue Jul 22, 2020
10 tasks
worldofpeace added a commit to worldofpeace/nixpkgs that referenced this issue Jul 22, 2020
We rewrote the expression to use phases from genericBuilder.
NixOS#92487 (comment)
worldofpeace added a commit that referenced this issue Aug 2, 2020
worldofpeace added a commit that referenced this issue Aug 2, 2020
We rewrote the expression to use phases from genericBuilder.
#92487 (comment)

(cherry picked from commit 35cb34c)
braack pushed a commit to braack/nixpkgs that referenced this issue Oct 29, 2020
We rewrote the expression to use phases from genericBuilder.
NixOS#92487 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants