Bug 408849 - okular crashes scrolling through certain pdf
Summary: okular crashes scrolling through certain pdf
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 1.7.2
Platform: Neon Linux
: NOR crash
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords: drkonqi
: 409462 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-06-17 19:42 UTC by Peter Hedwig
Modified: 2019-07-03 20:29 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Hedwig 2019-06-17 19:42:53 UTC
Application: okular (1.7.2)

Qt Version: 5.12.3
Frameworks Version: 5.59.0
Operating System: Linux 5.1.10-050110-generic x86_64
Distribution: KDE neon User Edition 5.16

-- Information about the crash:
- What I was doing when the application crashed:

1. open https://ctan.kako-dev.de/macros/latex/contrib/microtype/microtype.pdf with okular
2. scroll through the pdf and expect a crash at around page 3

The crash can be reproduced every time.

-- Backtrace:
Application: Okular (okular), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f0a1310a200 (LWP 6405))]

Thread 20 (Thread 0x7f09c9216700 (LWP 6436)):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007f0a0f4a3f75 in QtLinuxFutex::_q_futex (val3=0, addr2=0x0, val2=0, val=3, op=0, addr=<optimized out>) at thread/qfutex_p.h:92
#2  QtLinuxFutex::futexWait<QBasicAtomicPointer<QMutexData> > (expectedValue=<optimized out>, futex=...) at thread/qfutex_p.h:107
#3  lockInternal_helper<false> (timeout=-1, elapsedTimer=0x0, d_ptr=...) at thread/qmutex_linux.cpp:142
#4  QBasicMutex::lockInternal (this=0x55e2e365e5f0) at thread/qmutex_linux.cpp:159
#5  0x00007f0a0f4a415b in QMutex::lock (this=<optimized out>) at thread/qmutex.cpp:227
#6  0x00007f09e009957b in PDFGenerator::textPage (this=0x55e2e335b720, request=0x55e2e3ff5f90) at ./generators/poppler/generator_pdf.cpp:1301
#7  0x00007f09f6d09915 in Okular::TextPageGenerationThread::run (this=0x55e2e3ff5f70) at ./core/generator_p.cpp:131
#8  0x00007f0a0f4a3c72 in QThreadPrivate::start (arg=0x55e2e3ff5f70) at thread/qthread_unix.cpp:361
#9  0x00007f0a0bb3a6db in start_thread (arg=0x7f09c9216700) at pthread_create.c:463
#10 0x00007f0a0eda388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 19 (Thread 0x7f09a6c1d700 (LWP 6435)):
[KCrash Handler]
#6  QVariant::clear (this=this@entry=0x7f0926c1cb28) at kernel/qvariant.cpp:2400
#7  0x00007f0a0f6c23b8 in QVariant::operator= (this=0x7f0926c1cb28, variant=...) at kernel/qvariant.cpp:2335
#8  0x00007f09f6cbd18d in Okular::Action::setNativeId (this=this@entry=0x7f09900284c0, id=...) at ./core/action.cpp:57
#9  0x00007f09e0096c57 in createLinkFromPopplerLink (popplerLink=popplerLink@entry=0x7f09900284c0, deletePopplerLink=false, deletePopplerLink@entry=true) at ./generators/poppler/generator_pdf.cpp:508
#10 0x00007f09e0097a15 in generateLinks (popplerLinks=...) at ./generators/poppler/generator_pdf.cpp:563
#11 0x00007f09e009b740 in PDFGenerator::image (this=0x55e2e335b720, request=0x55e2e3cd3480) at ./generators/poppler/generator_pdf.cpp:1194
#12 0x00007f09f6d0a195 in Okular::PixmapGenerationThread::run (this=0x55e2e335ead0) at ./core/generator_p.cpp:62
#13 0x00007f0a0f4a3c72 in QThreadPrivate::start (arg=0x55e2e335ead0) at thread/qthread_unix.cpp:361
#14 0x00007f0a0bb3a6db in start_thread (arg=0x7f09a6c1d700) at pthread_create.c:463
#15 0x00007f0a0eda388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 18 (Thread 0x7f09ca7fc700 (LWP 6422)):
#0  0x00007f0a0bb409f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55e2e2e81d80) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x55e2e2e81d30, cond=0x55e2e2e81d58) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x55e2e2e81d58, mutex=0x55e2e2e81d30) at pthread_cond_wait.c:655
#3  0x00007f09e7b1b85b in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#4  0x00007f09e7b1b457 in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#5  0x00007f0a0bb3a6db in start_thread (arg=0x7f09ca7fc700) at pthread_create.c:463
#6  0x00007f0a0eda388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 17 (Thread 0x7f09caffd700 (LWP 6421)):
#0  0x00007f0a0bb409f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55e2e2e81d80) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x55e2e2e81d30, cond=0x55e2e2e81d58) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x55e2e2e81d58, mutex=0x55e2e2e81d30) at pthread_cond_wait.c:655
#3  0x00007f09e7b1b85b in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#4  0x00007f09e7b1b457 in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#5  0x00007f0a0bb3a6db in start_thread (arg=0x7f09caffd700) at pthread_create.c:463
#6  0x00007f0a0eda388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 16 (Thread 0x7f09cb7fe700 (LWP 6420)):
#0  0x00007f0a0bb409f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55e2e2e81d80) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x55e2e2e81d30, cond=0x55e2e2e81d58) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x55e2e2e81d58, mutex=0x55e2e2e81d30) at pthread_cond_wait.c:655
#3  0x00007f09e7b1b85b in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#4  0x00007f09e7b1b457 in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#5  0x00007f0a0bb3a6db in start_thread (arg=0x7f09cb7fe700) at pthread_create.c:463
#6  0x00007f0a0eda388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 15 (Thread 0x7f09cbfff700 (LWP 6419)):
#0  0x00007f0a0bb409f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55e2e2e81d80) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x55e2e2e81d30, cond=0x55e2e2e81d58) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x55e2e2e81d58, mutex=0x55e2e2e81d30) at pthread_cond_wait.c:655
#3  0x00007f09e7b1b85b in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#4  0x00007f09e7b1b457 in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#5  0x00007f0a0bb3a6db in start_thread (arg=0x7f09cbfff700) at pthread_create.c:463
#6  0x00007f0a0eda388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 14 (Thread 0x7f09d0ff9700 (LWP 6418)):
#0  0x00007f0a0bb409f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55e2e2e81800) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x55e2e2e817b0, cond=0x55e2e2e817d8) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x55e2e2e817d8, mutex=0x55e2e2e817b0) at pthread_cond_wait.c:655
#3  0x00007f09e7b1b85b in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#4  0x00007f09e7b1b457 in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#5  0x00007f0a0bb3a6db in start_thread (arg=0x7f09d0ff9700) at pthread_create.c:463
#6  0x00007f0a0eda388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 13 (Thread 0x7f09d17fa700 (LWP 6417)):
#0  0x00007f0a0bb409f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55e2e2e81800) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x55e2e2e817b0, cond=0x55e2e2e817d8) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x55e2e2e817d8, mutex=0x55e2e2e817b0) at pthread_cond_wait.c:655
#3  0x00007f09e7b1b85b in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#4  0x00007f09e7b1b457 in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#5  0x00007f0a0bb3a6db in start_thread (arg=0x7f09d17fa700) at pthread_create.c:463
#6  0x00007f0a0eda388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 12 (Thread 0x7f09d1ffb700 (LWP 6416)):
#0  0x00007f0a0bb409f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55e2e2e81800) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x55e2e2e817b0, cond=0x55e2e2e817d8) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x55e2e2e817d8, mutex=0x55e2e2e817b0) at pthread_cond_wait.c:655
#3  0x00007f09e7b1b85b in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#4  0x00007f09e7b1b457 in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#5  0x00007f0a0bb3a6db in start_thread (arg=0x7f09d1ffb700) at pthread_create.c:463
#6  0x00007f0a0eda388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 11 (Thread 0x7f09d27fc700 (LWP 6415)):
#0  0x00007f0a0bb409f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55e2e2e81800) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x55e2e2e817b0, cond=0x55e2e2e817d8) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x55e2e2e817d8, mutex=0x55e2e2e817b0) at pthread_cond_wait.c:655
#3  0x00007f09e7b1b85b in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#4  0x00007f09e7b1b457 in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#5  0x00007f0a0bb3a6db in start_thread (arg=0x7f09d27fc700) at pthread_create.c:463
#6  0x00007f0a0eda388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 10 (Thread 0x7f09d2ffd700 (LWP 6414)):
#0  0x00007f0a0bb409f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55e2e2e81800) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x55e2e2e817b0, cond=0x55e2e2e817d8) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x55e2e2e817d8, mutex=0x55e2e2e817b0) at pthread_cond_wait.c:655
#3  0x00007f09e7b1b85b in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#4  0x00007f09e7b1b457 in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#5  0x00007f0a0bb3a6db in start_thread (arg=0x7f09d2ffd700) at pthread_create.c:463
#6  0x00007f0a0eda388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 9 (Thread 0x7f09d37fe700 (LWP 6413)):
#0  0x00007f0a0bb409f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55e2e2e81800) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x55e2e2e817b0, cond=0x55e2e2e817d8) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x55e2e2e817d8, mutex=0x55e2e2e817b0) at pthread_cond_wait.c:655
#3  0x00007f09e7b1b85b in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#4  0x00007f09e7b1b457 in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#5  0x00007f0a0bb3a6db in start_thread (arg=0x7f09d37fe700) at pthread_create.c:463
#6  0x00007f0a0eda388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 8 (Thread 0x7f09d3fff700 (LWP 6412)):
#0  0x00007f0a0bb409f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55e2e2e81800) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x55e2e2e817b0, cond=0x55e2e2e817d8) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x55e2e2e817d8, mutex=0x55e2e2e817b0) at pthread_cond_wait.c:655
#3  0x00007f09e7b1b85b in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#4  0x00007f09e7b1b457 in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#5  0x00007f0a0bb3a6db in start_thread (arg=0x7f09d3fff700) at pthread_create.c:463
#6  0x00007f0a0eda388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 7 (Thread 0x7f09e0eae700 (LWP 6411)):
#0  0x00007f0a0bb409f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55e2e2e81800) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x55e2e2e817b0, cond=0x55e2e2e817d8) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x55e2e2e817d8, mutex=0x55e2e2e817b0) at pthread_cond_wait.c:655
#3  0x00007f09e7b1b85b in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#4  0x00007f09e7b1b457 in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#5  0x00007f0a0bb3a6db in start_thread (arg=0x7f09e0eae700) at pthread_create.c:463
#6  0x00007f0a0eda388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 6 (Thread 0x7f09e16af700 (LWP 6410)):
#0  0x00007f0a0bb409f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55e2e2e81800) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x55e2e2e817b0, cond=0x55e2e2e817d8) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x55e2e2e817d8, mutex=0x55e2e2e817b0) at pthread_cond_wait.c:655
#3  0x00007f09e7b1b85b in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#4  0x00007f09e7b1b457 in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#5  0x00007f0a0bb3a6db in start_thread (arg=0x7f09e16af700) at pthread_create.c:463
#6  0x00007f0a0eda388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 5 (Thread 0x7f09e1eb0700 (LWP 6409)):
#0  0x00007f0a0bb409f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55e2e2b11038) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x55e2e2b10fe8, cond=0x55e2e2b11010) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x55e2e2b11010, mutex=0x55e2e2b10fe8) at pthread_cond_wait.c:655
#3  0x00007f09e7b1b85b in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#4  0x00007f09e7b1b457 in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#5  0x00007f0a0bb3a6db in start_thread (arg=0x7f09e1eb0700) at pthread_create.c:463
#6  0x00007f0a0eda388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 4 (Thread 0x7f09e27f2700 (LWP 6408)):
#0  0x00007f0a0bb409f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55e2e2e804d8) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x55e2e2e80488, cond=0x55e2e2e804b0) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x55e2e2e804b0, mutex=0x55e2e2e80488) at pthread_cond_wait.c:655
#3  0x00007f09e7b1b85b in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#4  0x00007f09e7b1b457 in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
#5  0x00007f0a0bb3a6db in start_thread (arg=0x7f09e27f2700) at pthread_create.c:463
#6  0x00007f0a0eda388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7f09f8767700 (LWP 6407)):
#0  0x00007f0a0ed96bf9 in __GI___poll (fds=0x7f09f0004db0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f0a098094c9 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f0a098095dc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f0a0f6d9dcb in QEventDispatcherGlib::processEvents (this=0x7f09f0000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007f0a0f67b03a in QEventLoop::exec (this=this@entry=0x7f09f8766d70, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#5  0x00007f0a0f4a24ca in QThread::exec (this=<optimized out>) at thread/qthread.cpp:531
#6  0x00007f0a0fb48015 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#7  0x00007f0a0f4a3c72 in QThreadPrivate::start (arg=0x7f0a0fdbfd80) at thread/qthread_unix.cpp:361
#8  0x00007f0a0bb3a6db in start_thread (arg=0x7f09f8767700) at pthread_create.c:463
#9  0x00007f0a0eda388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7f0a01450700 (LWP 6406)):
#0  0x00007f0a0ed96bf9 in __GI___poll (fds=0x7f0a0144fca8, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f0a0c5bc747 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007f0a0c5be36a in xcb_wait_for_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007f0a04237578 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#4  0x00007f0a0f4a3c72 in QThreadPrivate::start (arg=0x55e2e291aff0) at thread/qthread_unix.cpp:361
#5  0x00007f0a0bb3a6db in start_thread (arg=0x7f0a01450700) at pthread_create.c:463
#6  0x00007f0a0eda388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7f0a1310a200 (LWP 6405)):
#0  0x00007f0a0ed96bf9 in __GI___poll (fds=0x55e2e3df8a70, nfds=1, timeout=4) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f0a098094c9 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f0a098095dc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f0a0f6d9dcb in QEventDispatcherGlib::processEvents (this=0x55e2e2972ad0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007f0a0f67b03a in QEventLoop::exec (this=this@entry=0x7ffe1a13ce60, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#5  0x00007f0a0f684170 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1363
#6  0x000055e2e07b09c7 in main (argc=<optimized out>, argv=<optimized out>) at ./shell/main.cpp:90

