pqiv
pqiv copied to clipboard
segfault with thumbnail-preload
When I have the option thumbnail-preload=300 in my config, pqiv segfaults quickly after starting (say 0.2 seconds).
This happens also in older versions of pqiv, but it hasn't happened before upgrading my system, so it seems to be related to dependencies.
It also happens in montage mode, as soon as pqiv starts thumbnailing certain images: It tumbnails and shows pdf files just fine, but crashes when tumbnailing certain other files.
I haven't discovered yet which files cause the crash.
Could you try building pqiv from source and running it in a gdb session, please? That is, start pqiv as gdb --args ./pqiv <path-to-your-images>, type r<enter> to start it, and wait for the crash. Then type bt<enter> to produce a backtrace. You should see something like this:
#0 0x00005555555649ea in image_loader_load_single (node=0x7fffc4001fb0, called_from_main=1) at /pqiv/pqiv.c:2417
#1 0x0000555555564ee8 in initialize_image_loader () at /pqiv/pqiv.c:2803
#2 0x000055555556cb4e in initialize_gui_callback (user_data=<optimized out>) at /pqiv/pqiv.c:7270
#3 0x00007ffff74fbc1c in () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#4 0x00007ffff398b0f5 in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5 0x00007ffff398b4c0 in () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#6 0x00007ffff398b7d2 in g_main_loop_run () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#7 0x00007ffff78c2a37 in gtk_main () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#8 0x000055555556fa8b in main (argc=<optimized out>, argv=<optimized out>) at /pqiv/pqiv.c:8062
Search for the first line containing node. Take the number on the left, in this case 0, and type f 0<enter>. Then type p ((file_t*)node->data)->display_name. This should print the name of the file for which pqiv crashes.
If you manage to find the offending file this way it'd be great if you can share it. In any case, I'm interested in the backtrace (bt output).
I tried to do as you said, but NixOS builds without debugging symbols by default.
When I try to build with them, I get:
replacing old 'pqiv-2.10.4'
installing 'pqiv-2.10.4'
these derivations will be built:
/nix/store/5pyj5pws5f5yhr9simk9h56jazbmbspn-pqiv-2.10.4.drv
these paths will be fetched (0.11 MiB download, 0.54 MiB unpacked):
/nix/store/mnhmhqcbkgn2ysd3jrlfv7irinq90svc-source
copying path '/nix/store/mnhmhqcbkgn2ysd3jrlfv7irinq90svc-source' from 'https://cache.nixos.org'...
building '/nix/store/5pyj5pws5f5yhr9simk9h56jazbmbspn-pqiv-2.10.4.drv' on 'ssh://root@buildbox'...
warning: 'http://hydra.earthtools.ca/jobset/arm/nixpkgs-arm-unstable/channel/latest' does not appear to be a binary cache
copying path '/nix/store/mnhmhqcbkgn2ysd3jrlfv7irinq90svc-source' from 'https://cache.nixos.org'...
unpacking sources
unpacking source archive /nix/store/mnhmhqcbkgn2ysd3jrlfv7irinq90svc-source
source root is source
patching sources
patching script interpreter paths in .
./configure: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/r47p5pzx52m3n34vdgqpk5rvqgm0m24m-bash-4.4-p23/bin/bash"
configuring
configure flags: --disable-dependency-tracking --prefix=/nix/store/7pvaxiq1g8xz6gs2v94560w81v8xid0b-pqiv-2.10.4 --bindir=/nix/store/7pvaxiq1g8xz6gs2v94560w81v8xid0b-pqiv-2.10.4/bin --sbindir=/nix/store/7pvaxiq1g8xz6gs2v94560w81v8xid0b-pqiv-2.10.4/sbin --includedir=/nix/store/7pvaxiq1g8xz6gs2v94560w81v8xid0b-pqiv-2.10.4/include --oldincludedir=/nix/store/7pvaxiq1g8xz6gs2v94560w81v8xid0b-pqiv-2.10.4/include --mandir=/nix/store/7pvaxiq1g8xz6gs2v94560w81v8xid0b-pqiv-2.10.4/share/man --infodir=/nix/store/7pvaxiq1g8xz6gs2v94560w81v8xid0b-pqiv-2.10.4/share/info --docdir=/nix/store/7pvaxiq1g8xz6gs2v94560w81v8xid0b-pqiv-2.10.4/share/doc/ --libdir=/nix/store/7pvaxiq1g8xz6gs2v94560w81v8xid0b-pqiv-2.10.4/lib --libexecdir=/nix/store/7pvaxiq1g8xz6gs2v94560w81v8xid0b-pqiv-2.10.4/libexec --localedir=/nix/store/7pvaxiq1g8xz6gs2v94560w81v8xid0b-pqiv-2.10.4/share/locale
autoconf option --disable-dependency-tracking ignored
Unknown option: --bindir=/nix/store/7pvaxiq1g8xz6gs2v94560w81v8xid0b-pqiv-2.10.4/bin
pqiv configuration
general options:
--prefix=.. Set the prefix for installed files [/usr]
--destdir=.. Set the destination prefix for "make install" [/]
--libdir=.. Set the directory for shared libraries [$PREFIX/lib]
--gtk-version=2 Use GTK+-2.0 even if GTK+-3.0 is available
--cross=.. Set a cross-compiler prefix (e.g. `i686-pc-mingw32-')
Some of the usual autotools options are supported as well for advanced users.
See the source code of the configure script.
options to select pqiv's backends:
--backends=.. Select which backends to include in pqiv
(autodetermined by default)
Available:
archive (generic archive file support),
archive_cbx (*.cb? comic book archive support),
libav (Video support, works with ffmpeg as well),
gdkpixbuf (images),
poppler (PDF),
spectre (PS/EPS),
wand (ImageMagick, various formats)
webp (WebP format)
--with[out]-<backend> Alternative syntax for backend selection. Non-specified backends are
autodetermined.
--backends-build=.. Either `shared' to compile the backends as shared libraries,
or `static' to compile them into pqiv. `shared' is only of use if you
plan to package pqiv and want to get rid of the run-time dependencies,
so this defaults to `static'.
options to remove features from pqiv:
--without-montage Do not include support for a thumbnail overview
--without-actions
Do not include support for configurable key/mouse bindings and actions
--without-external-commands
Do not include support for calling external programs
--without-jump-dialog Do not build with -j support
--without-info-text Build without support for the info text
builder for '/nix/store/5pyj5pws5f5yhr9simk9h56jazbmbspn-pqiv-2.10.4.drv' failed with exit code 1
error: build of '/nix/store/5pyj5pws5f5yhr9simk9h56jazbmbspn-pqiv-2.10.4.drv' on 'ssh://root@buildbox' failed: builder for '/nix/store/5pyj5pws5f5yhr9simk9h56jazbmbspn-pqiv-2.10.4.drv' failed with exit code 1
builder for '/nix/store/5pyj5pws5f5yhr9simk9h56jazbmbspn-pqiv-2.10.4.drv' failed with exit code 1
error: build of '/nix/store/5pyj5pws5f5yhr9simk9h56jazbmbspn-pqiv-2.10.4.drv' failed
This might very well be a NixOS issue, but I'm not sure how to proceed.
The system assumes pqiv's configure script is autotools-based, which it is not.
I have pushed a commit that improves the compatibility with autotools. Try bumping the git revision the package uses to the lastest master one and do another debug build.
If that does not work, the easiest thing to do would be to attempt to build manually, without using the package manager. Alternatively patch the nix package to call configure without any additional parameters it doesn't normally use. (I think the way to do this that requires the least knowledge of internals would be to try to apply a patch to pqiv's configure script to make it ignore any unknown options before calling configure.)
Or if you'd like I can send you a binary to use and we can produce a core dump that you can then send me. In that case I could do the debugging for you. Note however that this'd mean that you'd be trusting my binary and that parts of your environment would bleed into the core file, too - this option is definitely somewhat privacy intrusive. (Here's the binary if you want to pursue that path: pqiv-p [packed using xz]; it's huge because it's an unstripped static build of pqiv and all of its dependencies. Run ulimit -c unlimited before starting it and after the crash you should see a new file core that is huge, too. That'd be the file I need.)
Your binary doesn't crash here. The one I compiled from latest master does, but doesn't contain debugging symbols. I tried to follow your instructions nonetheless.
Search for the first line containing node.
There isn't one.
Here's the output of gdb:
gdb --args pqiv ~/Downloads/*
GNU gdb (GDB) 8.1.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from pqiv...(no debugging symbols found)...done.
(gdb) r
Starting program: /nix/store/w5b9rl7in77ynr1fi0qmswarbbskdvrg-user-environment/bin/pqiv
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libthread_db.so.1".
warning: File "/nix/store/3v5r7fkrbkw2qajadvjbf6p6qriz9p1i-gcc-7.3.0-lib/lib/libstdc++.so.6.0.24-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
add-auto-load-safe-path /nix/store/3v5r7fkrbkw2qajadvjbf6p6qriz9p1i-gcc-7.3.0-lib/lib/libstdc++.so.6.0.24-gdb.py
line to your configuration file "/home/bart/.gdbinit".
To completely disable this security protection add
set auto-load safe-path /
line to your configuration file "/home/bart/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual. E.g., run from the shell:
info "(gdb)Auto-loading safe path"
[New Thread 0x7fffd549d700 (LWP 3491)]
[New Thread 0x7fffd4c9c700 (LWP 3492)]
[New Thread 0x7fffcffff700 (LWP 3493)]
[New Thread 0x7fffcf7fe700 (LWP 3494)]
[New Thread 0x7fffcdd9a700 (LWP 3495)]
Thread 1 "pqiv" received signal SIGSEGV, Segmentation fault.
0x00007fffe9f75520 in cmsGetColorSpace () from /nix/store/klfw8kyvxrn87cjc4b57p8r5lafz7yjc-ghostscript-9.25/lib/libgs.so.9
(gdb) bt
#0 0x00007fffe9f75520 in cmsGetColorSpace () from /nix/store/klfw8kyvxrn87cjc4b57p8r5lafz7yjc-ghostscript-9.25/lib/libgs.so.9
#1 0x00007fffe5f23710 in GfxICCBasedColorSpace::parse(Array*, OutputDev*, GfxState*, int) () from /nix/store/abginyh77kvyrdy4bnszaci6pjaj3lcz-poppler-glib-0.67.0/lib/libpoppler.so.78
#2 0x00007fffe5f2315b in GfxColorSpace::parse(GfxResources*, Object*, OutputDev*, GfxState*, int) () from /nix/store/abginyh77kvyrdy4bnszaci6pjaj3lcz-poppler-glib-0.67.0/lib/libpoppler.so.78
#3 0x00007fffe5ef5f2f in Gfx::opSetFillColorSpace(Object*, int) () from /nix/store/abginyh77kvyrdy4bnszaci6pjaj3lcz-poppler-glib-0.67.0/lib/libpoppler.so.78
#4 0x00007fffe5f0014f in Gfx::go(bool) () from /nix/store/abginyh77kvyrdy4bnszaci6pjaj3lcz-poppler-glib-0.67.0/lib/libpoppler.so.78
#5 0x00007fffe5f0060b in Gfx::display(Object*, bool) () from /nix/store/abginyh77kvyrdy4bnszaci6pjaj3lcz-poppler-glib-0.67.0/lib/libpoppler.so.78
#6 0x00007fffe5f00a22 in Gfx::drawForm(Object*, Dict*, double*, double*, bool, bool, GfxColorSpace*, bool, bool, bool, Function*, GfxColor*) ()
from /nix/store/abginyh77kvyrdy4bnszaci6pjaj3lcz-poppler-glib-0.67.0/lib/libpoppler.so.78
#7 0x00007fffe5f02f75 in Gfx::doForm(Object*) () from /nix/store/abginyh77kvyrdy4bnszaci6pjaj3lcz-poppler-glib-0.67.0/lib/libpoppler.so.78
#8 0x00007fffe5f08310 in Gfx::opXObject(Object*, int) () from /nix/store/abginyh77kvyrdy4bnszaci6pjaj3lcz-poppler-glib-0.67.0/lib/libpoppler.so.78
#9 0x00007fffe5f0014f in Gfx::go(bool) () from /nix/store/abginyh77kvyrdy4bnszaci6pjaj3lcz-poppler-glib-0.67.0/lib/libpoppler.so.78
#10 0x00007fffe5f0060b in Gfx::display(Object*, bool) () from /nix/store/abginyh77kvyrdy4bnszaci6pjaj3lcz-poppler-glib-0.67.0/lib/libpoppler.so.78
#11 0x00007fffe5f4f59b in Page::displaySlice(OutputDev*, double, double, int, bool, bool, int, int, int, int, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) ()
from /nix/store/abginyh77kvyrdy4bnszaci6pjaj3lcz-poppler-glib-0.67.0/lib/libpoppler.so.78
#12 0x00007ffff51c41ee in _poppler_page_render(_PopplerPage*, _cairo*, bool, PopplerPrintFlags) () from /nix/store/abginyh77kvyrdy4bnszaci6pjaj3lcz-poppler-glib-0.67.0/lib/libpoppler-glib.so.8
#13 0x000000000040fefa in draw_current_image_to_context ()
#14 0x0000000000410187 in get_scaled_image_surface_for_current_image ()
#15 0x0000000000414a68 in window_draw_callback ()
#16 0x00007ffff770621b in _gtk_marshal_BOOLEAN__BOXED () from /nix/store/ic1lqpfjfs0m4b9pp5ms1ki7y9c1gdb9-gtk+3-3.22.30/lib/libgtk-3.so.0
#17 0x00007ffff784afcf in gtk_widget_draw_marshaller () from /nix/store/ic1lqpfjfs0m4b9pp5ms1ki7y9c1gdb9-gtk+3-3.22.30/lib/libgtk-3.so.0
#18 0x00007ffff473ca7d in g_closure_invoke () from /nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/libgobject-2.0.so.0
#19 0x00007ffff474f80e in signal_emit_unlocked_R () from /nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/libgobject-2.0.so.0
#20 0x00007ffff475785f in g_signal_emit_valist () from /nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/libgobject-2.0.so.0
#21 0x00007ffff47588df in g_signal_emit () from /nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/libgobject-2.0.so.0
#22 0x00007ffff7857a6a in gtk_widget_draw_internal () from /nix/store/ic1lqpfjfs0m4b9pp5ms1ki7y9c1gdb9-gtk+3-3.22.30/lib/libgtk-3.so.0
#23 0x00007ffff7860918 in gtk_widget_render () from /nix/store/ic1lqpfjfs0m4b9pp5ms1ki7y9c1gdb9-gtk+3-3.22.30/lib/libgtk-3.so.0
#24 0x00007ffff7705279 in gtk_main_do_event () from /nix/store/ic1lqpfjfs0m4b9pp5ms1ki7y9c1gdb9-gtk+3-3.22.30/lib/libgtk-3.so.0
#25 0x00007ffff6ff1275 in _gdk_event_emit () from /nix/store/ic1lqpfjfs0m4b9pp5ms1ki7y9c1gdb9-gtk+3-3.22.30/lib/libgdk-3.so.0
#26 0x00007ffff70012e5 in _gdk_window_process_updates_recurse_helper () from /nix/store/ic1lqpfjfs0m4b9pp5ms1ki7y9c1gdb9-gtk+3-3.22.30/lib/libgdk-3.so.0
#27 0x00007ffff70024e6 in gdk_window_process_updates_internal () from /nix/store/ic1lqpfjfs0m4b9pp5ms1ki7y9c1gdb9-gtk+3-3.22.30/lib/libgdk-3.so.0
#28 0x00007ffff70026e0 in gdk_window_process_updates_with_mode () from /nix/store/ic1lqpfjfs0m4b9pp5ms1ki7y9c1gdb9-gtk+3-3.22.30/lib/libgdk-3.so.0
#29 0x00007ffff473ca7d in g_closure_invoke () from /nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/libgobject-2.0.so.0
#30 0x00007ffff474f80e in signal_emit_unlocked_R () from /nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/libgobject-2.0.so.0
#31 0x00007ffff4757ec5 in g_signal_emit_valist () from /nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/libgobject-2.0.so.0
#32 0x00007ffff47588df in g_signal_emit () from /nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/libgobject-2.0.so.0
#33 0x00007ffff6ffa5d9 in gdk_frame_clock_paint_idle () from /nix/store/ic1lqpfjfs0m4b9pp5ms1ki7y9c1gdb9-gtk+3-3.22.30/lib/libgdk-3.so.0
#34 0x00007ffff6fe5ba0 in gdk_threads_dispatch () from /nix/store/ic1lqpfjfs0m4b9pp5ms1ki7y9c1gdb9-gtk+3-3.22.30/lib/libgdk-3.so.0
#35 0x00007ffff4463833 in g_timeout_dispatch () from /nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/libglib-2.0.so.0
#36 0x00007ffff4462db5 in g_main_context_dispatch () from /nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/libglib-2.0.so.0
#37 0x00007ffff4463180 in g_main_context_iterate.isra () from /nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/libglib-2.0.so.0
#38 0x00007ffff4463492 in g_main_loop_run () from /nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/libglib-2.0.so.0
#39 0x00007ffff77044a5 in gtk_main () from /nix/store/ic1lqpfjfs0m4b9pp5ms1ki7y9c1gdb9-gtk+3-3.22.30/lib/libgtk-3.so.0
#40 0x000000000040c261 in main ()
Let me know if there's anything else I can do.
That does help :-) So the bug is for sure related to PDF files, and it only affects you with specific versions of pqiv's dependencies - my binary is built from the same revision, with these dependency versions. The libpoppler version is probably most relevant (yours 0.67, mine 0.71). A google search for "cmsGetColorSpace SIGSEGV" reveals that this is a known crash signature, in particular most times related to thumbnailing in other contexts, too, but was supposedly fixed in Poppler 0.50. Looking at the diff between 0.67 and 0.71 they did change something in the function that calls the crashing function, but it doesn't look directly related.
Further ideas to narrow it down:
- Can you manage to reproduce the crash if you only load PDF files?
- Can you manage to reproduce the crash if you disable thumbnail preloading? (
--thumbnail-preload=0) - There is a known bug with cms-related functions: Poppler (the PDF component) uses a different major version of littlecms than Spectre (the Postscript component), and when both are compiled in, there's crashes. The configure script mitigates this by enforcing the
--backends-build=sharedflag on affected systems, but maybe autodetection is broken. Long story short, try compiling with this option. (TheconfigureFlagsvariable controls what's passed to configure, just add this parameter.)
With just pdf's I get a different crash:
gdb --args pqiv *
GNU gdb (GDB) 8.1.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from pqiv...(no debugging symbols found)...done.
(gdb) r
Starting program: /nix/store/w5b9rl7in77ynr1fi0qmswarbbskdvrg-user-environment/bin/pqiv
same pdf's as before
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libthread_db.so.1".
warning: File "/nix/store/3v5r7fkrbkw2qajadvjbf6p6qriz9p1i-gcc-7.3.0-lib/lib/libstdc++.so.6.0.24-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
add-auto-load-safe-path /nix/store/3v5r7fkrbkw2qajadvjbf6p6qriz9p1i-gcc-7.3.0-lib/lib/libstdc++.so.6.0.24-gdb.py
line to your configuration file "/home/bart/.gdbinit".
To completely disable this security protection add
set auto-load safe-path /
line to your configuration file "/home/bart/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual. E.g., run from the shell:
info "(gdb)Auto-loading safe path"
[New Thread 0x7fffd549d700 (LWP 21836)]
[New Thread 0x7fffd4c9c700 (LWP 21837)]
[New Thread 0x7fffcffff700 (LWP 21838)]
[New Thread 0x7fffcf7fe700 (LWP 21839)]
[New Thread 0x7fffcd54f700 (LWP 21840)]
double free or corruption (out)
Thread 6 "image-loader" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffcd54f700 (LWP 21840)]
0x00007ffff1d37be0 in raise () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
(gdb) bt
#0 0x00007ffff1d37be0 in raise () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
#1 0x00007ffff1d38dc1 in abort () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
#2 0x00007ffff1d792ac in __libc_message ()
from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
#3 0x00007ffff1d7f49a in malloc_printerr ()
from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
#4 0x00007ffff1d803e0 in _int_free () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
#5 0x00007fffe9f75f53 in cmsCloseProfile ()
from /nix/store/klfw8kyvxrn87cjc4b57p8r5lafz7yjc-ghostscript-9.25/lib/libgs.so.9
#6 0x00007fffe5ef5a63 in Gfx::initDisplayProfile() ()
from /nix/store/abginyh77kvyrdy4bnszaci6pjaj3lcz-poppler-glib-0.67.0/lib/libpoppler.so.78
#7 0x00007fffe5f4f2a6 in Page::createGfx(OutputDev*, double, double, int, bool, bool, int, int, int, int, bool, bool (*)(void*), void*, XRef*) ()
from /nix/store/abginyh77kvyrdy4bnszaci6pjaj3lcz-poppler-glib-0.67.0/lib/libpoppler.so.78
#8 0x00007fffe5f4f53d in Page::displaySlice(OutputDev*, double, double, int, bool, bool, int, int, int, int, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) ()
from /nix/store/abginyh77kvyrdy4bnszaci6pjaj3lcz-poppler-glib-0.67.0/lib/libpoppler.so.78
#9 0x00007ffff51c41ee in _poppler_page_render(_PopplerPage*, _cairo*, bool, PopplerPrintFlags) ()
from /nix/store/abginyh77kvyrdy4bnszaci6pjaj3lcz-poppler-glib-0.67.0/lib/libpoppler-glib.so.8
#10 0x0000000000413c1d in image_generate_prerendered_view ()
#11 0x0000000000413e57 in image_loader_thread ()
#12 0x00007ffff448aac5 in g_thread_proxy ()
from /nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/libglib-2.0.so.0
#13 0x00007fffeb8395a7 in start_thread ()
from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#14 0x00007ffff1df522f in clone () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
Without thumbnail preloading it's the same.
With shared backends I get:
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libthread_db.so.1".
warning: File "/nix/store/3v5r7fkrbkw2qajadvjbf6p6qriz9p1i-gcc-7.3.0-lib/lib/libstdc++.so.6.0.24-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
add-auto-load-safe-path /nix/store/3v5r7fkrbkw2qajadvjbf6p6qriz9p1i-gcc-7.3.0-lib/lib/libstdc++.so.6.0.24-gdb.py
line to your configuration file "/home/bart/.gdbinit".
To completely disable this security protection add
set auto-load safe-path /
line to your configuration file "/home/bart/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual. E.g., run from the shell:
info "(gdb)Auto-loading safe path"
[New Thread 0x7fffd549d700 (LWP 6070)]
[New Thread 0x7fffd4c9c700 (LWP 6071)]
[New Thread 0x7fffcffff700 (LWP 6072)]
[New Thread 0x7fffcf7fe700 (LWP 6073)]
[New Thread 0x7fffcdd9a700 (LWP 6074)]
Thread 6 "image-loader" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffcdd9a700 (LWP 6074)]
0x00007fffe9f75520 in cmsGetColorSpace ()
from /nix/store/klfw8kyvxrn87cjc4b57p8r5lafz7yjc-ghostscript-9.25/lib/libgs.so.9
(gdb) bt
#0 0x00007fffe9f75520 in cmsGetColorSpace ()
from /nix/store/klfw8kyvxrn87cjc4b57p8r5lafz7yjc-ghostscript-9.25/lib/libgs.so.9
#1 0x00007fffe5f23710 in GfxICCBasedColorSpace::parse(Array*, OutputDev*, GfxState*, int) ()
from /nix/store/smanandkbidik0cbpcm8xnp3fgsbri8r-poppler-glib-0.67.0/lib/libpoppler.so.78
#2 0x00007fffe5f2315b in GfxColorSpace::parse(GfxResources*, Object*, OutputDev*, GfxState*, int) ()
from /nix/store/smanandkbidik0cbpcm8xnp3fgsbri8r-poppler-glib-0.67.0/lib/libpoppler.so.78
#3 0x00007fffe5ef5f2f in Gfx::opSetFillColorSpace(Object*, int) ()
from /nix/store/smanandkbidik0cbpcm8xnp3fgsbri8r-poppler-glib-0.67.0/lib/libpoppler.so.78
#4 0x00007fffe5f0014f in Gfx::go(bool) ()
from /nix/store/smanandkbidik0cbpcm8xnp3fgsbri8r-poppler-glib-0.67.0/lib/libpoppler.so.78
#5 0x00007fffe5f0060b in Gfx::display(Object*, bool) ()
from /nix/store/smanandkbidik0cbpcm8xnp3fgsbri8r-poppler-glib-0.67.0/lib/libpoppler.so.78
#6 0x00007fffe5f00a22 in Gfx::drawForm(Object*, Dict*, double*, double*, bool, bool, GfxColorSpace*, bool, bool, bool, Function*, GfxColor*) ()
from /nix/store/smanandkbidik0cbpcm8xnp3fgsbri8r-poppler-glib-0.67.0/lib/libpoppler.so.78
#7 0x00007fffe5f02f75 in Gfx::doForm(Object*) ()
from /nix/store/smanandkbidik0cbpcm8xnp3fgsbri8r-poppler-glib-0.67.0/lib/libpoppler.so.78
#8 0x00007fffe5f08310 in Gfx::opXObject(Object*, int) ()
from /nix/store/smanandkbidik0cbpcm8xnp3fgsbri8r-poppler-glib-0.67.0/lib/libpoppler.so.78
#9 0x00007fffe5f0014f in Gfx::go(bool) ()
from /nix/store/smanandkbidik0cbpcm8xnp3fgsbri8r-poppler-glib-0.67.0/lib/libpoppler.so.78
#10 0x00007fffe5f0060b in Gfx::display(Object*, bool) ()
from /nix/store/smanandkbidik0cbpcm8xnp3fgsbri8r-poppler-glib-0.67.0/lib/libpoppler.so.78
#11 0x00007fffe5f4f59b in Page::displaySlice(OutputDev*, double, double, int, bool, bool, int, int, int, int, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) ()
from /nix/store/smanandkbidik0cbpcm8xnp3fgsbri8r-poppler-glib-0.67.0/lib/libpoppler.so.78
#12 0x00007ffff51c41ee in _poppler_page_render(_PopplerPage*, _cairo*, bool, PopplerPrintFlags) ()
from /nix/store/smanandkbidik0cbpcm8xnp3fgsbri8r-poppler-glib-0.67.0/lib/libpoppler-glib.so.8
#13 0x000000000040e539 in image_loader_create_thumbnail ()
#14 0x0000000000413fee in image_loader_thread ()
#15 0x00007ffff448aac5 in g_thread_proxy ()
from /nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/libglib-2.0.so.0
#16 0x00007fffeb8395a7 in start_thread ()
from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#17 0x00007ffff1df522f in clone () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
Thanks again. Right now this looks as if it's really the poppler dependency and not pqiv which is at fault. Final two things to try to make me feel confident to point fingers at poppler would be:
- Does this happen, too, if in addition to disabling thumbnail preloading you add
--low-memory? (It should.) - Can you reproduce the crash in another poppler-gtk application, e.g. evince?
For the latter, here's an idea for how you could test that easily (make sure the thumbnail side panel is enabled in evince for this):
find -iname "*.pdf" | while read FN; do evince "$FN" & PID=$!; sleep 10; kill -0 $PID || echo "Culprit found: $^C"; kill $PID; done
And if you find the windows popping up annoying, just run Xephyr :1 & and export DISPLAY=:1 before and then the evince windows will be redirected into the Xephyr session.
With ''--low-memory'' I get:
Thread 1 "pqiv" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? (
)
(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x00007fffe9f75ec6 in cmsCloseProfile ()
from /nix/store/klfw8kyvxrn87cjc4b57p8r5lafz7yjc-ghostscript-9.25/lib/libgs.so.9
#2 0x00007fffe5ef5a63 in Gfx::initDisplayProfile() ()
from /nix/store/smanandkbidik0cbpcm8xnp3fgsbri8r-poppler-glib-0.67.0/lib/libpoppler.so.78
#3 0x00007fffe5f4f2a6 in Page::createGfx(OutputDev*, double, double, int, bool, bool, int, int, int, int, bool, bool (*)(void*), void*, XRef*) ()
from /nix/store/smanandkbidik0cbpcm8xnp3fgsbri8r-poppler-glib-0.67.0/lib/libpoppler.so.78
#4 0x00007fffe5f4f53d in Page::displaySlice(OutputDev*, double, double, int, bool, bool, int, int, int, int, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) ()
from /nix/store/smanandkbidik0cbpcm8xnp3fgsbri8r-poppler-glib-0.67.0/lib/libpoppler.so.78
#5 0x00007ffff51c41ee in _poppler_page_render(_PopplerPage*, _cairo*, bool, PopplerPrintFlags) ()
from /nix/store/smanandkbidik0cbpcm8xnp3fgsbri8r-poppler-glib-0.67.0/lib/libpoppler-glib.so.8
#6 0x000000000040fefa in draw_current_image_to_context ()
#7 0x0000000000414b67 in window_draw_callback ()
#8 0x00007ffff770621b in _gtk_marshal_BOOLEAN__BOXED ()
from /nix/store/ic1lqpfjfs0m4b9pp5ms1ki7y9c1gdb9-gtk+3-3.22.30/lib/libgtk-3.so.0
#9 0x00007ffff784afcf in gtk_widget_draw_marshaller ()
from /nix/store/ic1lqpfjfs0m4b9pp5ms1ki7y9c1gdb9-gtk+3-3.22.30/lib/libgtk-3.so.0
#10 0x00007ffff473ca7d in g_closure_invoke ()
from /nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/libgobject-2.0.so.0
#11 0x00007ffff474f80e in signal_emit_unlocked_R ()
from /nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/libgobject-2.0.so.0
#12 0x00007ffff475785f in g_signal_emit_valist ()
from /nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/libgobject-2.0.so.0
#13 0x00007ffff47588df in g_signal_emit ()
from /nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/libgobject-2.0.so.0
#14 0x00007ffff7857a6a in gtk_widget_draw_internal ()
from /nix/store/ic1lqpfjfs0m4b9pp5ms1ki7y9c1gdb9-gtk+3-3.22.30/lib/libgtk-3.so.0
#15 0x00007ffff7860918 in gtk_widget_render ()
from /nix/store/ic1lqpfjfs0m4b9pp5ms1ki7y9c1gdb9-gtk+3-3.22.30/lib/libgtk-3.so.0
#16 0x00007ffff7705279 in gtk_main_do_event ()
from /nix/store/ic1lqpfjfs0m4b9pp5ms1ki7y9c1gdb9-gtk+3-3.22.30/lib/libgtk-3.so.0
#17 0x00007ffff6ff1275 in _gdk_event_emit ()
from /nix/store/ic1lqpfjfs0m4b9pp5ms1ki7y9c1gdb9-gtk+3-3.22.30/lib/libgdk-3.so.0
#18 0x00007ffff70012e5 in _gdk_window_process_updates_recurse_helper ()
from /nix/store/ic1lqpfjfs0m4b9pp5ms1ki7y9c1gdb9-gtk+3-3.22.30/lib/libgdk-3.so.0
#19 0x00007ffff70024e6 in gdk_window_process_updates_internal ()
from /nix/store/ic1lqpfjfs0m4b9pp5ms1ki7y9c1gdb9-gtk+3-3.22.30/lib/libgdk-3.so.0
#20 0x00007ffff70026e0 in gdk_window_process_updates_with_mode ()
from /nix/store/ic1lqpfjfs0m4b9pp5ms1ki7y9c1gdb9-gtk+3-3.22.30/lib/libgdk-3.so.0
#21 0x00007ffff473ca7d in g_closure_invoke ()
from /nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/libgobject-2.0.so.0
#22 0x00007ffff474f80e in signal_emit_unlocked_R ()
from /nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/libgobject-2.0.so.0
#23 0x00007ffff4757ec5 in g_signal_emit_valist ()
from /nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/libgobject-2.0.so.0
#24 0x00007ffff47588df in g_signal_emit ()
from /nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/libgobject-2.0.so.0
#25 0x00007ffff6ffa5d9 in gdk_frame_clock_paint_idle ()
from /nix/store/ic1lqpfjfs0m4b9pp5ms1ki7y9c1gdb9-gtk+3-3.22.30/lib/libgdk-3.so.0
#26 0x00007ffff6fe5ba0 in gdk_threads_dispatch ()
from /nix/store/ic1lqpfjfs0m4b9pp5ms1ki7y9c1gdb9-gtk+3-3.22.30/lib/libgdk-3.so.0
#27 0x00007ffff4463833 in g_timeout_dispatch ()
from /nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/libglib-2.0.so.0
#28 0x00007ffff4462db5 in g_main_context_dispatch ()
---Type <return> to continue, or q <return> to quit---
from /nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/libglib-2.0.so.0
#29 0x00007ffff4463180 in g_main_context_iterate.isra ()
from /nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/libglib-2.0.so.0
#30 0x00007ffff4463492 in g_main_loop_run ()
from /nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/libglib-2.0.so.0
#31 0x00007ffff77044a5 in gtk_main ()
from /nix/store/ic1lqpfjfs0m4b9pp5ms1ki7y9c1gdb9-gtk+3-3.22.30/lib/libgtk-3.so.0
#32 0x000000000040c261 in main ()
Your evince command prints:
find -iname "*.pdf" | while read FN; do evince "$FN" & PID=$!; sleep 10; kill -0 $PID || echo "Culprit found: $^C"; kill $PID; done
(evince:13773): Gtk-WARNING **: 15:16:43.772: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:43.772: Negative content width -23 (allocation 1, extents 12x12) while allocating gadget (node label, owner GtkLabel)
(evince:13773): Gtk-WARNING **: 15:16:43.779: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:43.779: Negative content width -23 (allocation 1, extents 12x12) while allocating gadget (node label, owner GtkLabel)
(evince:13773): Gtk-WARNING **: 15:16:43.793: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:43.809: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:43.826: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:43.841: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:43.859: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:43.875: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:43.892: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:43.908: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:43.926: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:43.942: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:43.958: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:45.247: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:45.247: Negative content width -23 (allocation 1, extents 12x12) while allocating gadget (node label, owner GtkLabel)
(evince:13773): Gtk-WARNING **: 15:16:45.273: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:45.301: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:45.327: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:45.355: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:45.380: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:45.405: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:45.432: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:45.458: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:45.475: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:45.511: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:45.511: Negative content width -23 (allocation 1, extents 12x12) while allocating gadget (node label, owner GtkLabel)
(evince:13773): Gtk-WARNING **: 15:16:45.541: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:45.570: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:45.600: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:45.634: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:45.662: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:45.692: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:45.715: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:45.730: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13773): Gtk-WARNING **: 15:16:48.649: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
^[[20~
(evince:13783): Gtk-WARNING **: 15:16:53.783: gtk_widget_size_allocate(): attempt to allocate widget with width -266 and height 17
(evince:13783): Gtk-WARNING **: 15:16:53.783: Negative content width -23 (allocation 1, extents 12x12) while allocating gadget (node label, owner GtkLabel)
(evince:13783): Gtk-WARNING **: 15:16:53.821: gtk_widget_size_allocate(): attempt to allocate widget with width -266 and height 31
(evince:13783): Gtk-WARNING **: 15:16:53.821: Negative content width -23 (allocation 1, extents 12x12) while allocating gadget (node label, owner GtkLabel)
(evince:13783): Gtk-WARNING **: 15:16:53.822: Negative content width -23 (allocation 1, extents 12x12) while allocating gadget (node label, owner GtkLabel)
(evince:13783): Gtk-WARNING **: 15:16:53.836: gtk_widget_size_allocate(): attempt to allocate widget with width -266 and height 31
(evince:13783): Gtk-WARNING **: 15:16:53.836: Negative content width -23 (allocation 1, extents 12x12) while allocating gadget (node label, owner GtkLabel)
(evince:13783): Gtk-WARNING **: 15:16:53.852: gtk_widget_size_allocate(): attempt to allocate widget with width -266 and height 31
(evince:13783): Gtk-WARNING **: 15:16:53.875: gtk_widget_size_allocate(): attempt to allocate widget with width -266 and height 31
(evince:13783): Gtk-WARNING **: 15:16:53.885: gtk_widget_size_allocate(): attempt to allocate widget with width -266 and height 31
(evince:13783): Gtk-WARNING **: 15:16:53.902: gtk_widget_size_allocate(): attempt to allocate widget with width -266 and height 31
(evince:13783): Gtk-WARNING **: 15:16:53.916: gtk_widget_size_allocate(): attempt to allocate widget with width -266 and height 31
(evince:13783): Gtk-WARNING **: 15:16:53.933: gtk_widget_size_allocate(): attempt to allocate widget with width -266 and height 31
(evince:13783): Gtk-WARNING **: 15:16:53.950: gtk_widget_size_allocate(): attempt to allocate widget with width -266 and height 31
(evince:13783): Gtk-WARNING **: 15:16:58.224: gtk_widget_size_allocate(): attempt to allocate widget with width -266 and height 31
(evince:13791): Gtk-WARNING **: 15:17:03.791: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13791): Gtk-WARNING **: 15:17:03.791: Negative content width -23 (allocation 1, extents 12x12) while allocating gadget (node label, owner GtkLabel)
(evince:13791): Gtk-WARNING **: 15:17:03.799: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13791): Gtk-WARNING **: 15:17:03.799: Negative content width -23 (allocation 1, extents 12x12) while allocating gadget (node label, owner GtkLabel)
(evince:13791): Gtk-WARNING **: 15:17:03.813: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13791): Gtk-WARNING **: 15:17:03.831: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13791): Gtk-WARNING **: 15:17:03.851: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13791): Gtk-WARNING **: 15:17:03.863: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13791): Gtk-WARNING **: 15:17:03.876: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13791): Gtk-WARNING **: 15:17:03.893: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13791): Gtk-WARNING **: 15:17:03.911: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13791): Gtk-WARNING **: 15:17:03.927: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13791): Gtk-WARNING **: 15:17:03.944: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13791): Gtk-WARNING **: 15:17:03.960: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13791): Gtk-WARNING **: 15:17:03.977: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
bash: kill: (13800) - No such process
Culprit found: $^C
bash: kill: (13800) - No such process
(evince:13817): Gtk-WARNING **: 15:17:33.856: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13817): Gtk-WARNING **: 15:17:33.856: Negative content width -23 (allocation 1, extents 12x12) while allocating gadget (node label, owner GtkLabel)
(evince:13817): Gtk-WARNING **: 15:17:33.887: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:33.887: Negative content width -23 (allocation 1, extents 12x12) while allocating gadget (node label, owner GtkLabel)
(evince:13817): Gtk-WARNING **: 15:17:33.887: Negative content width -23 (allocation 1, extents 12x12) while allocating gadget (node label, owner GtkLabel)
(evince:13817): Gtk-WARNING **: 15:17:33.892: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:33.892: Negative content width -23 (allocation 1, extents 12x12) while allocating gadget (node label, owner GtkLabel)
(evince:13817): Gtk-WARNING **: 15:17:33.910: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:33.926: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:33.943: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:33.960: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:33.976: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:33.994: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:34.010: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:34.026: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:40.056: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:40.056: Negative content width -23 (allocation 1, extents 12x12) while allocating gadget (node label, owner GtkLabel)
(evince:13817): Gtk-WARNING **: 15:17:40.056: Negative content width -23 (allocation 1, extents 12x12) while allocating gadget (node label, owner GtkLabel)
(evince:13817): Gtk-WARNING **: 15:17:40.117: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:40.170: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:40.219: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:40.272: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:40.349: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:40.349: Negative content width -23 (allocation 1, extents 12x12) while allocating gadget (node label, owner GtkLabel)
(evince:13817): Gtk-WARNING **: 15:17:40.350: Negative content width -23 (allocation 1, extents 12x12) while allocating gadget (node label, owner GtkLabel)
(evince:13817): Gtk-WARNING **: 15:17:40.397: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:40.435: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:40.468: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:40.501: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:40.533: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:40.844: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:40.844: Negative content width -23 (allocation 1, extents 12x12) while allocating gadget (node label, owner GtkLabel)
(evince:13817): Gtk-WARNING **: 15:17:40.844: Negative content width -23 (allocation 1, extents 12x12) while allocating gadget (node label, owner GtkLabel)
(evince:13817): Gtk-WARNING **: 15:17:40.900: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:40.946: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:40.994: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:41.046: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:41.073: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:41.092: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:41.112: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:41.134: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:41.152: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:41.173: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:41.191: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:41.210: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:41.227: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:42.022: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:42.022: Negative content width -23 (allocation 1, extents 12x12) while allocating gadget (node label, owner GtkLabel)
(evince:13817): Gtk-WARNING **: 15:17:42.022: Negative content width -23 (allocation 1, extents 12x12) while allocating gadget (node label, owner GtkLabel)
(evince:13817): Gtk-WARNING **: 15:17:42.076: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:42.115: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:42.154: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:42.190: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13817): Gtk-WARNING **: 15:17:42.229: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 31
(evince:13825): Gtk-WARNING **: 15:17:43.838: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13825): Gtk-WARNING **: 15:17:43.838: Negative content width -23 (allocation 1, extents 12x12) while allocating gadget (node label, owner GtkLabel)
(evince:13825): Gtk-WARNING **: 15:17:43.843: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13825): Gtk-WARNING **: 15:17:43.843: Negative content width -23 (allocation 1, extents 12x12) while allocating gadget (node label, owner GtkLabel)
(evince:13825): Gtk-WARNING **: 15:17:43.856: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13825): Gtk-WARNING **: 15:17:43.874: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13825): Gtk-WARNING **: 15:17:43.897: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13825): Gtk-WARNING **: 15:17:43.906: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13825): Gtk-WARNING **: 15:17:43.923: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13825): Gtk-WARNING **: 15:17:43.941: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13825): Gtk-WARNING **: 15:17:43.956: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13825): Gtk-WARNING **: 15:17:43.973: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13825): Gtk-WARNING **: 15:17:43.990: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13825): Gtk-WARNING **: 15:17:44.005: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13825): Gtk-WARNING **: 15:17:44.021: gtk_widget_size_allocate(): attempt to allocate widget with width -250 and height 17
(evince:13833): Gtk-WARNING **: 15:17:53.894: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13833): Gtk-WARNING **: 15:17:53.894: Negative content width -23 (allocation 1, extents 12x12) while allocating gadget (node label, owner GtkLabel)
(evince:13833): Gtk-WARNING **: 15:17:53.909: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13833): Gtk-WARNING **: 15:17:53.927: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13833): Gtk-WARNING **: 15:17:53.947: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13833): Gtk-WARNING **: 15:17:53.955: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13833): Gtk-WARNING **: 15:17:53.972: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13833): Gtk-WARNING **: 15:17:53.990: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13833): Gtk-WARNING **: 15:17:54.006: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13833): Gtk-WARNING **: 15:17:54.024: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13833): Gtk-WARNING **: 15:17:54.039: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13833): Gtk-WARNING **: 15:17:54.055: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13833): Gtk-WARNING **: 15:17:54.072: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13840): Gtk-WARNING **: 15:18:03.900: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13840): Gtk-WARNING **: 15:18:03.900: Negative content width -23 (allocation 1, extents 12x12) while allocating gadget (node label, owner GtkLabel)
(evince:13840): Gtk-WARNING **: 15:18:03.914: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13840): Gtk-WARNING **: 15:18:03.921: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13840): Gtk-WARNING **: 15:18:03.933: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13840): Gtk-WARNING **: 15:18:03.951: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13840): Gtk-WARNING **: 15:18:03.968: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13840): Gtk-WARNING **: 15:18:03.982: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13840): Gtk-WARNING **: 15:18:03.998: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13840): Gtk-WARNING **: 15:18:04.016: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13840): Gtk-WARNING **: 15:18:04.032: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13840): Gtk-WARNING **: 15:18:04.049: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13840): Gtk-WARNING **: 15:18:04.066: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13840): Gtk-WARNING **: 15:18:04.079: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13840): Gtk-WARNING **: 15:18:05.625: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13840): Gtk-WARNING **: 15:18:05.625: Negative content width -23 (allocation 1, extents 12x12) while allocating gadget (node label, owner GtkLabel)
(evince:13840): Gtk-WARNING **: 15:18:05.777: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13840): Gtk-WARNING **: 15:18:05.799: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13840): Gtk-WARNING **: 15:18:05.817: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13840): Gtk-WARNING **: 15:18:05.834: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13840): Gtk-WARNING **: 15:18:05.851: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13840): Gtk-WARNING **: 15:18:05.865: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13840): Gtk-WARNING **: 15:18:05.884: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13840): Gtk-WARNING **: 15:18:05.899: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13840): Gtk-WARNING **: 15:18:05.916: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13840): Gtk-WARNING **: 15:18:05.933: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13840): Gtk-WARNING **: 15:18:05.949: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
(evince:13840): Gtk-WARNING **: 15:18:05.965: gtk_widget_size_allocate(): attempt to allocate widget with width -282 and height 17
'''
I also tried to build poppler 0.71.0, but it fails with openjpeg.h: No such file or directory, even though I have openjpeg in the dependencies.
I made a mistake when pasting the command.. instead of Culprit found: $^C it must be Culprit found: $FN so that the name of the file is printed - but even without that we know know that there's one PDF that reliably crashes evince, too. (The line Culprit found did appear in the output you've pasted.) That means this is a bug that you should report upstream to poppler. It'll help if you can give them the affected file. I can also test whether this file crashes the applications for me, too, if you'd like, so we can narrow the affected versions further down. The backtrace will help them, too.
It seems something went wrong with my previous test; evince doesn't crash anymore, and I ran your command a few times.
🤨 Too bad. What if you do a similar thing with pqiv instead of evince,
find -iname "*.pdf" | while read FN; do ./pqiv -sd .01 --end-of-files-action=quit "$FN" || echo "Culprit found: $FN"; done
Does that find a faulty file?
(This command should open pqiv with each file, cycle through all pages, and then have it quit.)
That triggers on all files with this message:
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning: Unsupported high keycode 372 for name <I372> ignored
> X11 cannot support keycodes above 255.
> This warning only shows for the first high keycode.
> Internal error: Could not resolve keysym XF86WWAN
> Internal error: Could not resolve keysym XF86RFKill
> Internal error: Could not resolve keysym XF86Keyboard
Errors from xkbcomp are not fatal to the X server
Culprit found: ./faust-tutorial2.pdf
Now that's weird.. xkbcomp should definitively not be invoked by this command line. Frankly, I'm running somewhat out of ideas.
Are you in any way able to compile a pqiv with custom modifications? Then you could patch backends/poppler.c, and after line 162,
void file_type_poppler_draw(file_t *file, cairo_t *cr) {/*{{{*/
file_private_data_poppler_t *private = (file_private_data_poppler_t *)file->private;
add this:
printf("Now drawing file: %s\n", file->display_name);
This'd then finally give us the name of the PDF file causing this.
If you manage to do this, it'd be interesting to know if loading only this PDF also triggers the bug.
I did: sed -i '163i printf("Now drawing file: %s\n", file->display_name);' backends/poppler.c
and got:
CC backends/poppler.o
/build/source/backends/poppler.c: In function 'file_type_poppler_draw':
/build/source/backends/poppler.c:163:8: warning: missing terminating " character
printf("Now drawing file: %s
^
/build/source/backends/poppler.c:163:8: error: missing terminating " character
printf("Now drawing file: %s
^~~~~~~~~~~~~~~~~~~~~
/build/source/backends/poppler.c:164:1: warning: missing terminating " character
", file->display_name);
^
/build/source/backends/poppler.c:164:1: error: missing terminating " character
", file->display_name);
^~~~~~~~~~~~~~~~~~~~~~~
/build/source/backends/poppler.c:166:38: error: expected ')' before ';' token
cairo_set_source_rgb(cr, 1., 1., 1.);
^
/build/source/backends/poppler.c:166:2: error: invalid use of void expression
cairo_set_source_rgb(cr, 1., 1., 1.);
^~~~~~~~~~~~~~~~~~~~
/build/source/backends/poppler.c:170:1: error: expected ';' before '}' token
}/*}}}*/
^
/build/source/backends/poppler.c:162:31: warning: unused variable 'private' [-Wunused-variable]
file_private_data_poppler_t *private = (file_private_data_poppler_t *)file->private;
^~~~~~~
make: *** [GNUmakefile:183: backends/poppler.o] Error 1
Try inserting the line manually, your sed command didn't work as intended.
Edit: Oh, I get it, you did it this way because this can be added to the nixpkg easily? Try escaping the \n a second time,
sed -i '163i printf("Now drawing file: %s\\n", file->display_name);' backends/poppler.c
then it should work
you did it this way because this can be added to the nixpkg easily?
Indeed.
I found the / a offending file: https://bandshed.net/pdf/AVL2018UserManual.pdf When I'm in a dir with just that file and open it with pqiv, I get:
Now drawing file: AVL2018UserManual.pdf[2]
double free or corruption (out)
[1] 24221 abort pqiv AVL2018UserManual.pdf
When I put another pdf in the dir and open that, I get:
Now drawing file: faust-tutorial2.pdf[2]
Now drawing file: faust-tutorial2.pdf[2]
Now drawing file: faust-tutorial2.pdf[114]
Now drawing file: faust-tutorial2.pdf[114]
Now drawing file: faust-tutorial2.pdf
Now drawing file: faust-tutorial2.pdf
Now drawing file: faust-tutorial2.pdf[3]
Now drawing file: faust-tutorial2.pdf[3]
Now drawing file: faust-tutorial2.pdf[4]
Now drawing file: faust-tutorial2.pdf[4]
Now drawing file: faust-tutorial2.pdf[5]
Now drawing file: faust-tutorial2.pdf[5]
Now drawing file: faust-tutorial2.pdf[6]
Now drawing file: faust-tutorial2.pdf[6]
Now drawing file: faust-tutorial2.pdf[7]
Now drawing file: faust-tutorial2.pdf
Now drawing file: faust-tutorial2.pdf[7]
Now drawing file: faust-tutorial2.pdf[8]
Now drawing file: faust-tutorial2.pdf[8]
Now drawing file: faust-tutorial2.pdf[9]
Now drawing file: faust-tutorial2.pdf[9]
Now drawing file: faust-tutorial2.pdf[10]
Now drawing file: faust-tutorial2.pdf[10]
Now drawing file: faust-tutorial2.pdf[11]
Now drawing file: faust-tutorial2.pdf[11]
Now drawing file: faust-tutorial2.pdf[12]
Now drawing file: faust-tutorial2.pdf[12]
Now drawing file: faust-tutorial2.pdf[13]
Now drawing file: faust-tutorial2.pdf[13]
Now drawing file: faust-tutorial2.pdf[14]
Now drawing file: faust-tutorial2.pdf[14]
Now drawing file: faust-tutorial2.pdf[2]
Now drawing file: faust-tutorial2.pdf[3]
Now drawing file: ./AVL2018UserManual.pdf
[1] 24250 segmentation fault pqiv faust-tutorial2.pdf
Thanks! So I've compiled myself a Poppler 0.67.0 and opened your PDF. Doesn't crash for me. I do have an older version of ghostscript (tested with 9.21 and 9.22), but I don't think that's relevant - for me, those cms functions live in liblcms2, and I don't fully understand how they end up into ghostscript itself for you.
Anyway, here's another thing to try:
sed -i 's#cmsPluginTHR#__unused_pluginthr#' backends/spectre.c
If that doesn't help either, I'm currently again out of ideas.
Unfortunately that changes nothing.
Thanks so far and let me know if you come up with any other ideas.