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

xournalpp crashes complaining on missing icons #163107

Closed
haizaar opened this issue Mar 7, 2022 · 14 comments
Closed

xournalpp crashes complaining on missing icons #163107

haizaar opened this issue Mar 7, 2022 · 14 comments
Labels
0.kind: bug Something is broken

Comments

@haizaar
Copy link

haizaar commented Mar 7, 2022

Describe the bug

Good day. I'm on NixOS unstable with KDE/Wayland.
Trying to run xournalapp from nix-shell has the later crashing.

Steps To Reproduce

Steps to reproduce the behavior:

  1. nix-shell -p xournalpp
  2. xournalpp

Then it crashes with:

Gtk:ERROR:../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Icon 'image-missing' not present in theme Adwaita (gtk-icon-theme-error-quark, 0)
Bail out! Gtk:ERROR:../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Icon 'image-missing' not present in theme Adwaita (gtk-icon-theme-error-quark, 0)

The full error is beflow.

Expected behavior

xournalapp starting

Notify maintainers

@dtzWill @Profpatsch @siraben

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.16.0, NixOS, 22.05 (Quokka)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.5.1`
 - channels(haizaar): `""`
 - channels(root): `"nixos-22.05pre356435.7f9b6e2babf, home-manager"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Full error output:

** Message: 17:08:51.411: TEXTDOMAINDIR = (null), Platform-specific locale dir = /nix/store/h1wkxdkyn2wrzgc3cwzb24bj0sy77cbm-xournalpp-1.1.1/share/xournalpp/../locale, chosen directory = /nix/store/h1wkxdkyn2wrzgc3cwzb24bj0sy77cbm-xournalpp-1.1.1/share/xournalpp/../locale
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.front.0:CARD=0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2735:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2735:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2735:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2735:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.surround51.0:CARD=0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2735:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.surround51.0:CARD=0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2735:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.surround40.0:CARD=0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2735:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.surround51.0:CARD=0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2735:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.surround51.0:CARD=0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2735:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.surround51.0:CARD=0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2735:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.surround71.0:CARD=0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2735:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2735:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2735:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1369:(snd_func_refer) Unable to find definition 'cards.0.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2735:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2735:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2735:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2735:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2735:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2735:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2735:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
** Message: 17:08:51.635: Plugin "MigrateFontSizes" UI initialized

** (xournalpp:5726): WARNING **: 17:08:51.676: Failed to load "colornames.ini" (/home/.../.config/xournalpp/colornames.ini): No such file or directory

**
Gtk:ERROR:../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Icon 'image-missing' not present in theme Adwaita (gtk-icon-theme-error-quark, 0)
Bail out! Gtk:ERROR:../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Icon 'image-missing' not present in theme Adwaita (gtk-icon-theme-error-quark, 0)

** (xournalpp:5726): WARNING **: 17:08:51.691: [Crash Handler] Crashed with signal 6

** (xournalpp:5726): WARNING **: 17:08:51.691: [Crash Handler] Wrote crash log to: /home/.../.cache/xournalpp/errorlogs/errorlog.20220307-170851.log

** (xournalpp:5726): WARNING **: 17:08:51.815: Trying to emergency save the current open document…

** (xournalpp:5726): WARNING **: 17:08:51.816: Successfully saved document to "/home/.../.config/xournalpp/emergencysave.xopp"

@haizaar haizaar added the 0.kind: bug Something is broken label Mar 7, 2022
@haizaar
Copy link
Author

haizaar commented Mar 7, 2022

Dropping into nested nix-shell -p gnome3.adwaita-icon-theme shell didn't help. Again, I'm running KDE.

@hello-smile6
Copy link

I've had the same problem.

@jtojnar
Copy link
Member

jtojnar commented Apr 16, 2022

Can reproduce with env XDG_DATA_DIRS= $(nix-build -A xournalpp)/bin/xournalpp, works with env XDG_DATA_DIRS=$(nix-build -A gnome.adwaita-icon-theme)/share $(nix-build -A xournalpp)/bin/xournalpp.

But GTK should fallback to its built-in image-missing, not sure why it fails:

https://gitlab.gnome.org/GNOME/gtk/-/blob/a47f81804deb6f2d6dbfcac29b44f77ea17186f4/gtk/gtkiconhelper.c#L487-492

@jtojnar
Copy link
Member

jtojnar commented Apr 16, 2022

Looking at the relevant resource, it looks like it has an incorrect MIME type:

image-missing resource in GTK inspector with shared-mime-info not present in XDG_DATA_DIRS

Compared to when running in GNOME:

image-missing resource in GTK inspector with shared-mime-info and adwaita-icon-theme present in XDG_DATA_DIRS

The following also seems to work:

env XDG_DATA_DIRS=$(nix-build -A shared-mime-info)/share:$(nix-build -A gnome.adwaita-icon-theme)/share $(nix-build -A xournalpp)/bin/xournalpp

Though weirdly, just shared-mime-info fails with the same error:

Gtk:ERROR:../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Icon 'image-missing' not present in theme Adwaita (gtk-icon-theme-error-quark, 0)
Bail out! Gtk:ERROR:../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Icon 'image-missing' not present in theme Adwaita (gtk-icon-theme-error-quark, 0)

We need to trace it with gdb to find out why the error is thrown here:

https://gitlab.gnome.org/GNOME/gtk/-/blob/a47f81804deb6f2d6dbfcac29b44f77ea17186f4/gtk/gtkicontheme.c#L2355

But if you just want to get it working, I would try something like

environment.systemPackages = [
  pkgs.gnome.adwaita-icon-theme
  pkgs.shared-mime-info
];
environment.pathsToLink = [
  "/share/icons"
  "/share/mime"
];

@portothree
Copy link
Contributor

@jtojnar solution worked for me.

Anyone knows if this was raised upstream on the gtk project?

@jtojnar
Copy link
Member

jtojnar commented Aug 28, 2022

I think this is likely caused by something we are doing (e.g. compiling GLib with internal MIME implementation and the idiosyncratic package composition).

@sburris0
Copy link

This might be fixed in upcoming xournalpp releases.

@jotapesse
Copy link