Reported using DrKonqi
Comment 1 Tobias Deiminger 2019-06-17 21:48:37 UTC
I can't cause a crash by simply scrolling. However, a crash happens reproducible when right-clicking the "Protrusion" link on left margin of page 4, using latest okular and poppler master, with backtrace as follows:

Thread 1 "okular" received signal SIGSEGV, Segmentation fault.
0x00007fffe6a99989 in PageView::createProcessLinkMenu(PageViewItem*, QPoint const&) () from ./okularpart.so
(gdb) bt
#0  0x00007fffe6a99989 in PageView::createProcessLinkMenu(PageViewItem*, QPoint const&) () from ./okularpart.so
#1  0x00007fffe6a8eaee in PageView::mouseReleaseEvent(QMouseEvent*) () from ./okularpart.so
#2  0x00007ffff57a8f98 in QWidget::event(QEvent*) () from /home/tobias/kde/qt5/lib/libQt5Widgets.so.5
#3  0x00007ffff584aaee in QFrame::event(QEvent*) () from /home/tobias/kde/qt5/lib/libQt5Widgets.so.5
#4  0x00007fffe6a93a43 in PageView::viewportEvent(QEvent*) () from ./okularpart.so
#5  0x00007ffff4cfa2dd in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /home/tobias/kde/qt5/lib/libQt5Core.so.5
#6  0x00007ffff576a3d5 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /home/tobias/kde/qt5/lib/libQt5Widgets.so.5
#7  0x00007ffff5772567 in QApplication::notify(QObject*, QEvent*) () from /home/tobias/kde/qt5/lib/libQt5Widgets.so.5
#8  0x00007ffff4cfa558 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /home/tobias/kde/qt5/lib/libQt5Core.so.5
#9  0x00007ffff5770eb2 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) ()
   from /home/tobias/kde/qt5/lib/libQt5Widgets.so.5
