Bug 474392 - KPhotoAlbum crashes when user opens the last image/video in viewer then deletes the image and then accesses Show in the Viewer Context Menu
Summary: KPhotoAlbum crashes when user opens the last image/video in viewer then delet...
Status: VERIFIED FIXED
Alias: None
Product: kphotoalbum
Classification: Applications
Component: Viewer (show other bugs)
Version: 5.11.0
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: KPhotoAlbum Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-11 01:13 UTC by Victor Lobo
Modified: 2023-09-26 22:42 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
KPA crash when Show clicked in Context Menu for deleted video (1.79 MB, video/x-matroska)
2023-09-11 01:13 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-09-11 01:13:09 UTC
Created attachment 161553 [details]
KPA crash when Show clicked in Context Menu for deleted video

SUMMARY
KPhotoAlbum crashes when user opens the last image/video in viewer then deletes the image and then accesses Show in the Viewer Context Menu

STEPS TO REPRODUCE
1. Open KPhotoAlbum
2. Go to Thumbnail View
3. Open the last image/video in the Viewer (has to be the LAST item in viewer)
4. Keep the Viewer 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 Viewer window and right click to open Context Menu
7. Go to Show in the Context Menu
8. Crash

Crash video attached

OBSERVED RESULT
Crash

EXPECTED RESULT
No crash

SOFTWARE/OS VERSIONS
Linux: openSUSE Tumbleweed 20230816; Kernel Version: 6.4.9-1-default (64-bit)
KDE Plasma Version: 5.27.7
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-96-gc8413194

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: Aborted

