Bug 453987 - Okular crash when canceling more actions than done
Summary: Okular crash when canceling more actions than done
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 22.04.1
Platform: Neon Linux
: NOR crash
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2022-05-18 14:43 UTC by Dilam
Modified: 2022-05-22 21:55 UTC (History)
1 user (show)

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


Attachments
How Okular crash (2.08 MB, video/x-matroska)
2022-05-18 14:51 UTC, Dilam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dilam 2022-05-18 14:43:24 UTC
Application: okular (22.04.1)

Qt Version: 5.15.3
Frameworks Version: 5.93.0
Operating System: Linux 5.13.0-41-generic x86_64
Windowing System: X11
Distribution: KDE neon User - 5.24
DrKonqi: 5.24.5 [KCrashBackend]

-- Information about the crash:
- What I was doing when the application crashed:
I opened a pdf, added a note without writing on it. Then I right clicked on it and "cancel (Ctrl+z)".
It crashes immediately because there is nothing in the note to cancel.

- Unusual behavior I noticed:
The cancel option is available when there is nothing to cancel.

- Expected behavior:
I was trying to remove the Note. There is no cancel button on it, and by right-clicking the cancel option is available (and no remove Note option). So I thought it might remove the note. But it just make the app crash.

The crash can be reproduced every time.

-- Backtrace:
Application: Okular (okular), signal: Segmentation fault

[New LWP 517050]
[New LWP 517099]
[New LWP 517100]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007f13b508899f in __GI___poll (fds=0x7ffc0e279b38, nfds=1, timeout=1000) at ../sysdeps/unix/sysv/linux/poll.c:29
__preamble__
[Current thread is 1 (Thread 0x7f13b150f980 (LWP 517049))]