#10 0x00007ffff57c4113 in ?? () from /home/tobias/kde/qt5/lib/libQt5Widgets.so.5
#11 0x00007ffff57c6729 in ?? () from /home/tobias/kde/qt5/lib/libQt5Widgets.so.5
#12 0x00007ffff576a3fc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /home/tobias/kde/qt5/lib/libQt5Widgets.so.5
#13 0x00007ffff57719cf in QApplication::notify(QObject*, QEvent*) () from /home/tobias/kde/qt5/lib/libQt5Widgets.so.5
#14 0x00007ffff4cfa558 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /home/tobias/kde/qt5/lib/libQt5Core.so.5
#15 0x00007ffff51033db in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) ()
   from /home/tobias/kde/qt5/lib/libQt5Gui.so.5
#16 0x00007ffff5104f55 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()
   from /home/tobias/kde/qt5/lib/libQt5Gui.so.5
#17 0x00007ffff50ddc3b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /home/tobias/kde/qt5/lib/libQt5Gui.so.5
#18 0x00007fffe90a88eb in ?? ()
   from /media/tobias/edf72459-168b-43b6-b35a-f2b198488c25/tobias/Dev/OSScontrib/kde/qt5/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#19 0x00007ffff4cf888a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /home/tobias/kde/qt5/lib/libQt5Core.so.5
