Bug 147347

Summary: showfoto crashes when opening twice multiple files
Product: [Applications] digikam Reporter: Fabien <fabien.ubuntu>
Component: Showfoto-LoadAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: caulier.gilles
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 0.9.3

Description Fabien 2007-06-29 10:27:02 UTC
Version:           0.9.2 (using KDE KDE 3.5.4)
Installed from:    Ubuntu Packages
OS:                Linux

This bug was reported on linuxfr.
I was able to reproduce it using showfoto that comes with digikam 0.9.1 and 0.9.2

Try the following :

1) Start showfoto with no argument
2) File/Open and select at least 2 files
3) Ok => you get your pictures
4) Go again in File/Open
5) Select one file and press Ok

=> showfoto will crash
Comment 1 caulier.gilles 2007-06-29 10:28:43 UTC
Fabien,

A little backtrace please ?

Gilles
Comment 2 caulier.gilles 2007-06-29 10:44:35 UTC
SVN commit 681520 by cgilles:

digiKam from KDE3 branch : fix showfoto crash if File/Open action is invoqued multiple time. 
The current item instance is not reseted between file open session and become invalid.
if "prompt user save" test is performed with it and thumbbar have been cleared, showfoto going to space...
BUG: 147347


 M  +2 -1      showfoto.cpp  


--- branches/extragear/kde3/graphics/digikam/showfoto/showfoto.cpp #681519:681520
@@ -3,7 +3,7 @@
  * This file is a part of digiKam project
  * http://www.digikam.org
  *
- * Date   : 2004-11-22
+ * Date        : 2004-11-22
  * Description : stand alone digiKam image editor GUI
  *
  * Copyright (C) 2004-2005 by Renchi Raju <renchi@pooh.tam.uiuc.edu>
@@ -594,6 +594,7 @@
 
     if (!urls.isEmpty())
     {
+        d->currentItem = 0;
         d->thumbBar->clear();
 
         for (KURL::List::const_iterator it = urls.begin();
Comment 3 Fabien 2007-06-29 14:09:42 UTC
You're so fast :)

Thanks.
Comment 4 caulier.gilles 2007-06-29 14:18:58 UTC
Fabien,

I'm fast because i'm working on currently:

http://digikam3rdparty.free.fr/Screenshots/showfotoKDE4_02.png

It still very experimental of course...

Gilles