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

            Bug ID: 475387
           Summary: KPhotoAlbum crashes after Toggle full-screen preview
                    in Annotations window for an image that is already
                    deleted
    Classification: Applications
           Product: kphotoalbum
           Version: 5.11.0
          Platform: openSUSE
                OS: Linux
            Status: REPORTED
          Severity: crash
          Priority: NOR
         Component: Annotation Dialog
          Assignee: kpab...@willden.org
          Reporter: victor.ip.l...@gmail.com
  Target Milestone: ---

SUMMARY
KPhotoAlbum crashes after Toggle full-screen preview in Annotations window for
an image that is already deleted

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 Toggle full-screen preview
(Ctrl-Space)
7. 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  0x00000000004b1318 in DB::ImageInfo::isStacked (this=0x0) at
/home/victor/kphotoalbum/DB/ImageInfo.h:144
#5  0x00000000004d721a in Viewer::ViewerWidget::load (this=0x2b9bf80) at
/home/victor/kphotoalbum/Viewer/ViewerWidget.cpp:491
#6  0x00000000004d6bfe in Viewer::ViewerWidget::load (this=0x2b9bf80, list=...,
index=0) at /home/victor/kphotoalbum/Viewer/ViewerWidget.cpp:435
#7  0x00000000005ee2e3 in AnnotationDialog::Dialog::togglePreview
(this=0x2c30470) at /home/victor/kphotoalbum/AnnotationDialog/Dialog.cpp:1502
#8  0x00000000005f7a3a in QtPrivate::FunctorCall<QtPrivate::IndexesList<>,
QtPrivate::List<>, void, void (AnnotationDialog::Dialog::*)()>::call(void
(AnnotationDialog::Dialog::*)(), AnnotationDialog::Dialog*, void**) (f=(void
(AnnotationDialog::Dialog::*)(AnnotationDialog::Dialog * const)) 0x5ee1b2
<AnnotationDialog::Dialog::togglePreview()>, o=0x2c30470, arg=0x7fff5a180260)
at /usr/include/qt5/QtCore/qobjectdefs_impl.h:152
#9  0x00000000005f6db4 in QtPrivate::FunctionPointer<void
(AnnotationDialog::Dialog::*)()>::call<QtPrivate::List<>, void>(void
(AnnotationDialog::Dialog::*)(), AnnotationDialog::Dialog*, void**) (f=(void
(AnnotationDialog::Dialog::*)(AnnotationDialog::Dialog * const)) 0x5ee1b2
<AnnotationDialog::Dialog::togglePreview()>, o=0x2c30470, arg=0x7fff5a180260)
at /usr/include/qt5/QtCore/qobjectdefs_impl.h:185
#10 0x00000000005f54c9 in QtPrivate::QSlotObject<void
(AnnotationDialog::Dialog::*)(), QtPrivate::List<>, void>::impl(int,
QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1,
this_=0x3e164c0, r=0x2c30470, a=0x7fff5a180260, ret=0x0) at
/usr/include/qt5/QtCore/qobjectdefs_impl.h:418
#11 0x00007f9e64725812 in QtPrivate::QSlotObjectBase::call (a=0x7fff5a180260,
r=0x2c30470, this=0x3e164c0) at
../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#12 doActivate<false> (sender=0x3e16550, signal_index=4, argv=0x7fff5a180260)
at kernel/qobject.cpp:3925
#13 0x00007f9e6471e47f in QMetaObject::activate (sender=sender@entry=0x3e16550,
m=m@entry=0x7f9e658bacc0 <QAction::staticMetaObject>,
local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fff5a180260)
at kernel/qobject.cpp:3985
#14 0x00007f9e6539e8b2 in QAction::triggered (this=this@entry=0x3e16550,
_t1=<optimized out>) at .moc/moc_qaction.cpp:376
#15 0x00007f9e653a142f in QAction::activate (this=0x3e16550, event=<optimized
out>) at kernel/qaction.cpp:1161
#16 0x00007f9e653a200d in QAction::event (e=<optimized out>, this=<optimized
out>) at kernel/qaction.cpp:1086
#17 QAction::event (this=<optimized out>, e=<optimized out>) at
kernel/qaction.cpp:1075
#18 0x00007f9e653a519e in QApplicationPrivate::notify_helper (this=<optimized
out>, receiver=0x3e16550, e=0x7fff5a180400) at kernel/qapplication.cpp:3640
#19 0x00007f9e646ed568 in QCoreApplication::notifyInternal2
(receiver=0x3e16550, event=0x7fff5a180400) at kernel/qcoreapplication.cpp:1064
#20 0x00007f9e646ed72e in QCoreApplication::sendEvent (receiver=<optimized
out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1462
#21 0x00007f9e64bad671 in QShortcutMap::dispatchEvent (this=<optimized out>,
e=<optimized out>) at kernel/qshortcutmap.cpp:675
#22 0x00007f9e64bae28b in QShortcutMap::tryShortcut (this=this@entry=0x2584288,
e=e@entry=0x7fff5a1804c0) at kernel/qshortcutmap.cpp:343
#23 0x00007f9e64b53976 in QWindowSystemInterface::handleShortcutEvent
(window=<optimized out>, timestamp=1957744, keyCode=32, modifiers=...,
nativeScanCode=65, nativeVirtualKey=32, nativeModifiers=20, text=...,
autorepeat=false, count=1) at kernel/qwindowsysteminterface.cpp:477
#24 0x00007f9e64b78d9d in QGuiApplicationPrivate::processKeyEvent (e=0x450caf0)
at kernel/qguiapplication.cpp:2398
#25 0x00007f9e64b5036c in QWindowSystemInterface::sendWindowSystemEvents
(flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#26 0x00007f9e58b1b1aa in xcbSourceDispatch (source=<optimized out>) at
qxcbeventdispatcher.cpp:105
#27 0x00007f9e60d2b9d8 in g_main_context_dispatch () from
/lib64/libglib-2.0.so.0
#28 0x00007f9e60d2bde8 in ?? () from /lib64/libglib-2.0.so.0
#29 0x00007f9e60d2be7c in g_main_context_iteration () from
/lib64/libglib-2.0.so.0
#30 0x00007f9e647464a6 in QEventDispatcherGlib::processEvents (this=0x265eaa0,
flags=...) at kernel/qeventdispatcher_glib.cpp:423
#31 0x00007f9e646ebffb in QEventLoop::exec (this=this@entry=0x7fff5a180800,
flags=..., flags@entry=...) at
../../include/QtCore/../../src/corelib/global/qflags.h:69
#32 0x00007f9e655ada07 in QDialog::exec (this=0x2c30470) at
../../include/QtCore/../../src/corelib/global/qflags.h:121
#33 0x00000000005e9820 in AnnotationDialog::Dialog::exec (this=0x2c30470) at
/home/victor/kphotoalbum/AnnotationDialog/Dialog.cpp:955
#34 0x00000000005e7acb in AnnotationDialog::Dialog::configure (this=0x2c30470,
list=..., oneAtATime=true) at
/home/victor/kphotoalbum/AnnotationDialog/Dialog.cpp:766
#35 0x00000000005367d7 in MainWindow::Window::configImages (this=0x27c9600,
list=..., oneAtATime=true) at
/home/victor/kphotoalbum/MainWindow/Window.cpp:509
#36 0x0000000000536775 in MainWindow::Window::configureImages (list=...,
oneAtATime=true) at /home/victor/kphotoalbum/MainWindow/Window.cpp:503
#37 0x00000000005366cc in MainWindow::Window::configureImages (this=0x27c9600,
oneAtATime=true) at /home/victor/kphotoalbum/MainWindow/Window.cpp:497
#38 0x000000000053655b in MainWindow::Window::slotConfigureImagesOneAtATime
(this=0x27c9600) at /home/victor/kphotoalbum/MainWindow/Window.cpp:483
#39 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=0x27c9600,
arg=0x7fff5a180c20) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:152
#40 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=0x27c9600,
arg=0x7fff5a180c20) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:185
#41 0x000000000054c169 in QtPrivate::QSlotObject<void
(MainWindow::Window::*)(), QtPrivate::List<>, void>::impl(int,
QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1,
this_=0x2c12290, r=0x27c9600, a=0x7fff5a180c20, ret=0x0) at
/usr/include/qt5/QtCore/qobjectdefs_impl.h:418
#42 0x00007f9e64725812 in QtPrivate::QSlotObjectBase::call (a=0x7fff5a180c20,
r=0x27c9600, this=0x2c12290) at
../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#43 doActivate<false> (sender=0x2c123c0, signal_index=4, argv=0x7fff5a180c20)
at kernel/qobject.cpp:3925
#44 0x00007f9e6471e47f in QMetaObject::activate (sender=sender@entry=0x2c123c0,
m=m@entry=0x7f9e658bacc0 <QAction::staticMetaObject>,
local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fff5a180c20)
at kernel/qobject.cpp:3985
#45 0x00007f9e6539e8b2 in QAction::triggered (this=this@entry=0x2c123c0,
_t1=<optimized out>) at .moc/moc_qaction.cpp:376
#46 0x00007f9e653a142f in QAction::activate (this=0x2c123c0, event=<optimized
out>) at kernel/qaction.cpp:1161
#47 0x00007f9e65525ef2 in QMenuPrivate::activateCausedStack
(this=this@entry=0x2cf9210, causedStack=..., action=action@entry=0x2c123c0,
action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at
widgets/qmenu.cpp:1384
#48 0x00007f9e6552dd23 in QMenuPrivate::activateAction (this=0x2cf9210,
action=0x2c123c0, action_e=QAction::Trigger, self=true) at
widgets/qmenu.cpp:1461
#49 0x00007f9e653e6d68 in QWidget::event (this=0x7fff5a1818e0,
event=0x7fff5a181210) at kernel/qwidget.cpp:9045
#50 0x00007f9e653a519e in QApplicationPrivate::notify_helper
(this=this@entry=0x25841c0, receiver=receiver@entry=0x7fff5a1818e0,
e=e@entry=0x7fff5a181210) at kernel/qapplication.cpp:3640
#51 0x00007f9e653ad5cf in QApplication::notify (this=<optimized out>,
receiver=<optimized out>, e=0x7fff5a181210) at kernel/qapplication.cpp:3084
#52 0x00007f9e646ed568 in QCoreApplication::notifyInternal2
(receiver=0x7fff5a1818e0, event=0x7fff5a181210) at
kernel/qcoreapplication.cpp:1064
#53 0x00007f9e646ed73e in QCoreApplication::sendSpontaneousEvent
(receiver=<optimized out>, event=<optimized out>) at
kernel/qcoreapplication.cpp:1474
#54 0x00007f9e653ab92e in QApplicationPrivate::sendMouseEvent
(receiver=0x7fff5a1818e0, event=event@entry=0x7fff5a181210,
alienWidget=<optimized out>, nativeWidget=0x7fff5a1818e0,
buttonDown=buttonDown@entry=0x7f9e658f2330 <qt_button_down>,
lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at
kernel/qapplication.cpp:2622
#55 0x00007f9e654002ca in QWidgetWindow::handleMouseEvent
(this=this@entry=0x2cf4620, event=event@entry=0x7fff5a1814c0) at
kernel/qwidgetwindow.cpp:580
#56 0x00007f9e65402d1f in QWidgetWindow::event (this=0x2cf4620,
event=0x7fff5a1814c0) at kernel/qwidgetwindow.cpp:300
#57 0x00007f9e653a519e in QApplicationPrivate::notify_helper (this=<optimized
out>, receiver=0x2cf4620, e=0x7fff5a1814c0) at kernel/qapplication.cpp:3640
#58 0x00007f9e646ed568 in QCoreApplication::notifyInternal2
(receiver=0x2cf4620, event=0x7fff5a1814c0) at kernel/qcoreapplication.cpp:1064
#59 0x00007f9e646ed73e in QCoreApplication::sendSpontaneousEvent
(receiver=<optimized out>, event=<optimized out>) at
kernel/qcoreapplication.cpp:1474
#60 0x00007f9e64b7d0eb in QGuiApplicationPrivate::processMouseEvent
(e=0x2d404f0) at kernel/qguiapplication.cpp:2285
#61 0x00007f9e64b5036c in QWindowSystemInterface::sendWindowSystemEvents
(flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#62 0x00007f9e58b1b1aa in xcbSourceDispatch (source=<optimized out>) at
qxcbeventdispatcher.cpp:105
#63 0x00007f9e60d2b9d8 in g_main_context_dispatch () from
/lib64/libglib-2.0.so.0
#64 0x00007f9e60d2bde8 in ?? () from /lib64/libglib-2.0.so.0
#65 0x00007f9e60d2be7c in g_main_context_iteration () from
/lib64/libglib-2.0.so.0
#66 0x00007f9e647464a6 in QEventDispatcherGlib::processEvents (this=0x265eaa0,
flags=...) at kernel/qeventdispatcher_glib.cpp:423
#67 0x00007f9e646ebffb in QEventLoop::exec (this=this@entry=0x7fff5a181800,
flags=..., flags@entry=...) at
../../include/QtCore/../../src/corelib/global/qflags.h:69
#68 0x00007f9e6552b70f in QMenuPrivate::exec(QPoint const&, QAction*,
std::function<QPoint (QSize const&)>) (this=0x2cf9210, p=..., action=0x0,
positionFunction=...) at
../../include/QtCore/../../src/corelib/global/qflags.h:121
#69 0x00007f9e6552b82f in QMenu::exec (this=<optimized out>, p=...,
action=<optimized out>) at widgets/qmenu.cpp:2686
#70 0x000000000054163e in MainWindow::Window::contextMenuEvent (this=0x27c9600,
e=0x7fff5a181c30) at /home/victor/kphotoalbum/MainWindow/Window.cpp:1318
#71 0x00007f9e653e6d68 in QWidget::event (this=0x27c9600, event=0x7fff5a181c30)
at kernel/qwidget.cpp:9045
#72 0x00007f9e6fbe5469 in KXmlGuiWindow::event(QEvent*) () from
/lib64/libKF5XmlGui.so.5
#73 0x00000000005383c3 in MainWindow::Window::event (this=0x27c9600,
event=0x7fff5a181c30) at /home/victor/kphotoalbum/MainWindow/Window.cpp:751
#74 0x00007f9e653a519e in QApplicationPrivate::notify_helper
(this=this@entry=0x25841c0, receiver=receiver@entry=0x27c9600,
e=e@entry=0x7fff5a181c30) at kernel/qapplication.cpp:3640
#75 0x00007f9e653adaaa in QApplication::notify (this=<optimized out>,
receiver=<optimized out>, e=0x7fff5a181e60) at kernel/qapplication.cpp:3246
#76 0x00007f9e646ed568 in QCoreApplication::notifyInternal2
(receiver=0x2b91990, event=0x7fff5a181e60) at kernel/qcoreapplication.cpp:1064
#77 0x00007f9e646ed5b2 in QCoreApplication::forwardEvent (receiver=<optimized
out>, event=<optimized out>, originatingEvent=<optimized out>) at
kernel/qcoreapplication.cpp:1079
#78 0x00007f9e653fff59 in QWidgetWindow::handleMouseEvent
(this=this@entry=0x2a7c5e0, event=event@entry=0x7fff5a182150) at
kernel/qwidgetwindow.cpp:692
#79 0x00007f9e65402d1f in QWidgetWindow::event (this=0x2a7c5e0,
event=0x7fff5a182150) at kernel/qwidgetwindow.cpp:300
#80 0x00007f9e653a519e in QApplicationPrivate::notify_helper (this=<optimized
out>, receiver=0x2a7c5e0, e=0x7fff5a182150) at kernel/qapplication.cpp:3640
#81 0x00007f9e646ed568 in QCoreApplication::notifyInternal2
(receiver=0x2a7c5e0, event=0x7fff5a182150) at kernel/qcoreapplication.cpp:1064
#82 0x00007f9e646ed73e in QCoreApplication::sendSpontaneousEvent
(receiver=<optimized out>, event=<optimized out>) at
kernel/qcoreapplication.cpp:1474
#83 0x00007f9e64b7d0eb in QGuiApplicationPrivate::processMouseEvent
(e=0x2b86dc0) at kernel/qguiapplication.cpp:2285
#84 0x00007f9e64b5036c in QWindowSystemInterface::sendWindowSystemEvents
(flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#85 0x00007f9e58b1b1aa in xcbSourceDispatch (source=<optimized out>) at
qxcbeventdispatcher.cpp:105
#86 0x00007f9e60d2b9d8 in g_main_context_dispatch () from
/lib64/libglib-2.0.so.0
#87 0x00007f9e60d2bde8 in ?? () from /lib64/libglib-2.0.so.0
#88 0x00007f9e60d2be7c in g_main_context_iteration () from
/lib64/libglib-2.0.so.0
#89 0x00007f9e647464a6 in QEventDispatcherGlib::processEvents (this=0x265eaa0,
flags=...) at kernel/qeventdispatcher_glib.cpp:423
#90 0x00007f9e646ebffb in QEventLoop::exec (this=this@entry=0x7fff5a182480,
flags=..., flags@entry=...) at
../../include/QtCore/../../src/corelib/global/qflags.h:69
#91 0x00007f9e646f4490 in QCoreApplication::exec () at
../../include/QtCore/../../src/corelib/global/qflags.h:121
#92 0x0000000000472a10 in main (argc=2, argv=0x7fff5a182b88) at
/home/victor/kphotoalbum/main.cpp:161
[Inferior 1 (process 8843) detached]

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

Reply via email to