STEPS TO REPRODUCE 1. Load the demo database. 2. Click Events, then click fun. 3. Select both images and open the annotation dialog with CTRL-2. 4. Unselect the "fun" event and click Done. 5. Now delete one or more images to trigger the segfault (eg. click Home, People, and select and delete an image). OBSERVED RESULT KPhotoAlbum segfaults. EXPECTED RESULT KPhotoAlbum shouldn't segfault. SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Version 5.104.0 Qt Version: Version 5.15.3 (built against 5.15.3) ADDITIONAL INFORMATION AnnotationDialog::Dialog::slotDiscardFiles() is calling AnnotationDialog::ImagePreviewWidget::reconfigure() even though the annotation dialog is closed. AnnotationDialog::Dialog() is not clearing m_origList when it is accepted.
Thanks for your bug report! I can confirm this. I'll have a look at this, if Johannes is not faster than me ;-)
Git commit 59f2cb63ac191040e6e7e0a20d5afe01396e5c82 by Tobias Leupold. Committed on 11/03/2024 at 20:24. Pushed by tleupold into branch 'master'. Don't crash if an image is deleted whilst annotating multiple images M +6 -1 AnnotationDialog/ImagePreview.cpp M +2 -1 AnnotationDialog/ImagePreview.h M +18 -1 AnnotationDialog/ImagePreviewWidget.cpp https://invent.kde.org/graphics/kphotoalbum/-/commit/59f2cb63ac191040e6e7e0a20d5afe01396e5c82
This was a nasty one ;-) Please check if this fixes it, and re-open if not!
Wow, that was fast. And it seems to be fixed. Good work!