Xournalpp crashes immediately.
I don't have KDE nor GNOME installed in case that matters.
$ nix-build '<nixpkgs>' -A xournalpp
$ result/bin/xournalpp
** (xournalpp:2719): WARNING **: 08:08:07.696: Failed to load "colornames.ini" (/home/jluttine/.xournalpp/colornames.ini): No such file or directory
ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1108:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2636:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2636:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2636:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_dmix.c:1108:(snd_pcm_dmix_open) unable to open slave
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
**
Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Icon 'image-missing' not present in theme breeze (gtk-icon-theme-error-quark, 0)
** (xournalpp:2719): WARNING **: 08:08:07.827: [Crash Handler] Crashed with signal 6
** (xournalpp:2719): WARNING **: 08:08:07.832: [Crash Handler] Wrote crash log to: /home/jluttine/.xournalpp/errorlogs/errorlog.20190624-080807.log
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
sh: addr2line: command not found
** (xournalpp:2719): WARNING **: 08:08:07.942: Trying to emergency save the current open document…
** (xournalpp:2719): WARNING **: 08:08:07.943: Successfully saved document to "/home/jluttine/.xournalpp/emergencysave.xopp"
Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.
]$ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
- host os: `Linux 4.19.47, NixOS, 19.09.git.4ab1c14 (Loris)`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.2.2`
- nixpkgs: `/etc/nixpkgs`
Do you have an icon theme installed?
I don't know, so maybe not..
Installing gnome3.adwaita-icon-theme as per #63089 fixed it for me (but I tried hicolor-icon-theme first, which didn't). Though crashing is by no means a good or descriptive way to tell the user to install icons. I wonder if there is a fallback icon (not an icon set, just a single one) we could bundle with things to stop this
This should be fixed IMO. It is very against the nix ideology to require one package to be installed for another to function.
cc @andrew-d @sikmir
I'd be happy to take a fix to xournalpp here, but I'm not quite sure what the best approach is. My understanding is that GTK+ itself is what's crashing if the "image-missing" icon isn't found - see here.
As I understand it, we have the following options:
xournalpp with some icon theme; I'm not sure how this interacts with allowing users to still customize things themselves.xournalpp or other utilities and throw an error; I could probably write a wrapper that searched XDG_ICON_DIRS, but I'm not 100% sure this works, and it feels too hacky.image-missing.png image?I haven't had the chance to test it, but if anyone else wants to: here's an example of a Nix derivation for an icon theme that only contains the image-missing.png images from the Adwaita icon theme:
https://gist.github.com/andrew-d/41f2942a32b02249fac2dadf934cecec
Why isn't
Unconditionally wrap xournalpp with some icon theme; I'm not sure how this interacts with allowing users to still customize things themselves.
The obvious solution? It is still possible to set another icon theme locally (if using .gtkrc and pendants), provided it is also installed to the regarding environment?
I guess it's mostly a question of icons are large (ish) and we don't want to install unnecessary icons. I am pro the image-missing solution, provided we also document it somewhere (not sure if NixOS manual is the best place, could apply to non-NixOS nix installations, so the Nix manual).
Also, the .gtkrc is an annoying solution as it's not part of the nixos config, I guess.
@KoviRobi
I guess it's mostly a question of icons are large (ish) and we don't want to install unnecessary icons. I am pro the image-missing solution, provided we also document it somewhere (not sure if NixOS manual is the best place, could apply to non-NixOS nix installations, so the Nix manual).
This is indeed the primary reason, see the discussion in #43150.
@andrew-d
- Unconditionally wrap
xournalppwith some icon theme; I'm not sure how this interacts with allowing users to still customize things themselves.
Customization is still possible (the theme used will be still the one set in profile, defaulting to Adwaita), the closure is the main concern.
- Fix GTK+ to not crash if the icon is missing; I don't know how to do this
I talked with GTK devs on IRC a few days ago and they also said that GTK should use the image-missing from GTK and the source code looks like that is what should be happening but to no avail.
Actually, it seems to somewhat work – try running env XDG_DATA_DIRS= (nix-build -A gtk3.dev --no-out-link)/bin/gtk3-icon-browser, it will have the image-missing in the CSD.
- Maybe create an "empty" icon theme that's always linked by default and contains only the
image-missing.pngimage?
Brilliant idea. This would be an acceptable compromise, I think, until it is fixed in GTK. We should probably use fetchurl { url = "https://gitlab.gnome.org/GNOME/gtk/blob/3.24.13/gtk/icons/16x16/status/image-missing.png"; } to avoid depending on Adwaita, and add it to hicolor-icon-theme instead of new theme. Then we can add the icon theme to wrapGAppsHook.
- Try to detect this case in
xournalppor other utilities and throw an error; I could probably write a wrapper that searchedXDG_ICON_DIRS, but I'm not 100% sure this works, and it feels too hacky.
We might still want something like this to let users know they should install an icon theme. But we can worry about that once we prevent the crash.
Hello, I'm a bot and I thank you in the name of the community for opening this issue.
To help our human contributors focus on the most-relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human.
The community would appreciate your effort in checking if the issue is still valid. If it isn't, please close it.
If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me". If you'd like it to get more attention, you can ask for help by searching for maintainers and people that previously touched related code and @ mention them in a comment. You can use Git blame or GitHub's web interface on the relevant files to find them.
Lastly, you can always ask for help at our Discourse Forum or at #nixos' IRC channel.
This is still an issue.
Just in case, the same problem with MyPaint (https://github.com/NixOS/nixpkgs/pull/54677), it crashes at startup.
Most helpful comment
This should be fixed IMO. It is very against the nix ideology to require one package to be installed for another to function.
cc @andrew-d @sikmir