#20 0x00007ffff4d01a40 in QCoreApplication::exec() () from /home/tobias/kde/qt5/lib/libQt5Core.so.5
#21 0x000055555556197c in main ()

I'm setting this to confirmed, but note that in worst case you and me saw two unrelated issues with the same document.
Comment 2 Tobias Deiminger 2019-06-19 05:28:28 UTC
The problem is that Okular has bogus handling for Poppler::Link::OCGState. If a document contains such a link, we meet the case arm

        case Poppler::Link::OCGState:
            Q_UNREACHABLE();

This aborts Okular immediately in debug builds when scrolling to the page, or leads to construction of an Okular::ObjectRect with m_object = 0x0 in release builds, causing the crash to happen later (that's what happened in my trial from comment 2).

We either have to handle the "not implemented yet" situation more gracefully. Or create a suitable Okular::Action object to expose the feature if Okular is already capable of handling OCGState links. Didn't check what's the current state here, does anybody know?
Comment 3 Albert Astals Cid 2019-06-22 09:58:55 UTC
(In reply to Tobias Deiminger from comment #2)
> The problem is that Okular has bogus handling for Poppler::Link::OCGState.
> If a document contains such a link, we meet the case arm
> 
>         case Poppler::Link::OCGState:
>             Q_UNREACHABLE();
> 
> This aborts Okular immediately in debug builds when scrolling to the page,
> or leads to construction of an Okular::ObjectRect with m_object = 0x0 in
> release builds, causing the crash to happen later (that's what happened in
> my trial from comment 2).
> 
> We either have to handle the "not implemented yet" situation more
> gracefully. Or create a suitable Okular::Action object to expose the feature
> if Okular is already capable of handling OCGState links. Didn't check what's
> the current state here, does anybody know?

That is bad, we have support for OCGState links. Let me try to see what happened.
Comment 4 Albert Astals Cid 2019-06-22 10:24:18 UTC
So i had a brain malfunction and when implementing this in 2016 i forgot to commit half the implementation :?

Commiting in a moment
Comment 5 Albert Astals Cid 2019-06-22 10:39:40 UTC
Git commit f3f7ca79fcf1ae3521ed9b7d8b586f3d45b8a487 by Albert Astals Cid.
Committed on 22/06/2019 at 10:35.
Pushed by aacid into branch 'Applications/19.04'.

Fix crash for rects that don't have an action

It shouldn't really happen, but in some cases it does, so be protective

M  +6    -1    ui/pageview.cpp

https://invent.kde.org/kde/okular/commit/f3f7ca79fcf1ae3521ed9b7d8b586f3d45b8a487
Comment 6 Albert Astals Cid 2019-06-22 10:39:40 UTC
Git commit ea2a7b264f3135b9ea5f82a877c725f0b7491365 by Albert Astals Cid.
Committed on 22/06/2019 at 10:36.
Pushed by aacid into branch 'Applications/19.04'.

PDF: Finish support for Optional Content state change links

I implemented this 3 years ago, but for some reason forgot to commit this part ^_^

M  +6    -1    generators/poppler/generator_pdf.cpp

https://invent.kde.org/kde/okular/commit/ea2a7b264f3135b9ea5f82a877c725f0b7491365
Comment 7 Albert Astals Cid 2019-07-03 20:29:28 UTC
*** Bug 409462 has been marked as a duplicate of this bug. ***