Thread 4 (Thread 0x7f139ccbe700 (LWP 517100)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5622bebd9c08) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5622bebd9bb8, cond=0x5622bebd9be0) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x5622bebd9be0, mutex=0x5622bebd9bb8) at pthread_cond_wait.c:647
#3  0x00007f13a263a5eb in ?? () from /usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so
#4  0x00007f13a263a1eb in ?? () from /usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so
#5  0x00007f13b4594609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#6  0x00007f13b5095133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7f13aaf8b700 (LWP 517099)):
#0  0x00007f13b508899f in __GI___poll (fds=0x7f13a4004e60, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f13b3b7936e in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f13b3b794a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f13b565965b in QEventDispatcherGlib::processEvents (this=0x7f13a4000b60, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007f13b55fd87b in QEventLoop::exec (this=this@entry=0x7f13aaf8abf0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:141
#5  0x00007f13b5417442 in QThread::exec (this=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#6  0x00007f13b58baf4b in ?? () from /lib/x86_64-linux-gnu/libQt5DBus.so.5
#7  0x00007f13b5418623 in QThreadPrivate::start (arg=0x7f13b593ed80) at thread/qthread_unix.cpp:331
#8  0x00007f13b4594609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#9  0x00007f13b5095133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7f13b09a4700 (LWP 517050)):
#0  0x00007f13b508899f in __GI___poll (fds=0x7f13b09a3b28, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f13b486cc1a in ?? () from /lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007f13b486e90a in xcb_wait_for_event () from /lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007f13b10f31a8 in QXcbEventQueue::run (this=0x5622be6e4df0) at qxcbeventqueue.cpp:228
#4  0x00007f13b5418623 in QThreadPrivate::start (arg=0x5622be6e4df0) at thread/qthread_unix.cpp:331
#5  0x00007f13b4594609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#6  0x00007f13b5095133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7f13b150f980 (LWP 517049)):
[KCrash Handler]
#4  0x00005622bf21b700 in ?? ()
#5  0x00007f13b61c0d76 in QWidget::event (this=this@entry=0x5622becb9bc0, event=event@entry=0x7ffc0e27b1f0) at kernel/qwidget.cpp:8677
#6  0x00007f13b6271822 in QFrame::event (this=0x5622becb9bc0, e=0x7ffc0e27b1f0) at widgets/qframe.cpp:550
#7  0x00007f13b55feae3 in QCoreApplicationPrivate::sendThroughObjectEventFilters (event=<optimized out>, receiver=<optimized out>) at kernel/qcoreapplication.cpp:1190
#8  QCoreApplicationPrivate::sendThroughObjectEventFilters (receiver=receiver@entry=0x5622bf1fc830, event=event@entry=0x7ffc0e27b1f0) at kernel/qcoreapplication.cpp:1179
#9  0x00007f13b617ddb2 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x5622bf1fc830, e=0x7ffc0e27b1f0) at kernel/qapplication.cpp:3631
#10 0x00007f13b6187983 in QApplication::notify(QObject*, QEvent*) () at kernel/qapplication.cpp:3243
#11 0x00007f13b55fed7a in QCoreApplication::notifyInternal2 (receiver=0x5622bf1fc830, event=0x7ffc0e27b1f0) at ../../include/QtCore/5.15.3/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:332
#12 0x00007f13b61dc61c in QWidgetWindow::handleMouseEvent (this=0x5622beb09680, event=0x7ffc0e27b6b0) at kernel/qwidgetwindow.cpp:691
#13 0x00007f13b61df284 in QWidgetWindow::event (event=0x7ffc0e27b6b0, this=0x5622beb09680) at kernel/qwidgetwindow.cpp:300
#14 QWidgetWindow::event (this=0x5622beb09680, event=0x7ffc0e27b6b0) at kernel/qwidgetwindow.cpp:239
#15 0x00007f13b617ddc3 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x5622beb09680, e=0x7ffc0e27b6b0) at kernel/qapplication.cpp:3637
#16 0x00007f13b6186bd8 in QApplication::notify(QObject*, QEvent*) () at kernel/qapplication.cpp:3161
#17 0x00007f13b55fed7a in QCoreApplication::notifyInternal2 (receiver=0x5622beb09680, event=0x7ffc0e27b6b0) at ../../include/QtCore/5.15.3/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:332
#18 0x00007f13b5a80578 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at kernel/qguiapplication.cpp:2282
#19 0x00007f13b5a81be5 in QGuiApplicationPrivate::processWindowSystemEvent (e=0x5622bf226f50) at kernel/qguiapplication.cpp:2002
#20 0x00007f13b5a597bc in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#21 0x00007f13b10f41ce in xcbSourceDispatch (source=<optimized out>) at qxcbeventdispatcher.cpp:105
#22 0x00007f13b3b7917d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007f13b3b79400 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007f13b3b794a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007f13b5659642 in QEventDispatcherGlib::processEvents (this=0x5622be7af040, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#26 0x00007f13b55fd87b in QEventLoop::exec (this=this@entry=0x7ffc0e27ba50, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:141
#27 0x00007f13b5605a24 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#28 0x00005622be090c52 in main (argc=<optimized out>, argv=<optimized out>) at ./shell/main.cpp:105
[Inferior 1 (process 517049) detached]

Possible duplicates by query: bug 447409, bug 440647, bug 439216, bug 437334, bug 436840.

Reported using DrKonqi
Comment 1 Dilam 2022-05-18 14:51:48 UTC
Created attachment 148957 [details]
How Okular crash
Comment 2 Albert Astals Cid 2022-05-18 20:48:29 UTC
Confirmed, It is important that you use the menu and not the shortcut.

shortcut will work just fine, menu will crash.
Comment 3 Bug Janitor Service 2022-05-18 21:13:45 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/620
Comment 4 Albert Astals Cid 2022-05-22 21:55:12 UTC
Git commit 1a980008be43e006c21254c45a06b7dd17a215bd by Albert Astals Cid.
Committed on 18/05/2022 at 21:12.
Pushed by aacid into branch 'release/22.04'.

Fix crash while undoing with the menu on an empty annotation

M  +10   -1    part/annotwindow.cpp

https://invent.kde.org/graphics/okular/commit/1a980008be43e006c21254c45a06b7dd17a215bd