Bug 445429

Summary: KPA Viewer crashes on arrow-key up
Product: [Applications] kphotoalbum Reporter: Andreas Schleth <schleth_es>
Component: generalAssignee: KPhotoAlbum Bugs <kphotoalbum-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: johannes, tl
Priority: NOR Keywords: drkonqi
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Andreas Schleth 2021-11-13 17:07:59 UTC
Application: kphotoalbum (v5.8.1-24-ge07a6511)

Qt Version: 5.12.7
Frameworks Version: 5.76.0
Operating System: Linux 5.3.18-59.27-default x86_64
Windowing system: X11
Distribution: openSUSE Leap 15.3

-- Information about the crash:
- What I was doing when the application crashed:
1. start image viewer in full screen (from thumbnail view)
2. hit any of the arrow keys
3. crash (repeatable)

-- Backtrace:
Application: KPhotoAlbum (kphotoalbum), signal: Segmentation fault
[KCrash Handler]
#4  0x00007f0952e89140 in Phonon::MediaObject::currentTime() const () from /usr/lib64/libphonon4qt5.so.4
#5  0x000000000062966a in Viewer::PhononDisplay::relativeSeek (this=0xe32e490, msec=-1000) at /home/usr/src/kphotoalbum-git/kphotoalbum/Viewer/PhononDisplay.cpp:204
#6  0x000000000050d688 in Viewer::ViewerWidget::<lambda(const QString&, char const*, int, const QKeySequence&)>::<lambda()>::operator()(void) const (__closure=0xdb24610) at /home/usr/src/kphotoalbum-git/kphotoalbum/Viewer/ViewerWidget.cpp:1200
#7  0x00000000005108ac in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, Viewer::ViewerWidget::createVideoMenu()::<lambda(const QString&, char const*, int, const QKeySequence&)>::<lambda()> >::call(Viewer::ViewerWidget::<lambda(const QString&, char const*, int, const QKeySequence&)>::<lambda()> &, void **) (f=..., arg=0x7ffc75d179f0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:146
#8  0x0000000000510858 in QtPrivate::Functor<Viewer::ViewerWidget::createVideoMenu()::<lambda(const QString&, char const*, int, const QKeySequence&)>::<lambda()>, 0>::call<QtPrivate::List<>, void>(Viewer::ViewerWidget::<lambda(const QString&, char const*, int, const QKeySequence&)>::<lambda()> &, void *, void **) (f=..., arg=0x7ffc75d179f0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:256
#9  0x00000000005107fc in QtPrivate::QFunctorSlotObject<Viewer::ViewerWidget::createVideoMenu()::<lambda(const QString&, char const*, int, const QKeySequence&)>::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=1, this_=0xdb24600, r=0xdb240f0, a=0x7ffc75d179f0, ret=0x0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:439
#10 0x00007f094d97efcf in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQt5Core.so.5
#11 0x00007f094e7ce892 in QAction::triggered(bool) () from /usr/lib64/libQt5Widgets.so.5
#12 0x00007f094e7d0eac in QAction::activate(QAction::ActionEvent) () from /usr/lib64/libQt5Widgets.so.5
#13 0x00007f094e7d1801 in QAction::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#14 0x00007f094e7d4f9c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#15 0x00007f094e7dc5b0 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#16 0x00007f094d94f3a8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#17 0x00007f094df81272 in QShortcutMap::dispatchEvent(QKeyEvent*) () from /usr/lib64/libQt5Gui.so.5
#18 0x00007f094df8133a in QShortcutMap::tryShortcut(QKeyEvent*) () from /usr/lib64/libQt5Gui.so.5
#19 0x00007f094df34b93 in QWindowSystemInterface::handleShortcutEvent(QWindow*, unsigned long, int, QFlags<Qt::KeyboardModifier>, unsigned int, unsigned int, unsigned int, QString const&, bool, unsigned short) () from /usr/lib64/libQt5Gui.so.5
#20 0x00007f094df52c87 in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) () from /usr/lib64/libQt5Gui.so.5
#21 0x00007f094df57815 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib64/libQt5Gui.so.5
#22 0x00007f094df312bb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Gui.so.5
#23 0x00007f0940f6925a in ?? () from /usr/lib64/libQt5XcbQpa.so.5
#24 0x00007f09464bb694 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#25 0x00007f09464bba30 in ?? () from /usr/lib64/libglib-2.0.so.0
#26 0x00007f09464bbabc in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#27 0x00007f094d9ac42f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#28 0x00007f094d94d5fa in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#29 0x00007f094d956800 in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5
#30 0x000000000048c140 in main (argc=3, argv=0x7ffc75d18858) at /home/usr/src/kphotoalbum-git/kphotoalbum/main.cpp:162
[Inferior 1 (process 25543) detached]

Reported using DrKonqi
Comment 1 Tobias Leupold 2021-11-13 17:23:54 UTC
I can't reproduce this with this exact revision?!

What I tried:
 – Select image from thumbnail view to start the viewer
 – Press F11 to view it full screen
 –  Press arrow keys

Nothing happen here …
Comment 2 Johannes Zarl-Zierl 2021-11-13 23:30:23 UTC
I can reproduce this using the phonon video backend, but not the VLC one (which fits the backtrace that you sent).
Interestingly enough, the crash is triggered with images not just videos.
Comment 3 Johannes Zarl-Zierl 2021-11-14 01:03:06 UTC
Git commit 9b667402baa764ba04304e5325cf75fff0de0c7e by Johannes Zarl-Zierl.
Committed on 14/11/2021 at 00:55.
Pushed by johanneszarl into branch 'master'.

Fix crash when PhononDisplay is not yet initialized

M  +3    -3    Viewer/PhononDisplay.cpp

https://invent.kde.org/graphics/kphotoalbum/commit/9b667402baa764ba04304e5325cf75fff0de0c7e
Comment 4 Tobias Leupold 2021-11-14 07:21:31 UTC
Ah, I forgot we have multiple backends by now. My bad …
Comment 5 Andreas Schleth 2021-11-14 15:28:07 UTC
With v5.8.1-27-gc84a78de all is well.
 
My cat can run across the keyboard and nothing crashes. 
This is how it should be everywhere :-)

Thanks for picking this up.