[KCrash Handler]
#4  0x00007f39a3891e0c in __pthread_kill_implementation () from /lib64/libc.so.6
#5  0x00007f39a383f0e6 in raise () from /lib64/libc.so.6
#6  0x00007f39a38268d7 in abort () from /lib64/libc.so.6
#7  0x00007f39a40bb4f9 in qt_message_fatal (message=<synthetic pointer>..., context=...) at global/qlogging.cpp:1914
#8  QMessageLogger::fatal (this=this@entry=0x7ffcbc03d928, msg=msg@entry=0x7f39a43d2028 "ASSERT failure in %s: \"%s\", file %s, line %d") at global/qlogging.cpp:893
#9  0x00007f39a40ba78c in qt_assert_x (where=<optimized out>, what=<optimized out>, file=<optimized out>, line=<optimized out>) at global/qglobal.cpp:3399
#10 0x00000000004e13bc in QList<DB::FileName>::operator[] (this=0x2d93bc0, i=24) at /usr/include/qt5/QtCore/qlist.h:575
#11 0x00000000004d7d5a in Viewer::ViewerWidget::currentInfo (this=0x2d93af0) at /home/victor/kphotoalbum/Viewer/ViewerWidget.cpp:710
#12 0x00000000004d8360 in Viewer::ViewerWidget::updateInfoBox (this=0x2d93af0) at /home/victor/kphotoalbum/Viewer/ViewerWidget.cpp:801
#13 0x00000000004e577b in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (Viewer::ViewerWidget::*)()>::call(void (Viewer::ViewerWidget::*)(), Viewer::ViewerWidget*, void**) (f=(void (Viewer::ViewerWidget::*)(Viewer::ViewerWidget * const)) 0x4d8340 <Viewer::ViewerWidget::updateInfoBox()>, o=0x2d93af0, arg=0x7ffcbc03db40) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:152
#14 0x00000000004e4e77 in QtPrivate::FunctionPointer<void (Viewer::ViewerWidget::*)()>::call<QtPrivate::List<>, void>(void (Viewer::ViewerWidget::*)(), Viewer::ViewerWidget*, void**) (f=(void (Viewer::ViewerWidget::*)(Viewer::ViewerWidget * const)) 0x4d8340 <Viewer::ViewerWidget::updateInfoBox()>, o=0x2d93af0, arg=0x7ffcbc03db40) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:185
#15 0x00000000004e3a45 in QtPrivate::QSlotObject<void (Viewer::ViewerWidget::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x31e0d70, r=0x2d93af0, a=0x7ffcbc03db40, ret=0x0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:418
#16 0x00007f39a4325812 in QtPrivate::QSlotObjectBase::call (a=0x7ffcbc03db40, r=0x2d93af0, this=0x31e0d70) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#17 doActivate<false> (sender=0x31d3a10, signal_index=11, argv=0x7ffcbc03db40) at kernel/qobject.cpp:3925
#18 0x00000000004f8763 in Viewer::VisibleOptionsMenu::visibleOptionsChanged (this=0x31d3a10) at /home/victor/kphotoalbum/build/kphotoalbum_autogen/include/moc_VisibleOptionsMenu.cpp:184
#19 0x00000000004f7f49 in Viewer::VisibleOptionsMenu::toggleShowLabel (this=0x31d3a10, b=true) at /home/victor/kphotoalbum/Viewer/VisibleOptionsMenu.cpp:96
#20 0x00000000004f9327 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<bool>, void, void (Viewer::VisibleOptionsMenu::*)(bool)>::call (f=(void (Viewer::VisibleOptionsMenu::*)(Viewer::VisibleOptionsMenu * const, bool)) 0x4f7f16 <Viewer::VisibleOptionsMenu::toggleShowLabel(bool)>, o=0x31d3a10, arg=0x7ffcbc03dd70) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:152
#21 0x00000000004f9221 in QtPrivate::FunctionPointer<void (Viewer::VisibleOptionsMenu::*)(bool)>::call<QtPrivate::List<bool>, void> (f=(void (Viewer::VisibleOptionsMenu::*)(Viewer::VisibleOptionsMenu * const, bool)) 0x4f7f16 <Viewer::VisibleOptionsMenu::toggleShowLabel(bool)>, o=0x31d3a10, arg=0x7ffcbc03dd70) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:185
#22 0x00000000004f90ef in QtPrivate::QSlotObject<void (Viewer::VisibleOptionsMenu::*)(bool), QtPrivate::List<bool>, void>::impl (which=1, this_=0x31daae0, r=0x31d3a10, a=0x7ffcbc03dd70, ret=0x0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:418
#23 0x00007f39a4325812 in QtPrivate::QSlotObjectBase::call (a=0x7ffcbc03dd70, r=0x31d3a10, this=0x31daae0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#24 doActivate<false> (sender=0x31da600, signal_index=7, argv=0x7ffcbc03dd70) at kernel/qobject.cpp:3925
#25 0x00007f39a431e47f in QMetaObject::activate (sender=sender@entry=0x31da600, m=m@entry=0x7f39a54bacc0 <QAction::staticMetaObject>, local_signal_index=local_signal_index@entry=4, argv=argv@entry=0x7ffcbc03dd70) at kernel/qobject.cpp:3985
#26 0x00007f39a4f9e932 in QAction::toggled (this=this@entry=0x31da600, _t1=<optimized out>, _t1@entry=true) at .moc/moc_qaction.cpp:389
#27 0x00007f39a4fa1331 in QAction::setChecked (this=0x31da600, b=true) at kernel/qaction.cpp:976
#28 0x00000000004f816d in Viewer::VisibleOptionsMenu::updateState (this=0x31d3a10) at /home/victor/kphotoalbum/Viewer/VisibleOptionsMenu.cpp:151
#29 0x00000000004f928f in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (Viewer::VisibleOptionsMenu::*)()>::call(void (Viewer::VisibleOptionsMenu::*)(), Viewer::VisibleOptionsMenu*, void**) (f=(void (Viewer::VisibleOptionsMenu::*)(Viewer::VisibleOptionsMenu * const)) 0x4f8116 <Viewer::VisibleOptionsMenu::updateState()>, o=0x31d3a10, arg=0x7ffcbc03df90) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:152
#30 0x00000000004f91dc in QtPrivate::FunctionPointer<void (Viewer::VisibleOptionsMenu::*)()>::call<QtPrivate::List<>, void>(void (Viewer::VisibleOptionsMenu::*)(), Viewer::VisibleOptionsMenu*, void**) (f=(void (Viewer::VisibleOptionsMenu::*)(Viewer::VisibleOptionsMenu * const)) 0x4f8116 <Viewer::VisibleOptionsMenu::updateState()>, o=0x31d3a10, arg=0x7ffcbc03df90) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:185
#31 0x00000000004f9001 in QtPrivate::QSlotObject<void (Viewer::VisibleOptionsMenu::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x31d8c90, r=0x31d3a10, a=0x7ffcbc03df90, ret=0x0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:418
#32 0x00007f39a4325812 in QtPrivate::QSlotObjectBase::call (a=0x7ffcbc03df90, r=0x31d3a10, this=0x31d8c90) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#33 doActivate<false> (sender=0x31d3a10, signal_index=7, argv=0x7ffcbc03df90) at kernel/qobject.cpp:3925
#34 0x00007f39a431e47f in QMetaObject::activate (sender=sender@entry=0x31d3a10, m=m@entry=0x7f39a54c7be0 <QMenu::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3985
#35 0x00007f39a5124240 in QMenu::aboutToShow (this=this@entry=0x31d3a10) at .moc/moc_qmenu.cpp:270
#36 0x00007f39a5129d3e in QMenuPrivate::popup(QPoint const&, QAction*, std::function<QPoint (QSize const&)>) (this=0x31d90d0, p=..., atAction=atAction@entry=0x0, positionFunction=...) at widgets/qmenu.cpp:2409
#37 0x00007f39a512ab9e in QMenu::popup (this=<optimized out>, p=..., atAction=atAction@entry=0x0) at widgets/qmenu.cpp:2353
#38 0x00007f39a512bd76 in QMenu::internalDelayedPopup (this=0x31ba070) at widgets/qmenu.cpp:3675
#39 0x00007f39a431922b in QObject::event (this=0x31ba070, e=0x7ffcbc03e2a0) at kernel/qobject.cpp:1369
#40 0x00007f39a4fa519e in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x31ba070, e=0x7ffcbc03e2a0) at kernel/qapplication.cpp:3640
#41 0x00007f39a42ed568 in QCoreApplication::notifyInternal2 (receiver=0x31ba070, event=0x7ffcbc03e2a0) at kernel/qcoreapplication.cpp:1064
#42 0x00007f39a42ed72e in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1462
#43 0x00007f39a4345899 in QTimerInfoList::activateTimers (this=0x26eeeb0) at kernel/qtimerinfo_unix.cpp:643
#44 0x00007f39a4346144 in timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:183
#45 0x00007f39a0b2b9d8 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#46 0x00007f39a0b2bde8 in ?? () from /lib64/libglib-2.0.so.0
#47 0x00007f39a0b2be7c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#48 0x00007f39a43464a6 in QEventDispatcherGlib::processEvents (this=0x26fa330, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#49 0x00007f39a42ebffb in QEventLoop::exec (this=this@entry=0x7ffcbc03e4f0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#50 0x00007f39a512b70f in QMenuPrivate::exec(QPoint const&, QAction*, std::function<QPoint (QSize const&)>) (this=0x2dd6880, p=..., action=0x0, positionFunction=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#51 0x00007f39a512b82f in QMenu::exec (this=<optimized out>, p=..., action=<optimized out>) at widgets/qmenu.cpp:2686
#52 0x00000000004d7487 in Viewer::ViewerWidget::contextMenuEvent (this=0x2d93af0, e=0x7ffcbc03e790) at /home/victor/kphotoalbum/Viewer/ViewerWidget.cpp:531
#53 0x00007f39a4fe6d68 in QWidget::event (this=this@entry=0x2d93af0, event=event@entry=0x7ffcbc03e790) at kernel/qwidget.cpp:9045
#54 0x00007f39a5091f7e in QFrame::event (this=0x2d93af0, e=0x7ffcbc03e790) at widgets/qframe.cpp:550
#55 0x00007f39a4fa519e in QApplicationPrivate::notify_helper (this=this@entry=0x261f1a0, receiver=receiver@entry=0x2d93af0, e=e@entry=0x7ffcbc03e790) at kernel/qapplication.cpp:3640
#56 0x00007f39a4fadaaa in QApplication::notify (this=<optimized out>, receiver=<optimized out>, e=0x7ffcbc03e9c0) at kernel/qapplication.cpp:3246
#57 0x00007f39a42ed568 in QCoreApplication::notifyInternal2 (receiver=0x2d99470, event=0x7ffcbc03e9c0) at kernel/qcoreapplication.cpp:1064
#58 0x00007f39a42ed5b2 in QCoreApplication::forwardEvent (receiver=<optimized out>, event=<optimized out>, originatingEvent=<optimized out>) at kernel/qcoreapplication.cpp:1079
#59 0x00007f39a4ffff59 in QWidgetWindow::handleMouseEvent (this=this@entry=0x2f3efd0, event=event@entry=0x7ffcbc03ecb0) at kernel/qwidgetwindow.cpp:692
#60 0x00007f39a5002d1f in QWidgetWindow::event (this=0x2f3efd0, event=0x7ffcbc03ecb0) at kernel/qwidgetwindow.cpp:300
#61 0x00007f39a4fa519e in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x2f3efd0, e=0x7ffcbc03ecb0) at kernel/qapplication.cpp:3640
#62 0x00007f39a42ed568 in QCoreApplication::notifyInternal2 (receiver=0x2f3efd0, event=0x7ffcbc03ecb0) at kernel/qcoreapplication.cpp:1064
#63 0x00007f39a42ed73e in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1474
#64 0x00007f39a477d0eb in QGuiApplicationPrivate::processMouseEvent (e=0x7f391c021270) at kernel/qguiapplication.cpp:2285
#65 0x00007f39a475036c in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#66 0x00007f399891b1aa in xcbSourceDispatch (source=<optimized out>) at qxcbeventdispatcher.cpp:105
#67 0x00007f39a0b2b9d8 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#68 0x00007f39a0b2bde8 in ?? () from /lib64/libglib-2.0.so.0
#69 0x00007f39a0b2be7c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#70 0x00007f39a43464a6 in QEventDispatcherGlib::processEvents (this=0x26fa330, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#71 0x00007f39a42ebffb in QEventLoop::exec (this=this@entry=0x7ffcbc03efe0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#72 0x00007f39a42f4490 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#73 0x0000000000472960 in main (argc=2, argv=0x7ffcbc03f6e8) at /home/victor/kphotoalbum/main.cpp:161
[Inferior 1 (process 6732) detached]
Comment 1 Johannes Zarl-Zierl 2023-09-17 22:14:13 UTC
Git commit cf90f45e92a1343f5747bc951681341e2c178048 by Johannes Zarl-Zierl.
Committed on 18/09/2023 at 00:13.
Pushed by johanneszarl into branch 'master'.

