pwmt/zathura

Segfault on fast mouse scrolling with mupdf

Closed this issue · 1 comments

This is probably the same bug as https://git.pwmt.org/pwmt/zathura-pdf-mupdf/-/issues/3, but I'm filing it here because that repo doesn't seem as active, and https://pwmt.org/projects/zathura/ directed me to file bugs here.

As in that bug, the segfault happens on any long PDF. It only happens when I scroll quickly with the mouse. It doesn't happen when I scroll slowly. It doesn't happen when I scroll quickly by holding down the the page up/down keys.

I have a Logitech mouse where the scroll wheel can switch between clicky and free-spinning; I'm able to repro in either mode, although only by scrolling faster than one normally would with a clicky wheel. So it might be easier to repro with a free-spinning scroll wheel.

zathura -v shows:

zathura 0.5.6
girara 0.4.4 (runtime: 0.4.4)
(plugin) ps (0.2.7) (/usr/lib/zathura/libps.so)
(plugin) djvu (0.2.9) (/usr/lib/zathura/libdjvu.so)
(plugin) pdf-mupdf (0.4.2) (/usr/lib/zathura/libpdf-mupdf.so)

In gdb, the crash looks like:

(No debugging symbols found in zathura)
(gdb) r
Starting program: /usr/bin/zathura foo.pdf
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff32006c0 (LWP 16752)]
[New Thread 0x7ffff28006c0 (LWP 16753)]
[New Thread 0x7ffff1e006c0 (LWP 16754)]
[New Thread 0x7ffff14006c0 (LWP 16755)]
[New Thread 0x7fffe98006c0 (LWP 16756)]
info: Opening plain database via sqlite backend.
warning: sqlite database already exists. Set your database backend to sqlite
[New Thread 0x7fffdce006c0 (LWP 16757)]
*** longjmp causes uninitialized stack frame ***: terminated

Thread 7 "pool-org.pwmt.z" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffdce006c0 (LWP 16757)]
0x00007ffff6d76e44 in ?? () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007ffff6d76e44 in ??? () at /usr/lib/libc.so.6
#1  0x00007ffff6d1ea30 in raise () at /usr/lib/libc.so.6
#2  0x00007ffff6d064c3 in abort () at /usr/lib/libc.so.6
#3  0x00007ffff6d07354 in ??? () at /usr/lib/libc.so.6
#4  0x00007ffff6e04259 in __fortify_fail () at /usr/lib/libc.so.6
#5  0x00007ffff6e03211 in ??? () at /usr/lib/libc.so.6
#6  0x00007ffff6e04933 in __longjmp_chk () at /usr/lib/libc.so.6
#7  0x00007fffdd0a549d in ??? () at /usr/lib/libmupdf.so.24.2
#8  0x00007fffdd0a5503 in fz_rethrow () at /usr/lib/libmupdf.so.24.2
#9  0x00007fffdd169004 in pdf_process_raw_contents () at /usr/lib/libmupdf.so.24.2
#10 0x00007fffdd1690ac in pdf_process_contents () at /usr/lib/libmupdf.so.24.2
#11 0x00007fffdd279baa in ??? () at /usr/lib/libmupdf.so.24.2
#12 0x00007fffdd165657 in ??? () at /usr/lib/libmupdf.so.24.2
#13 0x00007fffdd165c02 in ??? () at /usr/lib/libmupdf.so.24.2
#14 0x00007fffdd16895c in ??? () at /usr/lib/libmupdf.so.24.2
#15 0x00007fffdd168ed9 in pdf_process_raw_contents () at /usr/lib/libmupdf.so.24.2
#16 0x00007fffdd1690ac in pdf_process_contents () at /usr/lib/libmupdf.so.24.2
#17 0x00007fffdd19a669 in ??? () at /usr/lib/libmupdf.so.24.2
#18 0x00007fffdd19aa81 in pdf_run_page_contents_with_usage () at /usr/lib/libmupdf.so.24.2
#19 0x00007fffdd06e66c in fz_run_page_contents () at /usr/lib/libmupdf.so.24.2
#20 0x00007fffdd06e877 in fz_run_page () at /usr/lib/libmupdf.so.24.2
#21 0x00007ffff2805990 in ??? () at /usr/lib/zathura/libpdf-mupdf.so
#22 0x000055555556c9b1 in ??? ()
#23 0x00007ffff71581f3 in ??? () at /usr/lib/libglib-2.0.so.0
#24 0x00007ffff7152236 in ??? () at /usr/lib/libglib-2.0.so.0
#25 0x00007ffff6d74ded in ??? () at /usr/lib/libc.so.6
#26 0x00007ffff6df80dc in ??? () at /usr/lib/libc.so.6

Same as pwmt/zathura-pdf-mupdf#68. You need to upgrade to zathura-pdf-mupdf 0.4.3.