Bug 475388 - KPhotoAlbum crashes after Delete Image in Annotations window for an image that is already deleted
Summary: KPhotoAlbum crashes after Delete Image in Annotations window for an image tha...
Status: VERIFIED FIXED
Alias: None
Product: kphotoalbum
Classification: Applications
Component: Annotation Dialog (show other bugs)
Version: 5.11.0
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: KPhotoAlbum Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-08 23:41 UTC by Victor Lobo
Modified: 2023-10-16 23:36 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Lobo 2023-10-08 23:41:19 UTC
SUMMARY
KPhotoAlbum crashes after Delete Image in Annotations window for an image that is already deleted. 
Although this bug is similar to bug 475387, I created a new bug report since this bug has a different backtrace. 


STEPS TO REPRODUCE
1. Open KPhotoAlbum
2. Go to Thumbnail View
3. Open an Image/Video in Annotations window
4. Keep the Annotations window open and go back to the Thumbnail view and delete the same image/video (Press Delete key)
5. Select move to trash or delete from disk or remove from database and click OK (in the Removing Items dialog popup)
6. Go back to Annotations window and click on Delete Image icon
7. Click OK (in the Removing Items dialog popup)
8. Crash

OBSERVED RESULT
Crash

EXPECTED RESULT
No crash

SOFTWARE/OS VERSIONS
Linux: openSUSE Tumbleweed 20230906; Kernel Version: 6.4.12-1-default (64-bit)
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.109.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-127-g5f528e40

ADDITIONAL INFORMATION
1. Crash is reproducible every time the steps are followed.
2. Crash occurs even in the demo database.
3. Crash occurs for Images and Videos.


Backtrace:
Application: KPhotoAlbum (kphotoalbum), signal: Segmentation fault

