I updated the snap and now it crashes when I attempt to open a CBR file
with the following displayed in the terminal:
(evince:16087): Gtk-WARNING **: Error loading theme icon ‘dialog-password’
for stock: Icon ‘dialog-password’ not present in theme Papirus
(evince:16087): GLib-GIO-WARNING **: Error creating IO channel for
/proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
Error registering document:
GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy
prevents this sender from sending this message to this recipient;
type=“method_call”, sender=":1.257" (uid=1000 pid=16087 comm=“evince “)
interface=“org.gnome.evince.Daemon” member=“RegisterDocument” error
name=”(unset)” requested_reply=“0” destination=“org.gnome.evince.Daemon”
(uid=1000 pid=4510 comm="/usr/lib/evince/evinced ")
I’m seeing those same warnings (except for the theme one) when opening a cbr file with the snap from the stable channel, but the file is open and rendered correctly, no crash here.
Can you confirm this is really a crash? i.e., does the evince window abruptly close when opening the file, without feedback?
Does this happen with other files (other CBRs, PDFs, …)?
It’s a crash all right. The evince window disappears. What’s worse is that subsequent attempts to run evince result in a straight crash without the evince window ever appearing and the following terminal output.
(evince:19034): Gtk-WARNING **: Error loading theme icon ‘dialog-password’ for stock: Icon ‘dialog-password’ not present in theme Papirus
**
Gtk:ERROR:/build/gtk+3.0-24RAPQ/gtk+3.0-3.22.24/./gtk/gtkrecentmanager.c:1999:get_icon_fallback: assertion failed: (retval != NULL)
Aborted
I am able to get the snap running again by doing an rm -rf on the snap/evince folder.
I’m facing the same issue with a CBZ file. Ditto for PDF.
I am running Ubuntu 16.04 with the backported gnome-3-26-1604 platform stack. Perhaps that has something to do with it?
I removed the stable snap and installed the candidate and everything (PDF, CBR) opens fine in that one. However, the same errors are still output to the terminal so that does not seem to be the reason for the stable version crashing.
Another thing, when I remove the stable snap and re-install it does not seem to download a fresh copy. Is there a way to remove the cache? I think something might be corrupted there.
I did a refresh this morning and am running evince stable (24).
On the first run, evince opens all files perfectly (PDF, CBR etc). On the second run it crashes and continues to crash till I rm -rf the snap/evince folder and force a first run situation again. Please see the terminal output below.
BTW, this was the case with the candidate as well as the previous stable too. I just hadn’t realized it till I tried using it in earnest.
–First run–
[prashant@prashant-Vostro-3558 ~ ]$ snap run evince
(evince:18177): Gtk-WARNING **: Error loading theme icon ‘dialog-password’ for stock: Icon ‘dialog-password’ not present in theme Papirus
(evince:18177): GLib-GIO-WARNING **: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
Error registering document: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type=“method_call”, sender=":1.289" (uid=1000 pid=18177 comm=“evince “) interface=“org.gnome.evince.Daemon” member=“RegisterDocument” error name=”(unset)” requested_reply=“0” destination=“org.gnome.evince.Daemon” (uid=1000 pid=14668 comm="/usr/lib/evince/evinced ")
Entity: line 1: parser error : Start tag expected, ‘<’ not found
�l7L�����
^
(evince:18177): GLib-GIO-WARNING **: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
Error registering document: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type=“method_call”, sender=":1.290" (uid=1000 pid=18319 comm="/snap/evince/current/usr/bin/evince /home/prashant") interface=“org.gnome.evince.Daemon” member=“RegisterDocument” error name="(unset)" requested_reply=“0” destination=“org.gnome.evince.Daemon” (uid=1000 pid=14668 comm="/usr/lib/evince/evinced ")
(evince:18319): Gtk-WARNING **: Error loading theme icon ‘dialog-password’ for stock: Icon ‘dialog-password’ not present in theme Papirus
—Second run–
[prashant@prashant-Vostro-3558 ~ ]$ snap run evince
(evince:18326): Gtk-WARNING **: Error loading theme icon ‘dialog-password’ for stock: Icon ‘dialog-password’ not present in theme Papirus
**
Gtk:ERROR:/build/gtk+3.0-24RAPQ/gtk+3.0-3.22.24/./gtk/gtkrecentmanager.c:1999:get_icon_fallback: assertion failed: (retval != NULL)
Aborted
[prashant@prashant-Vostro-3558 ~ ]
I can reliably reproduce the crash by installing and switching to the papirus icon theme. Switching back to another theme (ubuntu-mono-dark) “fixes” the application.
Deleting $HOME/snap/evince/current/.local/share/recently-used.xbel also makes the app start again.
I can observe the crash even when there’s only one document in the recently used, with mime type application/pdf, which suggests that GTK fails to find an icon for that mime type in the theme. However:
My bad. I typed too soon. Same issue. First run is fine. Then it crashes. I give up. The icon in question is, in fact, present in other icon themes like Adwaita & gnome but the app crashes even with those. Odd.
The dialog-password icon warning is a red herring I think.
Given that the crash happens in get_icon_fallback() in gtkrecentmanager.c, I suspect that the application fails to load a generic PDF/CBR mimetype icon that it wants to display before a thumbnail is generated for the recent file.