ahrm / sioyek

Sioyek is a PDF viewer with a focus on textbooks and research papers
https://sioyek.info/
GNU General Public License v3.0
6.99k stars 230 forks source link

Opening pdf link crashes the app #1153

Open Serpentarius13 opened 2 weeks ago

Serpentarius13 commented 2 weeks ago

I'm using Arch Linux with Sway Wayland and latest version of Sioyek. When clicking on pdf link, nothing happens, and when I change the workspace, app crashes with the following in journalctl:

Aug 29 11:44:59 archlinux kernel: sioyek[215319]: segfault at 120 ip 00007457a1fb4284 sp 00007ffcbe364e58 error 4 in libmupdf.so.24.8[1b4284,7457a1e4d000+251000] lik>
Aug 29 11:44:59 archlinux kernel: Code: 83 78 e8 00 74 f0 b8 01 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 31 c0 c3 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 f3 0f 1e fa>
Aug 29 11:44:59 archlinux systemd-coredump[215648]: Process 215319 (sioyek) of user 1000 terminated abnormally with signal 11/SEGV, processing...
Aug 29 11:44:59 archlinux systemd[1]: Started Process Core Dump (PID 215648/UID 0).
Aug 29 11:45:00 archlinux systemd-coredump[215649]: [🡕] Process 215319 (sioyek) of user 1000 dumped core.

                                                    Stack trace of thread 215319:
                                                    #0  0x00007457a1fb4284 pdf_trailer (libmupdf.so.24.8 + 0x1b4284)
                                                    #1  0x00007457a1f7524b pdf_lookup_dest (libmupdf.so.24.8 + 0x17524b)
                                                    #2  0x00007457a208283f n/a (libmupdf.so.24.8 + 0x28283f)
                                                    #3  0x00007457a1f74f90 pdf_resolve_link_dest (libmupdf.so.24.8 + 0x174f90)
                                                    #4  0x00005d074915e01e _Z9parse_uriP10fz_contextP11fz_documentNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE>
                                                    #5  0x00005d0749151400 _ZN10MainWidget12handle_clickE9WindowPos (sioyek + 0x80400)
                                                    #6  0x00005d074915189a _ZN10MainWidget17mouseReleaseEventEP11QMouseEvent (sioyek + 0x8089a)
                                                    #7  0x00007457a178f7c6 _ZN7QWidget5eventEP6QEvent (libQt5Widgets.so.5 + 0x18f7c6)
                                                    #8  0x00007457a1756331 _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent (libQt5Widgets.so.5 + 0x156331)
                                                    #9  0x00007457a175c0d1 _ZN12QApplication6notifyEP7QObjectP6QEvent (libQt5Widgets.so.5 + 0x15c0d1)
                                                    #10 0x00007457a0aaba68 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent (libQt5Core.so.5 + 0x2aba68)
                                                    #11 0x00007457a1759df5 _ZN19QApplicationPrivate14sendMouseEventEP7QWidgetP11QMouseEventS1_S1_PS1_R8QPointerIS0_Eb>
                                                    #12 0x00007457a17a8c8a n/a (libQt5Widgets.so.5 + 0x1a8c8a)
                                                    #13 0x00007457a17aacc7 n/a (libQt5Widgets.so.5 + 0x1aacc7)
                                                    #14 0x00007457a1756331 _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent (libQt5Widgets.so.5 + 0x156331)
                                                    #15 0x00007457a0aaba68 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent (libQt5Core.so.5 + 0x2aba68)
                                                    #16 0x00007457a0f3ba90 _ZN22QGuiApplicationPrivate17processMouseEventEPN29QWindowSystemInterfacePrivate10MouseEve>
                                                    #17 0x00007457a0f1cdcd _ZN22QWindowSystemInterface22sendWindowSystemEventsE6QFlagsIN10QEventLoop17ProcessEventsFl>
                                                    #18 0x000074579bb5f285 n/a (libQt5WaylandClient.so.5 + 0xa7285)
                                                    #19 0x000074579eb14ab9 n/a (libglib-2.0.so.0 + 0x5cab9)
                                                    #20 0x000074579eb769e7 n/a (libglib-2.0.so.0 + 0xbe9e7)
                                                    #21 0x000074579eb13fc5 g_main_context_iteration (libglib-2.0.so.0 + 0x5bfc5)
                                                    #22 0x00007457a0afa37f _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt>
                                                    #23 0x00007457a0aa382c _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt5Core.so.5 + 0x2a382c)
                                                    #24 0x00007457a0aafbfd _ZN16QCoreApplication4execEv (libQt5Core.so.5 + 0x2afbfd)
                                                    #25 0x00005d0749101800 main (sioyek + 0x30800)

Dunno if its because of Wayland. Would be happy to provide more info, nice app btw

ahrm commented 2 weeks ago

Does this happen with every PDF or a specific PDF? If so can you share the problematic file?

Serpentarius13 commented 2 weeks ago

Does this happen with every PDF or a specific PDF? If so can you share the problematic file?

Actually, I wonder if it is actually a "pdf", and not just a "link"? I just don't know how to call these numbers above certain words that forward to sources and indexes. File format is epub. Here's the file: https :/ /sendanywhe.re/9G8VSXOO. Sorry for the link, Idk how to attach epubs

ahrm commented 2 weeks ago

Can't reproduce the issue on the development branch. Did you compile sioyek yourself? My guess it that the issue is because you are linking with mupdf 1.24 whereas current development version of sioyek is using mupdf 1.22, you can compile sioyek with the included version of mupdf in the repo and see if the issue persists (the linux_app_image config in qmake makes it so we use the included mupdf rather than the system's mupdf).

Serpentarius13 commented 2 weeks ago

Can't reproduce the issue on the development branch. Did you compile sioyek yourself? My guess it that the issue is because you are linking with mupdf 1.24 whereas current development version of sioyek is using mupdf 1.22, you can compile sioyek with the included version of mupdf in the repo and see if the issue persists (the linux_app_image config in qmake makes it so we use the included mupdf rather than the system's mupdf).

I'm actually using sioyek package from Yay, the version there is 2.0.0-7. Is it outdated? I think there's also a bug where document doesn't save itself on leave, leading to the previous opened document being open on the subsequent run upd: I tried installing sioyek-appimage and links there don't crash, however they all open start of the document on click upd2: aand the tables don't work there =) image

would you mind explaining how sioyek and sioyek-appimage differ? What should I do?

ahrm commented 2 weeks ago

I don't maintain either of those packages, they are maintained by third-party volunteers so I don't know what their difference is exactly. There are some appimage builds in the release section of this repo but they are a little out of date.

Serpentarius13 commented 2 weeks ago

I don't maintain either of those packages, they are maintained by third-party volunteers so I don't know what their difference is exactly. There are some appimage builds in the release section of this repo but they are a little out of date.

Got it. I've installed sioyek-git and it worked =) Thanks