Bug 416233 - On AMD Ryzen 9 3900X, Okular segfaults at undo branching points.
Summary: On AMD Ryzen 9 3900X, Okular segfaults at undo branching points.
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 1.7.3
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-14 09:47 UTC by tomtomjhj
Modified: 2020-01-21 07:03 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
backtrace when typewriter annotation is used (28.36 KB, text/plain)
2020-01-15 06:08 UTC, tomtomjhj
Details
backtrace when text markup annotation is used (13.32 KB, text/plain)
2020-01-15 06:09 UTC, tomtomjhj
Details
valgrind output (39.15 KB, text/plain)
2020-01-16 13:01 UTC, tomtomjhj
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tomtomjhj 2020-01-14 09:47:06 UTC
SUMMARY
On AMD Ryzen 9 3900X, Okular segfaults at undo branching points.

STEPS TO REPRODUCE
1. Open a pdf file
2. Select an annotation tool e.g. inline note.
3. Make an inline note.
4. Make another inline note.
5. Undo 4. (Ctrl-z)
6. Make another inline note.

OBSERVED RESULT
Segmentation fault

I couldn't build okular on my machine so I don't have the full stack trace.

Thread 1 "okular" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in  ()
#1  0x00007ffff041a8df in  () at /usr/lib/x86_64-linux-gnu/qt5/plugins/okularpart.so
#2  0x00007ffff0420cd9 in  () at /usr/lib/x86_64-linux-gnu/qt5/plugins/okularpart.so
#3  0x00007ffff0420da0 in  () at /usr/lib/x86_64-linux-gnu/qt5/plugins/okularpart.so
#4  0x00007ffff0411d67 in  () at /usr/lib/x86_64-linux-gnu/qt5/plugins/okularpart.so
#5  0x00007ffff68105c8 in QMetaObject::activate(QObject*, int, int, void**) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007ffff044196e in  () at /usr/lib/x86_64-linux-gnu/qt5/plugins/okularpart.so
#7  0x00007ffff0441d06 in  () at /usr/lib/x86_64-linux-gnu/qt5/plugins/okularpart.so
#8  0x00007ffff0412724 in  () at /usr/lib/x86_64-linux-gnu/qt5/plugins/okularpart.so
#9  0x00007ffff04129e4 in  () at /usr/lib/x86_64-linux-gnu/qt5/plugins/okularpart.so
#10 0x00007ffff0437ebc in  () at /usr/lib/x86_64-linux-gnu/qt5/plugins/okularpart.so
#11 0x00007ffff72d504e in QWidget::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007ffff7382782 in QFrame::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007ffff043a9e9 in  () at /usr/lib/x86_64-linux-gnu/qt5/plugins/okularpart.so
#14 0x00007ffff67e47ab in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007ffff7292a75 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007ffff729c053 in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007ffff67e4a9a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007ffff729b157 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007ffff72f114d in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#20 0x00007ffff72f3fdc in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x00007ffff7292a86 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007ffff729be00 in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007ffff67e4a9a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#24 0x00007ffff6c68d73 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#25 0x00007ffff6c6a5fb in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#26 0x00007ffff6c4426b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#27 0x00007ffff29c828e in  () at /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#28 0x00007ffff4fe584d in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#29 0x00007ffff4fe5ad0 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#30 0x00007ffff4fe5b73 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007ffff683c6a5 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#32 0x00007ffff67e363b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#33 0x00007ffff67eb3a6 in QCoreApplication::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#34 0x0000555555562c6a in  ()
#35 0x00007ffff61a51e3 in __libc_start_main (main=0x555555562560, argc=2, argv=0x7fffffffd6d8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd6c8)
    at ../csu/libc-start.c:308
#36 0x00005555555642be in _start ()

SOFTWARE/OS VERSIONS
AMD Ryzen 9 3900X
Ubuntu 19.10, https://packages.ubuntu.com/eoan/okular

NOTES
* I think something wrong happens when the undo history creates a new branch.
* I couldn't reproduce this bug on my laptop with Intel i7-8550U and another desktop with AMD Ryzen 5 3400G.
Comment 1 Albert Astals Cid 2020-01-14 22:44:04 UTC
Since this is ubuntu, can you please install the debug packages and give us an usable backtrace?
Comment 2 tomtomjhj 2020-01-15 06:08:43 UTC
Created attachment 125135 [details]
backtrace when typewriter annotation is used

Oh I wasn't aware of -dbgsym stuff. Here are full backtraces with different annotations.
Comment 3 tomtomjhj 2020-01-15 06:09:38 UTC
Created attachment 125136 [details]
backtrace when text markup annotation is used
Comment 4 Albert Astals Cid 2020-01-15 10:20:40 UTC
Thanks :)

Can you please also run 
valgrind okular
and attach the output it creates when doing the thing that crashes (may not crash while run under valgrind) (be prepared for it to be very slow)
Comment 5 tomtomjhj 2020-01-16 13:01:59 UTC
Created attachment 125168 [details]
valgrind output
Comment 6 Albert Astals Cid 2020-01-16 21:37:45 UTC
Oh i just realized you're using kind of an old okular version i think we may have already fixed this. Could you try the flatpak version of okular?

https://flathub.org/apps/details/org.kde.okular
Comment 7 tomtomjhj 2020-01-21 07:03:33 UTC
Hi. The flatpak version works perfectly. Thanks!