<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>483266</bug_id>
          
          <creation_ts>2024-03-11 17:09:38 +0000</creation_ts>
          <short_desc>Segfault after deleting an image if the annotation dialog was previously accepted to remove a tag</short_desc>
          <delta_ts>2024-03-11 21:59:32 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>kphotoalbum</product>
          <component>Annotation Dialog</component>
          <version>GIT master</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>crash</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Randall Rude">rsquared42</reporter>
          <assigned_to name="KPhotoAlbum Bugs">kphotoalbum-bugs-null</assigned_to>
          <cc>tl</cc>
          
          <cf_commitlink>https://invent.kde.org/graphics/kphotoalbum/-/commit/59f2cb63ac191040e6e7e0a20d5afe01396e5c82</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2299019</commentid>
    <comment_count>0</comment_count>
    <who name="Randall Rude">rsquared42</who>
    <bug_when>2024-03-11 17:09:38 +0000</bug_when>
    <thetext>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 &quot;fun&quot; 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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2299077</commentid>
    <comment_count>1</comment_count>
    <who name="Tobias Leupold">tl</who>
    <bug_when>2024-03-11 18:35:45 +0000</bug_when>
    <thetext>Thanks for your bug report! I can confirm this.

I&apos;ll have a look at this, if Johannes is not faster than me ;-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2299211</commentid>
    <comment_count>2</comment_count>
    <who name="Tobias Leupold">tl</who>
    <bug_when>2024-03-11 20:25:49 +0000</bug_when>
    <thetext>Git commit 59f2cb63ac191040e6e7e0a20d5afe01396e5c82 by Tobias Leupold.
Committed on 11/03/2024 at 20:24.
Pushed by tleupold into branch &apos;master&apos;.

Don&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2299212</commentid>
    <comment_count>3</comment_count>
    <who name="Tobias Leupold">tl</who>
    <bug_when>2024-03-11 20:26:39 +0000</bug_when>
    <thetext>This was a nasty one ;-) Please check if this fixes it, and re-open if not!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2299293</commentid>
    <comment_count>4</comment_count>
    <who name="Randall Rude">rsquared42</who>
    <bug_when>2024-03-11 21:59:32 +0000</bug_when>
    <thetext>Wow, that was fast.  And it seems to be fixed.  Good work!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>