[KCrash Handler]
#4  0x000000000059151e in DB::ImageInfo::stackId (this=0x0) at /home/victor/kphotoalbum/DB/ImageInfo.cpp:276
#5  0x00000000005871d7 in DB::ImageDB::deleteList (this=0x1402b10, list=...) at /home/victor/kphotoalbum/DB/ImageDB.cpp:613
#6  0x00000000005870fc in DB::ImageDB::addToBlockList (this=0x1402b10, list=...) at /home/victor/kphotoalbum/DB/ImageDB.cpp:601
#7  0x00000000006535c5 in Utilities::DeleteFiles::deleteFilesPrivate (this=0x2ec22e0, files=..., method=Utilities::BlockFromDatabase) at /home/victor/kphotoalbum/Utilities/DeleteFiles.cpp:75
#8  0x0000000000653203 in Utilities::DeleteFiles::deleteFiles (files=..., method=Utilities::BlockFromDatabase) at /home/victor/kphotoalbum/Utilities/DeleteFiles.cpp:31
#9  0x00000000005245d3 in MainWindow::DeleteDialog::deleteImages (this=0x7ffe6035fc70) at /home/victor/kphotoalbum/MainWindow/DeleteDialog.cpp:89
#10 0x0000000000524bfa in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (MainWindow::DeleteDialog::*)()>::call(void (MainWindow::DeleteDialog::*)(), MainWindow::DeleteDialog*, void**) (f=(void (MainWindow::DeleteDialog::*)(MainWindow::DeleteDialog * const)) 0x52457a <MainWindow::DeleteDialog::deleteImages()>, o=0x7ffe6035fc70, arg=0x7ffe6035ed90) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:152
#11 0x0000000000524b8c in QtPrivate::FunctionPointer<void (MainWindow::DeleteDialog::*)()>::call<QtPrivate::List<>, void>(void (MainWindow::DeleteDialog::*)(), MainWindow::DeleteDialog*, void**) (f=(void (MainWindow::DeleteDialog::*)(MainWindow::DeleteDialog * const)) 0x52457a <MainWindow::DeleteDialog::deleteImages()>, o=0x7ffe6035fc70, arg=0x7ffe6035ed90) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:185
#12 0x0000000000524af7 in QtPrivate::QSlotObject<void (MainWindow::DeleteDialog::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x16cdee0, r=0x7ffe6035fc70, a=0x7ffe6035ed90, ret=0x0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:418
#13 0x00007f09b0325812 in QtPrivate::QSlotObjectBase::call (a=0x7ffe6035ed90, r=0x7ffe6035fc70, this=0x16cdee0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#14 doActivate<false> (sender=0x1bb8b70, signal_index=8, argv=0x7ffe6035ed90) at kernel/qobject.cpp:3925
#15 0x00007f09b031e47f in QMetaObject::activate (sender=sender@entry=0x1bb8b70, m=m@entry=0x7f09b14c9440 <QDialogButtonBox::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x0) at kernel/qobject.cpp:3985
#16 0x00007f09b1140203 in QDialogButtonBox::accepted (this=this@entry=0x1bb8b70) at .moc/moc_qdialogbuttonbox.cpp:287
#17 0x00007f09b1140860 in QDialogButtonBoxPrivate::_q_handleButtonClicked (this=<optimized out>) at widgets/qdialogbuttonbox.cpp:878
#18 0x00007f09b03257b3 in doActivate<false> (sender=0x154ac40, signal_index=9, argv=0x7ffe6035eef0) at kernel/qobject.cpp:3937
#19 0x00007f09b031e47f in QMetaObject::activate (sender=sender@entry=0x154ac40, m=m@entry=0x7f09b14c0280 <QAbstractButton::staticMetaObject>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7ffe6035eef0) at kernel/qobject.cpp:3985
#20 0x00007f09b1096ac2 in QAbstractButton::clicked (this=this@entry=0x154ac40, _t1=<optimized out>) at .moc/moc_qabstractbutton.cpp:308
#21 0x00007f09b1096d2a in QAbstractButtonPrivate::emitClicked (this=0x2ea6c80) at widgets/qabstractbutton.cpp:416
#22 0x00007f09b1098567 in QAbstractButtonPrivate::click (this=0x2ea6c80) at widgets/qabstractbutton.cpp:409
#23 0x00007f09b1098777 in QAbstractButton::mouseReleaseEvent (this=0x154ac40, e=0x7ffe6035f480) at widgets/qabstractbutton.cpp:1045
#24 0x00007f09b0fe6d68 in QWidget::event (this=0x154ac40, event=0x7ffe6035f480) at kernel/qwidget.cpp:9045
#25 0x00007f09b0fa519e in QApplicationPrivate::notify_helper (this=this@entry=0xf171c0, receiver=receiver@entry=0x154ac40, e=e@entry=0x7ffe6035f480) at kernel/qapplication.cpp:3640
#26 0x00007f09b0fad5cf in QApplication::notify (this=<optimized out>, receiver=<optimized out>, e=0x7ffe6035f480) at kernel/qapplication.cpp:3084
#27 0x00007f09b02ed568 in QCoreApplication::notifyInternal2 (receiver=0x154ac40, event=0x7ffe6035f480) at kernel/qcoreapplication.cpp:1064
#28 0x00007f09b02ed73e in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1474
#29 0x00007f09b0fab92e in QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x154ac40, event=event@entry=0x7ffe6035f480, alienWidget=<optimized out>, nativeWidget=0x7ffe6035fc70, buttonDown=buttonDown@entry=0x7f09b14f2330 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at kernel/qapplication.cpp:2622
#30 0x00007f09b0fff7fd in QWidgetWindow::handleMouseEvent (this=this@entry=0x2c0adb0, event=event@entry=0x7ffe6035f730) at kernel/qwidgetwindow.cpp:684
#31 0x00007f09b1002d1f in QWidgetWindow::event (this=0x2c0adb0, event=0x7ffe6035f730) at kernel/qwidgetwindow.cpp:300
#32 0x00007f09b0fa519e in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x2c0adb0, e=0x7ffe6035f730) at kernel/qapplication.cpp:3640
#33 0x00007f09b02ed568 in QCoreApplication::notifyInternal2 (receiver=0x2c0adb0, event=0x7ffe6035f730) at kernel/qcoreapplication.cpp:1064
#34 0x00007f09b02ed73e in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1474
#35 0x00007f09b077d0eb in QGuiApplicationPrivate::processMouseEvent (e=0x2f09e20) at kernel/qguiapplication.cpp:2285
#36 0x00007f09b075036c in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#37 0x00007f09a491b1aa in xcbSourceDispatch (source=<optimized out>) at qxcbeventdispatcher.cpp:105
#38 0x00007f09acf169d8 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#39 0x00007f09acf16de8 in ?? () from /lib64/libglib-2.0.so.0
#40 0x00007f09acf16e7c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#41 0x00007f09b03464a6 in QEventDispatcherGlib::processEvents (this=0xff1400, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#42 0x00007f09b02ebffb in QEventLoop::exec (this=this@entry=0x7ffe6035fa60, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#43 0x00007f09b11ada07 in QDialog::exec (this=0x7ffe6035fc70) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#44 0x00000000005244c5 in MainWindow::DeleteDialog::exec (this=0x7ffe6035fc70, list=...) at /home/victor/kphotoalbum/MainWindow/DeleteDialog.cpp:84
#45 0x0000000000607b05 in AnnotationDialog::ImagePreviewWidget::slotDeleteImage (this=0x1ce2020) at /home/victor/kphotoalbum/AnnotationDialog/ImagePreviewWidget.cpp:226
#46 0x00000000005f8923 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (AnnotationDialog::ImagePreviewWidget::*)()>::call(void (AnnotationDialog::ImagePreviewWidget::*)(), AnnotationDialog::ImagePreviewWidget*, void**) (f=(void (AnnotationDialog::ImagePreviewWidget::*)(AnnotationDialog::ImagePreviewWidget * const)) 0x607a0e <AnnotationDialog::ImagePreviewWidget::slotDeleteImage()>, o=0x1ce2020, arg=0x7ffe6035feb0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:152
#47 0x00000000005f87c1 in QtPrivate::FunctionPointer<void (AnnotationDialog::ImagePreviewWidget::*)()>::call<QtPrivate::List<>, void>(void (AnnotationDialog::ImagePreviewWidget::*)(), AnnotationDialog::ImagePreviewWidget*, void**) (f=(void (AnnotationDialog::ImagePreviewWidget::*)(AnnotationDialog::ImagePreviewWidget * const)) 0x607a0e <AnnotationDialog::ImagePreviewWidget::slotDeleteImage()>, o=0x1ce2020, arg=0x7ffe6035feb0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:185
#48 0x00000000005f863f in QtPrivate::QSlotObject<void (AnnotationDialog::ImagePreviewWidget::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x1ce9150, r=0x1ce2020, a=0x7ffe6035feb0, ret=0x0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:418
#49 0x00007f09b0325812 in QtPrivate::QSlotObjectBase::call (a=0x7ffe6035feb0, r=0x1ce2020, this=0x1ce9150) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#50 doActivate<false> (sender=0x1ce7ae0, signal_index=9, argv=0x7ffe6035feb0) at kernel/qobject.cpp:3925
#51 0x00007f09b031e47f in QMetaObject::activate (sender=sender@entry=0x1ce7ae0, m=m@entry=0x7f09b14c0280 <QAbstractButton::staticMetaObject>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7ffe6035feb0) at kernel/qobject.cpp:3985
#52 0x00007f09b1096ac2 in QAbstractButton::clicked (this=this@entry=0x1ce7ae0, _t1=<optimized out>) at .moc/moc_qabstractbutton.cpp:308
#53 0x00007f09b1096d2a in QAbstractButtonPrivate::emitClicked (this=0x1ce8630) at widgets/qabstractbutton.cpp:416
#54 0x00007f09b1098567 in QAbstractButtonPrivate::click (this=0x1ce8630) at widgets/qabstractbutton.cpp:409
#55 0x00007f09b1098777 in QAbstractButton::mouseReleaseEvent (this=0x1ce7ae0, e=0x7ffe60360440) at widgets/qabstractbutton.cpp:1045
#56 0x00007f09b0fe6d68 in QWidget::event (this=0x1ce7ae0, event=0x7ffe60360440) at kernel/qwidget.cpp:9045
#57 0x00007f09b0fa519e in QApplicationPrivate::notify_helper (this=this@entry=0xf171c0, receiver=receiver@entry=0x1ce7ae0, e=e@entry=0x7ffe60360440) at kernel/qapplication.cpp:3640
#58 0x00007f09b0fad5cf in QApplication::notify (this=<optimized out>, receiver=<optimized out>, e=0x7ffe60360440) at kernel/qapplication.cpp:3084
#59 0x00007f09b02ed568 in QCoreApplication::notifyInternal2 (receiver=0x1ce7ae0, event=0x7ffe60360440) at kernel/qcoreapplication.cpp:1064
#60 0x00007f09b02ed73e in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1474
#61 0x00007f09b0fab92e in QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x1ce7ae0, event=event@entry=0x7ffe60360440, alienWidget=<optimized out>, nativeWidget=0x153cd20, buttonDown=buttonDown@entry=0x7f09b14f2330 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at kernel/qapplication.cpp:2622
#62 0x00007f09b0fff7fd in QWidgetWindow::handleMouseEvent (this=this@entry=0x27be380, event=event@entry=0x7ffe603606f0) at kernel/qwidgetwindow.cpp:684
#63 0x00007f09b1002d1f in QWidgetWindow::event (this=0x27be380, event=0x7ffe603606f0) at kernel/qwidgetwindow.cpp:300
#64 0x00007f09b0fa519e in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x27be380, e=0x7ffe603606f0) at kernel/qapplication.cpp:3640
#65 0x00007f09b02ed568 in QCoreApplication::notifyInternal2 (receiver=0x27be380, event=0x7ffe603606f0) at kernel/qcoreapplication.cpp:1064
#66 0x00007f09b02ed73e in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1474
#67 0x00007f09b077d0eb in QGuiApplicationPrivate::processMouseEvent (e=0x2e96b50) at kernel/qguiapplication.cpp:2285
#68 0x00007f09b075036c in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#69 0x00007f09a491b1aa in xcbSourceDispatch (source=<optimized out>) at qxcbeventdispatcher.cpp:105
#70 0x00007f09acf169d8 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#71 0x00007f09acf16de8 in ?? () from /lib64/libglib-2.0.so.0
#72 0x00007f09acf16e7c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#73 0x00007f09b03464a6 in QEventDispatcherGlib::processEvents (this=0xff1400, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#74 0x00007f09b02ebffb in QEventLoop::exec (this=this@entry=0x7ffe60360a20, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#75 0x00007f09b11ada07 in QDialog::exec (this=0x153cd20) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#76 0x00000000005e9820 in AnnotationDialog::Dialog::exec (this=0x153cd20) at /home/victor/kphotoalbum/AnnotationDialog/Dialog.cpp:955
#77 0x00000000005e7acb in AnnotationDialog::Dialog::configure (this=0x153cd20, list=..., oneAtATime=true) at /home/victor/kphotoalbum/AnnotationDialog/Dialog.cpp:766
#78 0x00000000005367d7 in MainWindow::Window::configImages (this=0x1145a80, list=..., oneAtATime=true) at /home/victor/kphotoalbum/MainWindow/Window.cpp:509
#79 0x0000000000536775 in MainWindow::Window::configureImages (list=..., oneAtATime=true) at /home/victor/kphotoalbum/MainWindow/Window.cpp:503
#80 0x00000000005366cc in MainWindow::Window::configureImages (this=0x1145a80, oneAtATime=true) at /home/victor/kphotoalbum/MainWindow/Window.cpp:497
#81 0x000000000053655b in MainWindow::Window::slotConfigureImagesOneAtATime (this=0x1145a80) at /home/victor/kphotoalbum/MainWindow/Window.cpp:483
#82 0x000000000054e3a8 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (MainWindow::Window::*)()>::call(void (MainWindow::Window::*)(), MainWindow::Window*, void**) (f=(void (MainWindow::Window::*)(MainWindow::Window * const)) 0x53653e <MainWindow::Window::slotConfigureImagesOneAtATime()>, o=0x1145a80, arg=0x7ffe60360e40) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:152
#83 0x000000000054d9ed in QtPrivate::FunctionPointer<void (MainWindow::Window::*)()>::call<QtPrivate::List<>, void>(void (MainWindow::Window::*)(), MainWindow::Window*, void**) (f=(void (MainWindow::Window::*)(MainWindow::Window * const)) 0x53653e <MainWindow::Window::slotConfigureImagesOneAtATime()>, o=0x1145a80, arg=0x7ffe60360e40) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:185
#84 0x000000000054c169 in QtPrivate::QSlotObject<void (MainWindow::Window::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x16f11b0, r=0x1145a80, a=0x7ffe60360e40, ret=0x0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:418
#85 0x00007f09b0325812 in QtPrivate::QSlotObjectBase::call (a=0x7ffe60360e40, r=0x1145a80, this=0x16f11b0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#86 doActivate<false> (sender=0x16f12e0, signal_index=4, argv=0x7ffe60360e40) at kernel/qobject.cpp:3925
#87 0x00007f09b031e47f in QMetaObject::activate (sender=sender@entry=0x16f12e0, m=m@entry=0x7f09b14bacc0 <QAction::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7ffe60360e40) at kernel/qobject.cpp:3985
#88 0x00007f09b0f9e8b2 in QAction::triggered (this=this@entry=0x16f12e0, _t1=<optimized out>) at .moc/moc_qaction.cpp:376
#89 0x00007f09b0fa142f in QAction::activate (this=0x16f12e0, event=<optimized out>) at kernel/qaction.cpp:1161
#90 0x00007f09b1125ef2 in QMenuPrivate::activateCausedStack (this=this@entry=0x1641420, causedStack=..., action=action@entry=0x16f12e0, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1384
#91 0x00007f09b112dd23 in QMenuPrivate::activateAction (this=0x1641420, action=0x16f12e0, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:1461
#92 0x00007f09b0fe6d68 in QWidget::event (this=0x7ffe60361b00, event=0x7ffe60361430) at kernel/qwidget.cpp:9045
#93 0x00007f09b0fa519e in QApplicationPrivate::notify_helper (this=this@entry=0xf171c0, receiver=receiver@entry=0x7ffe60361b00, e=e@entry=0x7ffe60361430) at kernel/qapplication.cpp:3640
#94 0x00007f09b0fad5cf in QApplication::notify (this=<optimized out>, receiver=<optimized out>, e=0x7ffe60361430) at kernel/qapplication.cpp:3084
#95 0x00007f09b02ed568 in QCoreApplication::notifyInternal2 (receiver=0x7ffe60361b00, event=0x7ffe60361430) at kernel/qcoreapplication.cpp:1064
#96 0x00007f09b02ed73e in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1474
#97 0x00007f09b0fab92e in QApplicationPrivate::sendMouseEvent (receiver=0x7ffe60361b00, event=event@entry=0x7ffe60361430, alienWidget=<optimized out>, nativeWidget=0x7ffe60361b00, buttonDown=buttonDown@entry=0x7f09b14f2330 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at kernel/qapplication.cpp:2622
#98 0x00007f09b10002ca in QWidgetWindow::handleMouseEvent (this=this@entry=0x16914a0, event=event@entry=0x7ffe603616e0) at kernel/qwidgetwindow.cpp:580
#99 0x00007f09b1002d1f in QWidgetWindow::event (this=0x16914a0, event=0x7ffe603616e0) at kernel/qwidgetwindow.cpp:300
#100 0x00007f09b0fa519e in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x16914a0, e=0x7ffe603616e0) at kernel/qapplication.cpp:3640
#101 0x00007f09b02ed568 in QCoreApplication::notifyInternal2 (receiver=0x16914a0, event=0x7ffe603616e0) at kernel/qcoreapplication.cpp:1064
#102 0x00007f09b02ed73e in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1474
#103 0x00007f09b077d0eb in QGuiApplicationPrivate::processMouseEvent (e=0x168e060) at kernel/qguiapplication.cpp:2285
#104 0x00007f09b075036c in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#105 0x00007f09a491b1aa in xcbSourceDispatch (source=<optimized out>) at qxcbeventdispatcher.cpp:105
#106 0x00007f09acf169d8 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#107 0x00007f09acf16de8 in ?? () from /lib64/libglib-2.0.so.0
#108 0x00007f09acf16e7c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#109 0x00007f09b03464a6 in QEventDispatcherGlib::processEvents (this=0xff1400, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#110 0x00007f09b02ebffb in QEventLoop::exec (this=this@entry=0x7ffe60361a20, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#111 0x00007f09b112b70f in QMenuPrivate::exec(QPoint const&, QAction*, std::function<QPoint (QSize const&)>) (this=0x1641420, p=..., action=0x0, positionFunction=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#112 0x00007f09b112b82f in QMenu::exec (this=<optimized out>, p=..., action=<optimized out>) at widgets/qmenu.cpp:2686
#113 0x000000000054163e in MainWindow::Window::contextMenuEvent (this=0x1145a80, e=0x7ffe60361e50) at /home/victor/kphotoalbum/MainWindow/Window.cpp:1318
#114 0x00007f09b0fe6d68 in QWidget::event (this=0x1145a80, event=0x7ffe60361e50) at kernel/qwidget.cpp:9045
#115 0x00007f09bb90a469 in KXmlGuiWindow::event(QEvent*) () from /lib64/libKF5XmlGui.so.5
#116 0x00000000005383c3 in MainWindow::Window::event (this=0x1145a80, event=0x7ffe60361e50) at /home/victor/kphotoalbum/MainWindow/Window.cpp:751
#117 0x00007f09b0fa519e in QApplicationPrivate::notify_helper (this=this@entry=0xf171c0, receiver=receiver@entry=0x1145a80, e=e@entry=0x7ffe60361e50) at kernel/qapplication.cpp:3640
#118 0x00007f09b0fadaaa in QApplication::notify (this=<optimized out>, receiver=<optimized out>, e=0x7ffe60362080) at kernel/qapplication.cpp:3246
#119 0x00007f09b02ed568 in QCoreApplication::notifyInternal2 (receiver=0x15766e0, event=0x7ffe60362080) at kernel/qcoreapplication.cpp:1064
#120 0x00007f09b02ed5b2 in QCoreApplication::forwardEvent (receiver=<optimized out>, event=<optimized out>, originatingEvent=<optimized out>) at kernel/qcoreapplication.cpp:1079
#121 0x00007f09b0ffff59 in QWidgetWindow::handleMouseEvent (this=this@entry=0x140e3d0, event=event@entry=0x7ffe60362370) at kernel/qwidgetwindow.cpp:692
#122 0x00007f09b1002d1f in QWidgetWindow::event (this=0x140e3d0, event=0x7ffe60362370) at kernel/qwidgetwindow.cpp:300
#123 0x00007f09b0fa519e in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x140e3d0, e=0x7ffe60362370) at kernel/qapplication.cpp:3640
#124 0x00007f09b02ed568 in QCoreApplication::notifyInternal2 (receiver=0x140e3d0, event=0x7ffe60362370) at kernel/qcoreapplication.cpp:1064
#125 0x00007f09b02ed73e in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1474
#126 0x00007f09b077d0eb in QGuiApplicationPrivate::processMouseEvent (e=0x1675070) at kernel/qguiapplication.cpp:2285
#127 0x00007f09b075036c in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#128 0x00007f09a491b1aa in xcbSourceDispatch (source=<optimized out>) at qxcbeventdispatcher.cpp:105
#129 0x00007f09acf169d8 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#130 0x00007f09acf16de8 in ?? () from /lib64/libglib-2.0.so.0
#131 0x00007f09acf16e7c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#132 0x00007f09b03464a6 in QEventDispatcherGlib::processEvents (this=0xff1400, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#133 0x00007f09b02ebffb in QEventLoop::exec (this=this@entry=0x7ffe603626a0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#134 0x00007f09b02f4490 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#135 0x0000000000472a10 in main (argc=2, argv=0x7ffe60362da8) at /home/victor/kphotoalbum/main.cpp:161
[Inferior 1 (process 10876) detached]
Comment 1 Johannes Zarl-Zierl 2023-10-09 20:42:00 UTC
Git commit c62626f6c4a5f42fc2518c75aae4665e901f9c33 by Johannes Zarl-Zierl.
Committed on 09/10/2023 at 22:38.
Pushed by johanneszarl into branch 'master'.