Properly adjust current viewer info if files are deleted.

If images are deleted while the viewer window is open, the viewer widget
would not change the currently displayed image.
This issue also could lead to a crash if the currently displayed image
is invalidated.

M  +2    -1    CHANGELOG.md
M  +19   -0    Viewer/ViewerWidget.cpp

https://invent.kde.org/graphics/kphotoalbum/-/commit/cf90f45e92a1343f5747bc951681341e2c178048
Comment 2 Victor Lobo 2023-09-24 20:20:57 UTC
Reopening this bug since the fix seems to have caused another crash if the file is deleted when the Viewer and Annotations window is open.
Let me know if this should we reported  as a new bug.

Steps to reproduce this:
1. Open KPhotoAlbum
2. Go to Thumbnail View
3. Open  any image or video (does NOT  have to be the last)
4. From the Viewer window opens the Annotations window (Ctrl + 1)
5. Keep the Viewer window and Annotations window open and go back to Thumbnail view and delete ANY image/video (Press Delete key)
6. Crash 


Backtrace:
Application: KPhotoAlbum (kphotoalbum), signal: Aborted

[KCrash Handler]
#4  0x00007f4195091e0c in __pthread_kill_implementation () from /lib64/libc.so.6
#5  0x00007f419503f0e6 in raise () from /lib64/libc.so.6
#6  0x00007f41950268d7 in abort () from /lib64/libc.so.6
#7  0x00007f41958bb4f9 in qt_message_fatal (message=<synthetic pointer>..., context=...) at global/qlogging.cpp:1914
#8  QMessageLogger::fatal (this=this@entry=0x7ffe4cb45e88, msg=msg@entry=0x7f4195bd2028 "ASSERT failure in %s: \"%s\", file %s, line %d") at global/qlogging.cpp:893
#9  0x00007f41958ba78c in qt_assert_x (where=<optimized out>, what=<optimized out>, file=<optimized out>, line=<optimized out>) at global/qglobal.cpp:3399
#10 0x00000000004e13d2 in QList<DB::FileName>::operator[] (this=0x18322c0, i=0) at /usr/include/qt5/QtCore/qlist.h:579
#11 0x00000000004d72ba in Viewer::ViewerWidget::slotRemoveDeletedImages (this=0x18321f0, imageList=...) at /home/victor/Downloads/kphotoalbum/Viewer/ViewerWidget.cpp:515
#12 0x00000000004e5ac9 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<DB::FileNameList const&>, void, void (Viewer::ViewerWidget::*)(DB::FileNameList const&)>::call (f=(void (Viewer::ViewerWidget::*)(Viewer::ViewerWidget * const, const DB::FileNameList &)) 0x4d728a <Viewer::ViewerWidget::slotRemoveDeletedImages(DB::FileNameList const&)>, o=0x18321f0, arg=0x7ffe4cb460f0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:152
#13 0x00000000004e50b2 in QtPrivate::FunctionPointer<void (Viewer::ViewerWidget::*)(DB::FileNameList const&)>::call<QtPrivate::List<DB::FileNameList const&>, void> (f=(void (Viewer::ViewerWidget::*)(Viewer::ViewerWidget * const, const DB::FileNameList &)) 0x4d728a <Viewer::ViewerWidget::slotRemoveDeletedImages(DB::FileNameList const&)>, o=0x18321f0, arg=0x7ffe4cb460f0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:185
#14 0x00000000004e3e7b in QtPrivate::QSlotObject<void (Viewer::ViewerWidget::*)(DB::FileNameList const&), QtPrivate::List<DB::FileNameList const&>, void>::impl (which=1, this_=0x1a86c50, r=0x18321f0, a=0x7ffe4cb460f0, ret=0x0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:418
#15 0x00007f4195b25812 in QtPrivate::QSlotObjectBase::call (a=0x7ffe4cb460f0, r=0x18321f0, this=0x1a86c50) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#16 doActivate<false> (sender=0xbe65d0, signal_index=5, argv=0x7ffe4cb460f0) at kernel/qobject.cpp:3925
#17 0x000000000058b401 in DB::ImageDB::imagesDeleted (this=0xbe65d0, _t1=...) at /home/victor/Downloads/kphotoalbum/build/kphotoalbum_autogen/include/moc_ImageDB.cpp:261
#18 0x0000000000586d12 in DB::ImageDB::deleteList (this=0xbe65d0, list=...) at /home/victor/Downloads/kphotoalbum/DB/ImageDB.cpp:638
#19 0x0000000000652956 in Utilities::DeleteFiles::deleteFilesPrivate (this=0x198ffe0, files=..., method=Utilities::MoveToTrash) at /home/victor/Downloads/kphotoalbum/Utilities/DeleteFiles.cpp:73
#20 0x00000000006525ad in Utilities::DeleteFiles::deleteFiles (files=..., method=Utilities::MoveToTrash) at /home/victor/Downloads/kphotoalbum/Utilities/DeleteFiles.cpp:31
#21 0x0000000000524479 in MainWindow::DeleteDialog::deleteImages (this=0x1963fb0) at /home/victor/Downloads/kphotoalbum/MainWindow/DeleteDialog.cpp:89
#22 0x0000000000524aa0 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)) 0x524420 <MainWindow::DeleteDialog::deleteImages()>, o=0x1963fb0, arg=0x7ffe4cb46480) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:152
#23 0x0000000000524a32 in QtPrivate::FunctionPointer<void (MainWindow::DeleteDialog::*)()>::call<QtPrivate::List<>, void>(void (MainWindow::DeleteDialog::*)(), MainWindow::DeleteDialog*, void**) (f=(void (MainWindow::DeleteDialog::*)(MainWindow::DeleteDialog * const)) 0x524420 <MainWindow::DeleteDialog::deleteImages()>, o=0x1963fb0, arg=0x7ffe4cb46480) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:185
#24 0x000000000052499d in QtPrivate::QSlotObject<void (MainWindow::DeleteDialog::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x1817560, r=0x1963fb0, a=0x7ffe4cb46480, ret=0x0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:418
#25 0x00007f4195b25812 in QtPrivate::QSlotObjectBase::call (a=0x7ffe4cb46480, r=0x1963fb0, this=0x1817560) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#26 doActivate<false> (sender=0xe30ca0, signal_index=8, argv=0x7ffe4cb46480) at kernel/qobject.cpp:3925
#27 0x00007f4195b1e47f in QMetaObject::activate (sender=sender@entry=0xe30ca0, m=m@entry=0x7f4196cc9440 <QDialogButtonBox::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x0) at kernel/qobject.cpp:3985
#28 0x00007f4196940203 in QDialogButtonBox::accepted (this=this@entry=0xe30ca0) at .moc/moc_qdialogbuttonbox.cpp:287
#29 0x00007f4196940860 in QDialogButtonBoxPrivate::_q_handleButtonClicked (this=<optimized out>) at widgets/qdialogbuttonbox.cpp:878
#30 0x00007f4195b257b3 in doActivate<false> (sender=0x1959330, signal_index=9, argv=0x7ffe4cb465e0) at kernel/qobject.cpp:3937
#31 0x00007f4195b1e47f in QMetaObject::activate (sender=sender@entry=0x1959330, m=m@entry=0x7f4196cc0280 <QAbstractButton::staticMetaObject>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7ffe4cb465e0) at kernel/qobject.cpp:3985
#32 0x00007f4196896ac2 in QAbstractButton::clicked (this=this@entry=0x1959330, _t1=<optimized out>) at .moc/moc_qabstractbutton.cpp:308
#33 0x00007f4196896d2a in QAbstractButtonPrivate::emitClicked (this=0x1964520) at widgets/qabstractbutton.cpp:416
#34 0x00007f41968988d9 in QAbstractButton::click (this=0x1959330) at widgets/qabstractbutton.cpp:905
#35 QAbstractButton::click (this=0x1959330) at widgets/qabstractbutton.cpp:891
#36 0x00007f41969ad5bc in QDialog::keyPressEvent (e=<optimized out>, this=<optimized out>) at dialogs/qdialog.cpp:723
#37 QDialog::keyPressEvent (this=<optimized out>, e=<optimized out>) at dialogs/qdialog.cpp:703
#38 0x00007f41967e7ab5 in QWidget::event (this=0x1963fb0, event=0x7ffe4cb46a90) at kernel/qwidget.cpp:8704
#39 0x00007f41967a519e in QApplicationPrivate::notify_helper (this=this@entry=0x8b6d50, receiver=receiver@entry=0x1963fb0, e=e@entry=0x7ffe4cb46a90) at kernel/qapplication.cpp:3640
#40 0x00007f41967ad0b8 in QApplication::notify (this=<optimized out>, receiver=0x1963fb0, e=0x7ffe4cb46a90) at kernel/qapplication.cpp:3002
#41 0x00007f4195aed568 in QCoreApplication::notifyInternal2 (receiver=0x1828e80, event=0x7ffe4cb46a90) at kernel/qcoreapplication.cpp:1064
#42 0x00007f4195aed5b2 in QCoreApplication::forwardEvent (receiver=<optimized out>, event=<optimized out>, originatingEvent=<optimized out>) at kernel/qcoreapplication.cpp:1079
#43 0x00007f4196802d6a in QWidgetWindow::event (this=0x1812960, event=0x7ffe4cb46a90) at kernel/qwidgetwindow.cpp:293
#44 0x00007f41967a519e in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x1812960, e=0x7ffe4cb46a90) at kernel/qapplication.cpp:3640
#45 0x00007f4195aed568 in QCoreApplication::notifyInternal2 (receiver=0x1812960, event=0x7ffe4cb46a90) at kernel/qcoreapplication.cpp:1064
#46 0x00007f4195f78df9 in QGuiApplicationPrivate::processKeyEvent (e=0x1983610) at kernel/qguiapplication.cpp:2417
#47 0x00007f4195f5036c in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#48 0x00007f418a31b1aa in xcbSourceDispatch (source=<optimized out>) at qxcbeventdispatcher.cpp:105
#49 0x00007f41927169d8 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#50 0x00007f4192716de8 in ?? () from /lib64/libglib-2.0.so.0
#51 0x00007f4192716e7c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#52 0x00007f4195b464a6 in QEventDispatcherGlib::processEvents (this=0x99c350, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#53 0x00007f4195aebffb in QEventLoop::exec (this=this@entry=0x7ffe4cb46d20, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#54 0x00007f41969ada07 in QDialog::exec (this=0x1963fb0) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#55 0x000000000052436b in MainWindow::DeleteDialog::exec (this=0x1963fb0, list=...) at /home/victor/Downloads/kphotoalbum/MainWindow/DeleteDialog.cpp:84
#56 0x0000000000536c86 in MainWindow::Window::slotDeleteSelected (this=0xb8bef0) at /home/victor/Downloads/kphotoalbum/MainWindow/Window.cpp:548
#57 0x000000000054da7a 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)) 0x536c06 <MainWindow::Window::slotDeleteSelected()>, o=0xb8bef0, arg=0x7ffe4cb47030) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:152
#58 0x000000000054d1f3 in QtPrivate::FunctionPointer<void (MainWindow::Window::*)()>::call<QtPrivate::List<>, void>(void (MainWindow::Window::*)(), MainWindow::Window*, void**) (f=(void (MainWindow::Window::*)(MainWindow::Window * const)) 0x536c06 <MainWindow::Window::slotDeleteSelected()>, o=0xb8bef0, arg=0x7ffe4cb47030) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:185
#59 0x000000000054baab in QtPrivate::QSlotObject<void (MainWindow::Window::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0xd3e6f0, r=0xb8bef0, a=0x7ffe4cb47030, ret=0x0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:418
#60 0x00007f4195b25812 in QtPrivate::QSlotObjectBase::call (a=0x7ffe4cb47030, r=0xb8bef0, this=0xd3e6f0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#61 doActivate<false> (sender=0xee76b0, signal_index=4, argv=0x7ffe4cb47030) at kernel/qobject.cpp:3925
#62 0x00007f4195b1e47f in QMetaObject::activate (sender=sender@entry=0xee76b0, m=m@entry=0x7f4196cbacc0 <QAction::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7ffe4cb47030) at kernel/qobject.cpp:3985
#63 0x00007f419679e8b2 in QAction::triggered (this=this@entry=0xee76b0, _t1=<optimized out>) at .moc/moc_qaction.cpp:376
#64 0x00007f41967a142f in QAction::activate (this=0xee76b0, event=<optimized out>) at kernel/qaction.cpp:1161
#65 0x00007f41967a200d in QAction::event (e=<optimized out>, this=<optimized out>) at kernel/qaction.cpp:1086
#66 QAction::event (this=<optimized out>, e=<optimized out>) at kernel/qaction.cpp:1075
#67 0x00007f41967a519e in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0xee76b0, e=0x7ffe4cb471d0) at kernel/qapplication.cpp:3640
#68 0x00007f4195aed568 in QCoreApplication::notifyInternal2 (receiver=0xee76b0, event=0x7ffe4cb471d0) at kernel/qcoreapplication.cpp:1064
#69 0x00007f4195aed72e in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1462
#70 0x00007f4195fad671 in QShortcutMap::dispatchEvent (this=<optimized out>, e=<optimized out>) at kernel/qshortcutmap.cpp:675
#71 0x00007f4195fae28b in QShortcutMap::tryShortcut (this=this@entry=0x8b6e18, e=e@entry=0x7ffe4cb47290) at kernel/qshortcutmap.cpp:343
#72 0x00007f4195f53976 in QWindowSystemInterface::handleShortcutEvent (window=<optimized out>, timestamp=192572682, keyCode=16777223, modifiers=..., nativeScanCode=119, nativeVirtualKey=65535, nativeModifiers=0, text=..., autorepeat=false, count=1) at kernel/qwindowsysteminterface.cpp:477
#73 0x00007f4195f78d9d in QGuiApplicationPrivate::processKeyEvent (e=0x2ad0fb0) at kernel/qguiapplication.cpp:2398
#74 0x00007f4195f5036c in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#75 0x00007f418a31b1aa in xcbSourceDispatch (source=<optimized out>) at qxcbeventdispatcher.cpp:105
#76 0x00007f41927169d8 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#77 0x00007f4192716de8 in ?? () from /lib64/libglib-2.0.so.0
#78 0x00007f4192716e7c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#79 0x00007f4195b464a6 in QEventDispatcherGlib::processEvents (this=0x99c350, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#80 0x00007f4195aebffb in QEventLoop::exec (this=this@entry=0x7ffe4cb475d0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#81 0x00007f41969ada07 in QDialog::exec (this=0xdc7ce0) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#82 0x00000000005e907a in AnnotationDialog::Dialog::exec (this=0xdc7ce0) at /home/victor/Downloads/kphotoalbum/AnnotationDialog/Dialog.cpp:958
#83 0x00000000005e7325 in AnnotationDialog::Dialog::configure (this=0xdc7ce0, list=..., oneAtATime=true) at /home/victor/Downloads/kphotoalbum/AnnotationDialog/Dialog.cpp:769
#84 0x000000000053667d in MainWindow::Window::configImages (this=0xb8bef0, list=..., oneAtATime=true) at /home/victor/Downloads/kphotoalbum/MainWindow/Window.cpp:509
#85 0x000000000053661b in MainWindow::Window::configureImages (list=..., oneAtATime=true) at /home/victor/Downloads/kphotoalbum/MainWindow/Window.cpp:503
#86 0x00000000004d8f37 in operator() (__closure=0x7f417c002670) at /home/victor/Downloads/kphotoalbum/Viewer/ViewerWidget.cpp:926
#87 0x00000000004dfd89 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, Viewer::ViewerWidget::editImage()::<lambda()> >::call(struct {...} &, void **) (f=..., arg=0x197f908) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:146
#88 0x00000000004dfc75 in QtPrivate::Functor<Viewer::ViewerWidget::editImage()::<lambda()>, 0>::call<QtPrivate::List<>, void>(struct {...} &, void *, void **) (f=..., arg=0x197f908) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:256
#89 0x00000000004dfb8a in QtPrivate::QFunctorSlotObject<Viewer::ViewerWidget::editImage()::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=1, this_=0x7f417c002660, r=0x8b4970, a=0x197f908, ret=0x0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:443
#90 0x00007f4195b19320 in QObject::event (this=0x8b4970, e=0x197f8c0) at kernel/qobject.cpp:1347
#91 0x00007f41967a519e in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x8b4970, e=0x197f8c0) at kernel/qapplication.cpp:3640
#92 0x00007f4195aed568 in QCoreApplication::notifyInternal2 (receiver=0x8b4970, event=0x197f8c0) at kernel/qcoreapplication.cpp:1064
#93 0x00007f4195aed72e in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1462
#94 0x00007f4195af0b61 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x8b48f0) at kernel/qcoreapplication.cpp:1821
#95 0x00007f4195af10a8 in QCoreApplication::sendPostedEvents (receiver=<optimized out>, event_type=<optimized out>) at kernel/qcoreapplication.cpp:1680
#96 0x00007f4195b46c93 in postEventSourceDispatch (s=0x996eb0) at kernel/qeventdispatcher_glib.cpp:277
#97 0x00007f41927169d8 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#98 0x00007f4192716de8 in ?? () from /lib64/libglib-2.0.so.0
#99 0x00007f4192716e7c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#100 0x00007f4195b464a6 in QEventDispatcherGlib::processEvents (this=0x99c350, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#101 0x00007f4195aebffb in QEventLoop::exec (this=this@entry=0x7ffe4cb47c30, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#102 0x00007f4195af4490 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#103 0x0000000000472980 in main (argc=2, argv=0x7ffe4cb48338) at /home/victor/Downloads/kphotoalbum/main.cpp:161
[Inferior 1 (process 17347) detached]
Comment 3 Johannes Zarl-Zierl 2023-09-24 22:56:32 UTC
Git commit f1e9d5b7ad7e11d7402c5704dfd0f00600dac102 by Johannes Zarl-Zierl.
Committed on 25/09/2023 at 00:56.
Pushed by johanneszarl into branch 'master'.

Fix crash/regression caused by cf90f45e

M  +1    -1    Viewer/ViewerWidget.cpp

https://invent.kde.org/graphics/kphotoalbum/-/commit/f1e9d5b7ad7e11d7402c5704dfd0f00600dac102
Comment 4 Johannes Zarl-Zierl 2023-09-24 22:59:12 UTC
Hi Victor!

Thanks! The fix for the regression seems easy enough - can you please test the fix?

Cheers,
  Johannes
Comment 5 Victor Lobo 2023-09-26 22:42:19 UTC
This fix works well. Thank you!