Bug 472523 - KPhotoAlbum crashes when right clicking in the empty space below category tags in Annotations window
Summary: KPhotoAlbum crashes when right clicking in the empty space below category tag...
Status: RESOLVED FIXED
Alias: None
Product: kphotoalbum
Classification: Applications
Component: Annotation Dialog (show other bugs)
Version: GIT master
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: KPhotoAlbum Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-23 06:43 UTC by Victor Lobo
Modified: 2023-07-23 23:56 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot of where to right click to induce crash (397.95 KB, image/png)
2023-07-23 06:43 UTC, Victor Lobo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Lobo 2023-07-23 06:43:59 UTC
Created attachment 160462 [details]
Screenshot of where to right click to induce crash

SUMMARY
KPhotoAlbum crashes when right clicking in the empty space below category (people, places, events etc.) tag names in Annotations window (see empty space in screenshot attached)


STEPS TO REPRODUCE
1. Open KPhotoAlbum
2. Click on Show Thumbnails
3. Open the Annotations window (Ctrl + 1 on any image/video)
4. Annotations window opens
5. Right Click in empty space below tags displayed for people (or places or events etc.)
6. KPhotoAlbum crashes

Screenshot of where to right click to induce crash is attached.

OBSERVED RESULT
Crash

EXPECTED RESULT
No crash; ignore right click and remain on Annotations screen.

SOFTWARE/OS VERSIONS
Linux: openSUSE Tumbleweed 20230714; Kernel Version: 6.4.2-1-default (64-bit)
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10
KPhotoAlbum Version 5.11.0 (as installed from Opensuse Tumbleweed repository)
Also occurs in latest git version v5.11.0-14-g7821c840


ADDITIONAL INFORMATION
1. Crash is reproducible every time the steps are followed.
2. Crash occurs in Annotations window and Search window
3. Crash occurs even in the demo database and is regardless of picture or video selected.