Discard images from annotation dialog if they are deleted.

This makes the annotation dialog behave like one would expect when an image
is deleted while being annotated:

Old behaviour: deleted images are still present in the annotation
dialog, leading to unclear semantics.

New behaviour: deleted images are removed from the dialog. The dialog is
closed when the last image is deleted.

Additionally, this fixes two crashes that are enabled by the old
behaviour:

Fix a crash when deleting the currently annotated image and then
toggling the fullscreen preview in the annotation window (#475387).

Fix a crash when deleting the currently annotated image and then
pressing delete in the annotation dialog (#475388).
Related: bug 475387

M  +26   -0    AnnotationDialog/Dialog.cpp
M  +8    -0    AnnotationDialog/Dialog.h

https://invent.kde.org/graphics/kphotoalbum/-/commit/c62626f6c4a5f42fc2518c75aae4665e901f9c33
Comment 2 Victor Lobo 2023-10-13 00:52:37 UTC
Reopening this bug since a crash occurs now on click of Delete in the Annotations window for a image that exists.

STEPS TO REPRODUCE
1. Open KPhotoAlbum
2. Go to Thumbnail View
3. Open an Image/Video in Annotations window
4. Click on Delete Image icon
5. Click OK (in the Removing Items dialog popup)
6. Crash


Backtrace
Application: KPhotoAlbum (kphotoalbum), signal: Aborted

[KCrash Handler]
#4  0x00007fcb63e91e0c in __pthread_kill_implementation () from /lib64/libc.so.6
#5  0x00007fcb63e3f0e6 in raise () from /lib64/libc.so.6
#6  0x00007fcb63e268d7 in abort () from /lib64/libc.so.6
#7  0x00007fcb646bb4f9 in qt_message_fatal (message=<synthetic pointer>..., context=...) at global/qlogging.cpp:1914
#8  QMessageLogger::fatal (this=this@entry=0x7ffc31447588, msg=msg@entry=0x7fcb649d2028 "ASSERT failure in %s: \"%s\", file %s, line %d") at global/qlogging.cpp:893
#9  0x00007fcb646ba78c in qt_assert_x (where=<optimized out>, what=<optimized out>, file=<optimized out>, line=<optimized out>) at global/qglobal.cpp:3399
#10 0x00000000005f34e2 in QList<DB::ImageInfo>::at (this=0x2ca73a8, i=0) at /usr/include/qt5/QtCore/qlist.h:571
#11 0x0000000000608cda in AnnotationDialog::ImagePreviewWidget::slotDeleteImage (this=0x33c07c0) at /home/victor/kphotoalbum/AnnotationDialog/ImagePreviewWidget.cpp:230
#12 0x00000000005f9ac3 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (AnnotationDialog::ImagePreviewWidget::*)()>::call(void (AnnotationDialog::ImagePreviewWidget::*)(), AnnotationDialog::ImagePreviewWidget*, void**) (f=(void (AnnotationDialog::ImagePreviewWidget::*)(AnnotationDialog::ImagePreviewWidget * const)) 0x608bae <AnnotationDialog::ImagePreviewWidget::slotDeleteImage()>, o=0x33c07c0, arg=0x7ffc31447910) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:152
#13 0x00000000005f9961 in QtPrivate::FunctionPointer<void (AnnotationDialog::ImagePreviewWidget::*)()>::call<QtPrivate::List<>, void>(void (AnnotationDialog::ImagePreviewWidget::*)(), AnnotationDialog::ImagePreviewWidget*, void**) (f=(void (AnnotationDialog::ImagePreviewWidget::*)(AnnotationDialog::ImagePreviewWidget * const)) 0x608bae <AnnotationDialog::ImagePreviewWidget::slotDeleteImage()>, o=0x33c07c0, arg=0x7ffc31447910) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:185
#14 0x00000000005f97df in QtPrivate::QSlotObject<void (AnnotationDialog::ImagePreviewWidget::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x33c78f0, r=0x33c07c0, a=0x7ffc31447910, ret=0x0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:418
#15 0x00007fcb64925812 in QtPrivate::QSlotObjectBase::call (a=0x7ffc31447910, r=0x33c07c0, this=0x33c78f0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#16 doActivate<false> (sender=0x33c66b0, signal_index=9, argv=0x7ffc31447910) at kernel/qobject.cpp:3925
#17 0x00007fcb6491e47f in QMetaObject::activate (sender=sender@entry=0x33c66b0, m=m@entry=0x7fcb65ac0280 <QAbstractButton::staticMetaObject>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7ffc31447910) at kernel/qobject.cpp:3985
#18 0x00007fcb65696ac2 in QAbstractButton::clicked (this=this@entry=0x33c66b0, _t1=<optimized out>) at .moc/moc_qabstractbutton.cpp:308
#19 0x00007fcb65696d2a in QAbstractButtonPrivate::emitClicked (this=0x33c6e20) at widgets/qabstractbutton.cpp:416
#20 0x00007fcb65698567 in QAbstractButtonPrivate::click (this=0x33c6e20) at widgets/qabstractbutton.cpp:409
#21 0x00007fcb65698777 in QAbstractButton::mouseReleaseEvent (this=0x33c66b0, e=0x7ffc31447ea0) at widgets/qabstractbutton.cpp:1045
#22 0x00007fcb655e6d68 in QWidget::event (this=0x33c66b0, event=0x7ffc31447ea0) at kernel/qwidget.cpp:9045
#23 0x00007fcb655a519e in QApplicationPrivate::notify_helper (this=this@entry=0x25fa1c0, receiver=receiver@entry=0x33c66b0, e=e@entry=0x7ffc31447ea0) at kernel/qapplication.cpp:3640
#24 0x00007fcb655ad5cf in QApplication::notify (this=<optimized out>, receiver=<optimized out>, e=0x7ffc31447ea0) at kernel/qapplication.cpp:3084
#25 0x00007fcb648ed568 in QCoreApplication::notifyInternal2 (receiver=0x33c66b0, event=0x7ffc31447ea0) at kernel/qcoreapplication.cpp:1064
#26 0x00007fcb648ed73e in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1474
#27 0x00007fcb655ab92e in QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x33c66b0, event=event@entry=0x7ffc31447ea0, alienWidget=<optimized out>, nativeWidget=0x2ca7360, buttonDown=buttonDown@entry=0x7fcb65af2330 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at kernel/qapplication.cpp:2622
#28 0x00007fcb655ff7fd in QWidgetWindow::handleMouseEvent (this=this@entry=0x3e99420, event=event@entry=0x7ffc31448150) at kernel/qwidgetwindow.cpp:684
#29 0x00007fcb65602d1f in QWidgetWindow::event (this=0x3e99420, event=0x7ffc31448150) at kernel/qwidgetwindow.cpp:300
#30 0x00007fcb655a519e in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x3e99420, e=0x7ffc31448150) at kernel/qapplication.cpp:3640
#31 0x00007fcb648ed568 in QCoreApplication::notifyInternal2 (receiver=0x3e99420, event=0x7ffc31448150) at kernel/qcoreapplication.cpp:1064
#32 0x00007fcb648ed73e in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1474
#33 0x00007fcb64d7d0eb in QGuiApplicationPrivate::processMouseEvent (e=0x3ed1800) at kernel/qguiapplication.cpp:2285
#34 0x00007fcb64d5036c in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#35 0x00007fcb58f1b1aa in xcbSourceDispatch (source=<optimized out>) at qxcbeventdispatcher.cpp:105
#36 0x00007fcb6112b9d8 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#37 0x00007fcb6112bde8 in ?? () from /lib64/libglib-2.0.so.0
#38 0x00007fcb6112be7c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#39 0x00007fcb649464a6 in QEventDispatcherGlib::processEvents (this=0x26d4e30, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#40 0x00007fcb648ebffb in QEventLoop::exec (this=this@entry=0x7ffc31448480, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#41 0x00007fcb657ada07 in QDialog::exec (this=0x2ca7360) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#42 0x00000000005ea0ee in AnnotationDialog::Dialog::exec (this=0x2ca7360) at /home/victor/kphotoalbum/AnnotationDialog/Dialog.cpp:957
#43 0x00000000005e8399 in AnnotationDialog::Dialog::configure (this=0x2ca7360, list=..., oneAtATime=true) at /home/victor/kphotoalbum/AnnotationDialog/Dialog.cpp:768
#44 0x0000000000536c57 in MainWindow::Window::configImages (this=0x282c740, list=..., oneAtATime=true) at /home/victor/kphotoalbum/MainWindow/Window.cpp:509
#45 0x0000000000536bf5 in MainWindow::Window::configureImages (list=..., oneAtATime=true) at /home/victor/kphotoalbum/MainWindow/Window.cpp:503
#46 0x0000000000536b4c in MainWindow::Window::configureImages (this=0x282c740, oneAtATime=true) at /home/victor/kphotoalbum/MainWindow/Window.cpp:497
#47 0x00000000005369db in MainWindow::Window::slotConfigureImagesOneAtATime (this=0x282c740) at /home/victor/kphotoalbum/MainWindow/Window.cpp:483
#48 0x000000000054e828 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (MainWindow::Window::*)()>::call(void (MainWindow::Window::*)(), MainWindow::Window*, void**) (f=(void (MainWindow::Window::*)(MainWindow::Window * const)) 0x5369be <MainWindow::Window::slotConfigureImagesOneAtATime()>, o=0x282c740, arg=0x7ffc314488a0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:152
#49 0x000000000054de6d in QtPrivate::FunctionPointer<void (MainWindow::Window::*)()>::call<QtPrivate::List<>, void>(void (MainWindow::Window::*)(), MainWindow::Window*, void**) (f=(void (MainWindow::Window::*)(MainWindow::Window * const)) 0x5369be <MainWindow::Window::slotConfigureImagesOneAtATime()>, o=0x282c740, arg=0x7ffc314488a0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:185
#50 0x000000000054c5e9 in QtPrivate::QSlotObject<void (MainWindow::Window::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x2dd0a60, r=0x282c740, a=0x7ffc314488a0, ret=0x0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:418
#51 0x00007fcb64925812 in QtPrivate::QSlotObjectBase::call (a=0x7ffc314488a0, r=0x282c740, this=0x2dd0a60) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#52 doActivate<false> (sender=0x2dd0b90, signal_index=4, argv=0x7ffc314488a0) at kernel/qobject.cpp:3925
#53 0x00007fcb6491e47f in QMetaObject::activate (sender=sender@entry=0x2dd0b90, m=m@entry=0x7fcb65abacc0 <QAction::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7ffc314488a0) at kernel/qobject.cpp:3985
#54 0x00007fcb6559e8b2 in QAction::triggered (this=this@entry=0x2dd0b90, _t1=<optimized out>) at .moc/moc_qaction.cpp:376
#55 0x00007fcb655a142f in QAction::activate (this=0x2dd0b90, event=<optimized out>) at kernel/qaction.cpp:1161
#56 0x00007fcb65725ef2 in QMenuPrivate::activateCausedStack (this=this@entry=0x2d7ef20, causedStack=..., action=action@entry=0x2dd0b90, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1384
#57 0x00007fcb6572dd23 in QMenuPrivate::activateAction (this=0x2d7ef20, action=0x2dd0b90, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:1461
#58 0x00007fcb655e6d68 in QWidget::event (this=0x7ffc31449560, event=0x7ffc31448e90) at kernel/qwidget.cpp:9045
#59 0x00007fcb655a519e in QApplicationPrivate::notify_helper (this=this@entry=0x25fa1c0, receiver=receiver@entry=0x7ffc31449560, e=e@entry=0x7ffc31448e90) at kernel/qapplication.cpp:3640
#60 0x00007fcb655ad5cf in QApplication::notify (this=<optimized out>, receiver=<optimized out>, e=0x7ffc31448e90) at kernel/qapplication.cpp:3084
#61 0x00007fcb648ed568 in QCoreApplication::notifyInternal2 (receiver=0x7ffc31449560, event=0x7ffc31448e90) at kernel/qcoreapplication.cpp:1064
#62 0x00007fcb648ed73e in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1474
#63 0x00007fcb655ab92e in QApplicationPrivate::sendMouseEvent (receiver=0x7ffc31449560, event=event@entry=0x7ffc31448e90, alienWidget=<optimized out>, nativeWidget=0x7ffc31449560, buttonDown=buttonDown@entry=0x7fcb65af2330 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at kernel/qapplication.cpp:2622
#64 0x00007fcb656002ca in QWidgetWindow::handleMouseEvent (this=this@entry=0x2da6c90, event=event@entry=0x7ffc31449140) at kernel/qwidgetwindow.cpp:580
#65 0x00007fcb65602d1f in QWidgetWindow::event (this=0x2da6c90, event=0x7ffc31449140) at kernel/qwidgetwindow.cpp:300
#66 0x00007fcb655a519e in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x2da6c90, e=0x7ffc31449140) at kernel/qapplication.cpp:3640
#67 0x00007fcb648ed568 in QCoreApplication::notifyInternal2 (receiver=0x2da6c90, event=0x7ffc31449140) at kernel/qcoreapplication.cpp:1064
#68 0x00007fcb648ed73e in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1474
#69 0x00007fcb64d7d0eb in QGuiApplicationPrivate::processMouseEvent (e=0x2d5e520) at kernel/qguiapplication.cpp:2285
#70 0x00007fcb64d5036c in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#71 0x00007fcb58f1b1aa in xcbSourceDispatch (source=<optimized out>) at qxcbeventdispatcher.cpp:105
#72 0x00007fcb6112b9d8 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#73 0x00007fcb6112bde8 in ?? () from /lib64/libglib-2.0.so.0
#74 0x00007fcb6112be7c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#75 0x00007fcb649464a6 in QEventDispatcherGlib::processEvents (this=0x26d4e30, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#76 0x00007fcb648ebffb in QEventLoop::exec (this=this@entry=0x7ffc31449480, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#77 0x00007fcb6572b70f in QMenuPrivate::exec(QPoint const&, QAction*, std::function<QPoint (QSize const&)>) (this=0x2d7ef20, p=..., action=0x0, positionFunction=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#78 0x00007fcb6572b82f in QMenu::exec (this=<optimized out>, p=..., action=<optimized out>) at widgets/qmenu.cpp:2686
#79 0x0000000000541abe in MainWindow::Window::contextMenuEvent (this=0x282c740, e=0x7ffc314498b0) at /home/victor/kphotoalbum/MainWindow/Window.cpp:1318
#80 0x00007fcb655e6d68 in QWidget::event (this=0x282c740, event=0x7ffc314498b0) at kernel/qwidget.cpp:9045
#81 0x00007fcb6ff32469 in KXmlGuiWindow::event(QEvent*) () from /lib64/libKF5XmlGui.so.5
#82 0x0000000000538843 in MainWindow::Window::event (this=0x282c740, event=0x7ffc314498b0) at /home/victor/kphotoalbum/MainWindow/Window.cpp:751
#83 0x00007fcb655a519e in QApplicationPrivate::notify_helper (this=this@entry=0x25fa1c0, receiver=receiver@entry=0x282c740, e=e@entry=0x7ffc314498b0) at kernel/qapplication.cpp:3640
#84 0x00007fcb655adaaa in QApplication::notify (this=<optimized out>, receiver=<optimized out>, e=0x7ffc31449ae0) at kernel/qapplication.cpp:3246
#85 0x00007fcb648ed568 in QCoreApplication::notifyInternal2 (receiver=0x2be1660, event=0x7ffc31449ae0) at kernel/qcoreapplication.cpp:1064
#86 0x00007fcb648ed5b2 in QCoreApplication::forwardEvent (receiver=<optimized out>, event=<optimized out>, originatingEvent=<optimized out>) at kernel/qcoreapplication.cpp:1079
#87 0x00007fcb655fff59 in QWidgetWindow::handleMouseEvent (this=this@entry=0x2af1d20, event=event@entry=0x7ffc31449dd0) at kernel/qwidgetwindow.cpp:692
#88 0x00007fcb65602d1f in QWidgetWindow::event (this=0x2af1d20, event=0x7ffc31449dd0) at kernel/qwidgetwindow.cpp:300
#89 0x00007fcb655a519e in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x2af1d20, e=0x7ffc31449dd0) at kernel/qapplication.cpp:3640
#90 0x00007fcb648ed568 in QCoreApplication::notifyInternal2 (receiver=0x2af1d20, event=0x7ffc31449dd0) at kernel/qcoreapplication.cpp:1064
#91 0x00007fcb648ed73e in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1474
#92 0x00007fcb64d7d0eb in QGuiApplicationPrivate::processMouseEvent (e=0x2d5a660) at kernel/qguiapplication.cpp:2285
#93 0x00007fcb64d5036c in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#94 0x00007fcb58f1b1aa in xcbSourceDispatch (source=<optimized out>) at qxcbeventdispatcher.cpp:105
#95 0x00007fcb6112b9d8 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#96 0x00007fcb6112bde8 in ?? () from /lib64/libglib-2.0.so.0
#97 0x00007fcb6112be7c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#98 0x00007fcb649464a6 in QEventDispatcherGlib::processEvents (this=0x26d4e30, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#99 0x00007fcb648ebffb in QEventLoop::exec (this=this@entry=0x7ffc3144a100, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#100 0x00007fcb648f4490 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#101 0x0000000000472a30 in main (argc=2, argv=0x7ffc3144a808) at /home/victor/kphotoalbum/main.cpp:161
[Inferior 1 (process 2763) detached]
Comment 3 Johannes Zarl-Zierl 2023-10-13 08:02:52 UTC
Git commit 2a138f3ac613d945516e9a885efeab927ee28d68 by Johannes Zarl-Zierl.
Committed on 13/10/2023 at 09:09.
Pushed by johanneszarl into branch 'master'.

Fix regression when deleting images

The introduction of AnnotationDialog::Dialog::slotDiscardImages()
reimplemented the things done in Dialog::slotDeleteImage(),
causing duplicated removal of images from the ImagePreviewWidget and
annotation Dialog. This caused a crash when deleting an image via the
delete button of the annotation dialog.

Fortunately, it turns out that the slotDiscardImages function does
everything slotDeleteImage() does, which means that the older code could
simply be removed.

Note: This patch removes the action "annotationdialog-delete-image",
which called Dialog::slotDeleteImage directly, and had a conflicting
default shortcut Ctrl+Delete (conflicting with Viewer -> delete image).
I believe the original intention for that action was to call
ImagePreviewWidget::slotDeleteImage(). Since the action was clearly not
in a working state, I thought it better to remove it entirely.

M  +0    -33   AnnotationDialog/Dialog.cpp
M  +0    -1    AnnotationDialog/Dialog.h
M  +1    -10   AnnotationDialog/ImagePreviewWidget.cpp
M  +1    -2    AnnotationDialog/ImagePreviewWidget.h

https://invent.kde.org/graphics/kphotoalbum/-/commit/2a138f3ac613d945516e9a885efeab927ee28d68
Comment 4 Johannes Zarl-Zierl 2023-10-13 08:03:50 UTC
Thanks!
I believe the bug is now fixed for good.
Comment 5 Victor Lobo 2023-10-16 23:36:34 UTC
Yes, fix works well. Thank you!