Hello, this is still an issue for me! On a NixOS unstable 23.11 install with KDE Plasma. Same error as original post:

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.5.5, NixOS, 23.11 (Tapir), 23.11pre531102.fdd898f8f79e`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.17.0`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
$ xournalpp
xopp-Message: 15:37:02.273: TEXTDOMAINDIR = (null), Platform-specific locale dir = /nix/store/dn1g7biypbl60pamj5zsc4lhaq8zxggi-xournalpp-1.2.1/share/xournalpp/../locale, chosen directory = /nix/store/dn1g7biypbl60pamj5zsc4lhaq8zxggi-xournalpp-1.2.1/share/xournalpp/../locale
ALSA lib pcm_dsnoop.c:566:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:999:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2737:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2737:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2737:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_dmix.c:999:(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
xopp-Message: 15:37:02.324: Plugin "MigrateFontSizes" UI initialized

(com.github.xournalpp.xournalpp:93805): xopp-WARNING **: 15:37:02.401: No device found. Is Xournal++ running in debugger / Eclipse...?
Probably this is the reason for not finding devices!


(com.github.xournalpp.xournalpp:93805): xopp-WARNING **: 15:37:02.418: No device found. Is Xournal++ running in debugger / Eclipse...?
Probably this is the reason for not finding devices!

**
Gtk:ERROR:../gtk/gtkiconhelper.c:495:ensure_surface_for_gicon: assertion failed (error == NULL): Icon 'image-missing' not present in theme Adwaita (gtk-icon-theme-error-quark, 0)
Bail out! Gtk:ERROR:../gtk/gtkiconhelper.c:495:ensure_surface_for_gicon: assertion failed (error == NULL): Icon 'image-missing' not present in theme Adwaita (gtk-icon-theme-error-quark, 0)

(com.github.xournalpp.xournalpp:93805): xopp-WARNING **: 15:37:02.455: [Crash Handler] Crashed with signal 6

(com.github.xournalpp.xournalpp:93805): xopp-WARNING **: 15:37:02.455: [Crash Handler] Wrote crash log to: /home/joao/.cache/xournalpp/errorlogs/errorlog.20231007-153702.log
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found
sh: line 1: addr2line: command not found

(com.github.xournalpp.xournalpp:93805): xopp-WARNING **: 15:37:02.586: Trying to emergency save the current open document…

(com.github.xournalpp.xournalpp:93805): xopp-WARNING **: 15:37:02.586: Successfully saved document to "/home/joao/.config/xournalpp/emergencysave.xopp"

@truatpasteurdotfr
Copy link

[tru@nuc-nixos:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.42, NixOS, 23.05 (Stoat), 23.05beta-356385.gfedcba`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.3`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

I fixed the error:

sh: line 1: addr2line: command not found

by adding the missing binutils-2.40 package.

[tru@nuc-nixos:~]$ xournalpp
Gtk-Message: 17:18:28.812: Failed to load module "pk-gtk-module"
Gtk-Message: 17:18:28.813: Failed to load module "canberra-gtk-module"
Gtk-Message: 17:18:28.819: Failed to load module "pk-gtk-module"
Gtk-Message: 17:18:28.819: Failed to load module "canberra-gtk-module"
** Message: 17:18:28.822: TEXTDOMAINDIR = (null), Platform-specific locale dir = /nix/store/0x6zfbdcjwi3alxapllf3an5pz7my5a9-xournalpp-1.1.3/share/xournalpp/../locale, chosen directory = /nix/store/0x6zfbdcjwi3alxapllf3an5pz7my5a9-xournalpp-1.1.3/share/xournalpp/../locale
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
...
ALSA lib conf.c:5703:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2737:(snd_pcm_open_noupdate) Unknown PCM dmix
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
** Message: 17:18:28.838: Plugin "MigrateFontSizes" UI initialized

** (xournalpp:26256): WARNING **: 17:18:28.906: Failed to load "colornames.ini" (/home/tru/.config/xournalpp/colornames.ini): No such file or directory

**
Gtk:ERROR:../gtk/gtkiconhelper.c:495:ensure_surface_for_gicon: assertion failed (error == NULL): Icon 'image-missing' not present in theme gnome (gtk-icon-theme-error-quark, 0)
Bail out! Gtk:ERROR:../gtk/gtkiconhelper.c:495:ensure_surface_for_gicon: assertion failed (error == NULL): Icon 'image-missing' not present in theme gnome (gtk-icon-theme-error-quark, 0)

** (xournalpp:26256): WARNING **: 17:18:28.963: [Crash Handler] Crashed with signal 6

** (xournalpp:26256): WARNING **: 17:18:28.963: [Crash Handler] Wrote crash log to: /home/tru/.cache/xournalpp/errorlogs/errorlog.20231011-171828.log

** (xournalpp:26256): WARNING **: 17:18:29.216: Trying to emergency save the current open document…

** (xournalpp:26256): WARNING **: 17:18:29.216: Successfully saved document to "/home/tru/.config/xournalpp/emergencysave.xopp"

@jotapesse
Copy link

As refered on a related issue thread xournalpp / xournal++ crashes at startup
#63715
- it seems a workaround solution is installing a missing package gnome.adwaita-icon-theme. Although I'm using KDE Plasma so I shouldn't be requiring it.

@sikmir
Copy link
Member

sikmir commented Mar 2, 2024

Just in case #292764

@theRoboxx
Copy link

theRoboxx commented Apr 19, 2024

Still not working native on unstable for 1.2.3.
But installing gnome.adwaita-icon-theme fixed it.

Logs without the workaround:

<1> $ xournalpp
xopp-Message: 23:11:11.486: TEXTDOMAINDIR = (null), Platform-specific locale dir = /nix/store/27168p74wwjpfgfycgzzfxdswv6bsw4p-xournalpp-1.2.3/share/xournalpp/../locale, chosen directory = /nix/store/27168p74wwjpfgfycgzzfxdswv6bsw4p-xournalpp-1.2.3/share/xournalpp/../locale
ALSA lib pcm.c:2792:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2792:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2792:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:878:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:878:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:878:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:878:(find_matching_chmap) Found no matching channel map
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
xopp-Message: 23:11:11.572: Plugin "MigrateFontSizes" UI initialized
**
Gtk:ERROR:../gtk/gtkiconhelper.c:495:ensure_surface_for_gicon: assertion failed (error == NULL): Icon 'image-missing' not present in theme Adwaita (gtk-icon-theme-error-quark, 0)
Bail out! Gtk:ERROR:../gtk/gtkiconhelper.c:495:ensure_surface_for_gicon: assertion failed (error == NULL): Icon 'image-missing' not present in theme Adwaita (gtk-icon-theme-error-quark, 0)

(com.github.xournalpp.xournalpp:61362): xopp-WARNING **: 23:11:11.683: [Crash Handler] Crashed with signal 6

(com.github.xournalpp.xournalpp:61362): xopp-WARNING **: 23:11:11.684: [Crash Handler] Wrote crash log to: /home/tom/.cache/xournalpp/errorlogs/errorlog.20240419-231111.log
/nix/store/jsjfmx7r6cpyixxsg7bjl5cy3y8hw7k7-binutils-wrapper-2.41/bin/addr2line: 'xournalpp': No such file

(com.github.xournalpp.xournalpp:61362): xopp-WARNING **: 23:11:11.962: Trying to emergency save the current open document…

(com.github.xournalpp.xournalpp:61362): xopp-WARNING **: 23:11:11.962: Successfully saved document to "/home/tom/.config/xournalpp/emergencysave.xopp"

<1> $ xournalpp --version
xournalpp 1.2.3
└──libgtk: 3.24.41

@TheDelus
Copy link
Contributor

I opened #330162. Reviews are welcome.

@pbsds pbsds closed this as completed Jul 26, 2024
@heraplem
Copy link

This seems to still be happening on Darwin. Perhaps xournalpp should be marked as broken there?

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

No branches or pull requests