GDB Backtrace for current thread:
#0  QAction::setEnabled (this=0x0, b=false) at kernel/qaction.cpp:1016
#1  0x00000000005e5cd6 in AnnotationDialog::ListSelect::showContextMenu(QPoint const&) ()
#2  0x00000000005eb1c4 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QPoint const&>, void, void (AnnotationDialog::ListSelect::*)(QPoint const&)>::call(void (AnnotationDialog::ListSelect::*)(QPoint const&), AnnotationDialog::ListSelect*, void**) ()
#3  0x00000000005eafff in void QtPrivate::FunctionPointer<void (AnnotationDialog::ListSelect::*)(QPoint const&)>::call<QtPrivate::List<QPoint const&>, void>(void (AnnotationDialog::ListSelect::*)(QPoint const&), AnnotationDialog::ListSelect*, void**) ()
#4  0x00000000005eaced in QtPrivate::QSlotObject<void (AnnotationDialog::ListSelect::*)(QPoint const&), QtPrivate::List<QPoint const&>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) ()
#5  0x00007fffec7257a2 in QtPrivate::QSlotObjectBase::call (a=0x7fffffffab50, r=0x1ed4010, this=0x1ee54a0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#6  doActivate<false> (sender=0x1ed6120, signal_index=6, argv=0x7fffffffab50) at kernel/qobject.cpp:3925
#7  0x00007fffec71e40f in QMetaObject::activate (sender=sender@entry=0x1ed6120, m=m@entry=0x7fffed8bc2c0 <QWidget::staticMetaObject>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7fffffffab50) at kernel/qobject.cpp:3985
#8  0x00007fffed3cc2a5 in QWidget::customContextMenuRequested (this=this@entry=0x1ed6120, _t1=...) at .moc/moc_qwidget.cpp:653
#9  0x00007fffed3e7a79 in QWidget::event (this=this@entry=0x1ed6120, event=event@entry=0x7fffffffaf90) at kernel/qwidget.cpp:8852
#10 0x00007fffed491f7e in QFrame::event (this=0x1ed6120, e=0x7fffffffaf90) at widgets/qframe.cpp:550
#11 0x00007fffec6ed27b in QCoreApplicationPrivate::sendThroughObjectEventFilters (receiver=receiver@entry=0x1ed6ea0, event=event@entry=0x7fffffffaf90) at kernel/qcoreapplication.cpp:1190
#12 0x00007fffed3a518e in QApplicationPrivate::notify_helper (this=this@entry=0x837080, receiver=receiver@entry=0x1ed6ea0, e=e@entry=0x7fffffffaf90) at kernel/qapplication.cpp:3634
#13 0x00007fffed3adaaa in QApplication::notify (this=<optimized out>, receiver=<optimized out>, e=0x7fffffffaf90) at kernel/qapplication.cpp:3246
#14 0x00007fffec6ed4f8 in QCoreApplication::notifyInternal2 (receiver=0x1ed6ea0, event=0x7fffffffaf90) at kernel/qcoreapplication.cpp:1064
#15 0x00007fffec6ed542 in QCoreApplication::forwardEvent (receiver=<optimized out>, event=<optimized out>, originatingEvent=<optimized out>) at kernel/qcoreapplication.cpp:1079
#16 0x00007fffed3fff59 in QWidgetWindow::handleMouseEvent (this=this@entry=0x20d3e00, event=event@entry=0x7fffffffb280) at kernel/qwidgetwindow.cpp:692
#17 0x00007fffed402d1f in QWidgetWindow::event (this=0x20d3e00, event=0x7fffffffb280) at kernel/qwidgetwindow.cpp:300
#18 0x00007fffed3a519e in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x20d3e00, e=0x7fffffffb280) at kernel/qapplication.cpp:3640
#19 0x00007fffec6ed4f8 in QCoreApplication::notifyInternal2 (receiver=0x20d3e00, event=0x7fffffffb280) at kernel/qcoreapplication.cpp:1064
#20 0x00007fffec6ed6ce in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1474
#21 0x00007fffecb7d12b in QGuiApplicationPrivate::processMouseEvent (e=0x1ec80f0) at kernel/qguiapplication.cpp:2285
#22 0x00007fffecb503ac in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#23 0x00007fffe2f181aa in xcbSourceDispatch (source=<optimized out>) at qxcbeventdispatcher.cpp:105
#24 0x00007fffe8f2b988 in g_main_dispatch (context=0x7fffdc000ee0) at ../glib/gmain.c:3460
#25 g_main_context_dispatch (context=context@entry=0x7fffdc000ee0) at ../glib/gmain.c:4200
#26 0x00007fffe8f2bd98 in g_main_context_iterate (context=context@entry=0x7fffdc000ee0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4276
#27 0x00007fffe8f2be2c in g_main_context_iteration (context=0x7fffdc000ee0, may_block=1) at ../glib/gmain.c:4343
#28 0x00007fffec746496 in QEventDispatcherGlib::processEvents (this=0x910900, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#29 0x00007fffec6ebf8b in QEventLoop::exec (this=this@entry=0x7fffffffb5b0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#30 0x00007fffed5ada07 in QDialog::exec (this=0xe04820) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#31 0x00000000005d33b0 in AnnotationDialog::Dialog::exec() ()
#32 0x00000000005d164f in AnnotationDialog::Dialog::configure(DB::ImageInfoList, bool) ()
#33 0x00000000005261ad in MainWindow::Window::configImages(DB::ImageInfoList const&, bool) ()
#34 0x000000000052614b in MainWindow::Window::configureImages(DB::ImageInfoList const&, bool) ()
#35 0x00000000005260a2 in MainWindow::Window::configureImages(bool) ()
#36 0x0000000000525f31 in MainWindow::Window::slotConfigureImagesOneAtATime() ()
#37 0x000000000053d2bf in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (MainWindow::Window::*)()>::call(void (MainWindow::Window::*)(), MainWindow::Window*, void**) ()
#38 0x000000000053ca5d in void QtPrivate::FunctionPointer<void (MainWindow::Window::*)()>::call<QtPrivate::List<>, void>(void (MainWindow::Window::*)(), MainWindow::Window*, void**) ()
#39 0x000000000053b36f in QtPrivate::QSlotObject<void (MainWindow::Window::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) ()
#40 0x00007fffec7257a2 in QtPrivate::QSlotObjectBase::call (a=0x7fffffffb9d0, r=0xb06590, this=0xe4fe00) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#41 doActivate<false> (sender=0xe4ff30, signal_index=4, argv=0x7fffffffb9d0) at kernel/qobject.cpp:3925
#42 0x00007fffec71e40f in QMetaObject::activate (sender=sender@entry=0xe4ff30, m=m@entry=0x7fffed8bacc0 <QAction::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fffffffb9d0) at kernel/qobject.cpp:3985
#43 0x00007fffed39e8b2 in QAction::triggered (this=this@entry=0xe4ff30, _t1=<optimized out>) at .moc/moc_qaction.cpp:376
#44 0x00007fffed3a142f in QAction::activate (this=0xe4ff30, event=<optimized out>) at kernel/qaction.cpp:1161
#45 0x00007fffed525ef2 in QMenuPrivate::activateCausedStack (this=this@entry=0xf854e0, causedStack=..., action=action@entry=0xe4ff30, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1384
#46 0x00007fffed52dd23 in QMenuPrivate::activateAction (this=0xf854e0, action=0xe4ff30, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:1461
#47 0x00007fffed3e6d68 in QWidget::event (this=0x7fffffffc690, event=0x7fffffffbfc0) at kernel/qwidget.cpp:9045
#48 0x00007fffed3a519e in QApplicationPrivate::notify_helper (this=this@entry=0x837080, receiver=receiver@entry=0x7fffffffc690, e=e@entry=0x7fffffffbfc0) at kernel/qapplication.cpp:3640
#49 0x00007fffed3ad5cf in QApplication::notify (this=<optimized out>, receiver=<optimized out>, e=0x7fffffffbfc0) at kernel/qapplication.cpp:3084
#50 0x00007fffec6ed4f8 in QCoreApplication::notifyInternal2 (receiver=0x7fffffffc690, event=0x7fffffffbfc0) at kernel/qcoreapplication.cpp:1064
#51 0x00007fffec6ed6ce in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1474
#52 0x00007fffed3ab92e in QApplicationPrivate::sendMouseEvent (receiver=0x7fffffffc690, event=event@entry=0x7fffffffbfc0, alienWidget=<optimized out>, nativeWidget=0x7fffffffc690, buttonDown=buttonDown@entry=0x7fffed8f2330 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at kernel/qapplication.cpp:2622
#53 0x00007fffed4002ca in QWidgetWindow::handleMouseEvent (this=this@entry=0x1166c40, event=event@entry=0x7fffffffc270) at kernel/qwidgetwindow.cpp:580
#54 0x00007fffed402d1f in QWidgetWindow::event (this=0x1166c40, event=0x7fffffffc270) at kernel/qwidgetwindow.cpp:300
#55 0x00007fffed3a519e in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x1166c40, e=0x7fffffffc270) at kernel/qapplication.cpp:3640
#56 0x00007fffec6ed4f8 in QCoreApplication::notifyInternal2 (receiver=0x1166c40, event=0x7fffffffc270) at kernel/qcoreapplication.cpp:1064
#57 0x00007fffec6ed6ce in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1474
#58 0x00007fffecb7d12b in QGuiApplicationPrivate::processMouseEvent (e=0xf6a9b0) at kernel/qguiapplication.cpp:2285
#59 0x00007fffecb503ac in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#60 0x00007fffe2f181aa in xcbSourceDispatch (source=<optimized out>) at qxcbeventdispatcher.cpp:105
#61 0x00007fffe8f2b988 in g_main_dispatch (context=0x7fffdc000ee0) at ../glib/gmain.c:3460
#62 g_main_context_dispatch (context=context@entry=0x7fffdc000ee0) at ../glib/gmain.c:4200
#63 0x00007fffe8f2bd98 in g_main_context_iterate (context=context@entry=0x7fffdc000ee0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4276
#64 0x00007fffe8f2be2c in g_main_context_iteration (context=0x7fffdc000ee0, may_block=1) at ../glib/gmain.c:4343
#65 0x00007fffec746496 in QEventDispatcherGlib::processEvents (this=0x910900, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#66 0x00007fffec6ebf8b in QEventLoop::exec (this=this@entry=0x7fffffffc5b0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#67 0x00007fffed52b70f in QMenuPrivate::exec(QPoint const&, QAction*, std::function<QPoint (QSize const&)>) (this=0xf854e0, p=..., action=0x0, positionFunction=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#68 0x00007fffed52b82f in QMenu::exec (this=<optimized out>, p=..., action=<optimized out>) at widgets/qmenu.cpp:2686
#69 0x0000000000530c82 in MainWindow::Window::contextMenuEvent(QContextMenuEvent*) ()
#70 0x00007fffed3e6d68 in QWidget::event (this=0xb06590, event=0x7fffffffc9e0) at kernel/qwidget.cpp:9045
#71 0x00007ffff7d036a9 in KXmlGuiWindow::event (this=0xb06590, ev=0x7fffffffc9e0) at /usr/src/debug/kxmlgui-5.108.0/src/kxmlguiwindow.cpp:220
#72 0x0000000000527d4a in MainWindow::Window::event(QEvent*) ()
#73 0x00007fffed3a519e in QApplicationPrivate::notify_helper (this=this@entry=0x837080, receiver=receiver@entry=0xb06590, e=e@entry=0x7fffffffc9e0) at kernel/qapplication.cpp:3640
#74 0x00007fffed3adaaa in QApplication::notify (this=<optimized out>, receiver=<optimized out>, e=0x7fffffffcc10) at kernel/qapplication.cpp:3246
#75 0x00007fffec6ed4f8 in QCoreApplication::notifyInternal2 (receiver=0xd5d690, event=0x7fffffffcc10) at kernel/qcoreapplication.cpp:1064
#76 0x00007fffec6ed542 in QCoreApplication::forwardEvent (receiver=<optimized out>, event=<optimized out>, originatingEvent=<optimized out>) at kernel/qcoreapplication.cpp:1079
#77 0x00007fffed3fff59 in QWidgetWindow::handleMouseEvent (this=this@entry=0xce8e20, event=event@entry=0x7fffffffcf00) at kernel/qwidgetwindow.cpp:692
#78 0x00007fffed402d1f in QWidgetWindow::event (this=0xce8e20, event=0x7fffffffcf00) at kernel/qwidgetwindow.cpp:300
#79 0x00007fffed3a519e in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0xce8e20, e=0x7fffffffcf00) at kernel/qapplication.cpp:3640
#80 0x00007fffec6ed4f8 in QCoreApplication::notifyInternal2 (receiver=0xce8e20, event=0x7fffffffcf00) at kernel/qcoreapplication.cpp:1064
#81 0x00007fffec6ed6ce in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1474
#82 0x00007fffecb7d12b in QGuiApplicationPrivate::processMouseEvent (e=0xf0fea0) at kernel/qguiapplication.cpp:2285
#83 0x00007fffecb503ac in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#84 0x00007fffe2f181aa in xcbSourceDispatch (source=<optimized out>) at qxcbeventdispatcher.cpp:105
#85 0x00007fffe8f2b988 in g_main_dispatch (context=0x7fffdc000ee0) at ../glib/gmain.c:3460
#86 g_main_context_dispatch (context=context@entry=0x7fffdc000ee0) at ../glib/gmain.c:4200
#87 0x00007fffe8f2bd98 in g_main_context_iterate (context=context@entry=0x7fffdc000ee0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4276
#88 0x00007fffe8f2be2c in g_main_context_iteration (context=0x7fffdc000ee0, may_block=1) at ../glib/gmain.c:4343
#89 0x00007fffec746496 in QEventDispatcherGlib::processEvents (this=0x910900, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#90 0x00007fffec6ebf8b in QEventLoop::exec (this=this@entry=0x7fffffffd230, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#91 0x00007fffec6f4420 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#92 0x000000000046ea51 in main ()
Comment 1 Johannes Zarl-Zierl 2023-07-23 14:45:15 UTC
Thanks for the report!
I'm kind of impressed that you found such an easily triggerable bug in a core dialog...
Comment 2 Johannes Zarl-Zierl 2023-07-23 14:57:18 UTC
Git commit 11a3b96a69697c443ce200d8676c839a31456552 by Johannes Zarl-Zierl.
Committed on 23/07/2023 at 16:57.
Pushed by johanneszarl into branch 'master'.

Fix crash when right-clicking in the empty part of a ListSelect

As described in 68efacfc3, right-clicking into the empty part of a
ListSelect would crash kphotoalbum. The bug was introduced by commit
68efacfc3 which was first released in v5.7.0.

M  +2    -1    AnnotationDialog/ListSelect.cpp
M  +1    -0    CHANGELOG.md

https://invent.kde.org/graphics/kphotoalbum/-/commit/11a3b96a69697c443ce200d8676c839a31456552
Comment 3 Victor Lobo 2023-07-23 23:56:01 UTC
Thank you! A very quick response again. I tested the fix and it works well.