https://bugs.kde.org/show_bug.cgi?id=474392

            Bug ID: 474392
           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
    Classification: Applications
           Product: kphotoalbum
           Version: 5.11.0
          Platform: openSUSE
                OS: Linux
            Status: REPORTED
          Severity: crash
          Priority: NOR
         Component: Viewer
          Assignee: kpab...@willden.org
          Reporter: victor.ip.l...@gmail.com
  Target Milestone: ---

Created attachment 161553
  --> https://bugs.kde.org/attachment.cgi?id=161553&action=edit
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]

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to