Bug 144895 - digikam crashes when dowloading from Kodak CX7300 camera
Summary: digikam crashes when dowloading from Kodak CX7300 camera
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Import-Gphoto2 (show other bugs)
Version: 0.9.1
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-30 21:51 UTC by Sergio
Modified: 2017-08-16 06:00 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergio 2007-04-30 21:51:44 UTC
Version:           0.9.1 (using KDE KDE 3.5.6)
Installed from:    SuSE RPMs
OS:                Linux

digiKam is crashing when trying to retrieve photos from my Kodak CX7300
camera. The weird thing is that it had always worked before (last time I
retrieved pictures from that camera was on March 12th this year).

I think that the problem might have come after I upgraded some packets in my
system (SuSE 10.0). Here's the packages' version I have now:
digikam 0.9.1-20.1
digikamimageplugins 0.9.1-14.3
libexiv2 0.14-2.1
libkexiv2 0.1.2-3.1
libgphoto2 2.20-1

This is the output I get in the console when digikam crashes while trying to
retrieve the photos:
terminate called after throwing an instance of 'Exiv2::Error'
  what():  /store_00010001/DCIM/100K7300/100_1368.JPG: Failed to open the
data source: No such file or directory (2)
KCrash: Application 'digikam' crashing...

I am able to get the picture(s) using konqueror, from that very same
location (/store_00010001/DCIM/100K7300/100_1368.JPG). So the picture is
present.

And finally, this is the trace for the crash:
Using host libthread_db library "/lib/tls/libthread_db.so.1".
`system-supplied DSO at 0xffffe000' has disappeared; keeping its symbols.
[Thread debugging using libthread_db enabled]
[New Thread 1110130880 (LWP 20378)]
[KCrash handler]
#6  0xffffe410 in __kernel_vsyscall ()
#7  0x41464541 in raise () from /lib/tls/libc.so.6
#8  0x41465dbb in abort () from /lib/tls/libc.so.6
#9  0x41412d41 in __gnu_cxx::__verbose_terminate_handler ()
   from /usr/lib/libstdc++.so.6
#10 0x41410655 in __gxx_personality_v0 () from /usr/lib/libstdc++.so.6
#11 0x41410692 in std::terminate () from /usr/lib/libstdc++.so.6
#12 0x414107fa in __cxa_throw () from /usr/lib/libstdc++.so.6
#13 0x41c6df1d in Exiv2::ImageFactory::open () from /usr/lib/libexiv2.so.0
#14 0x41c6e21f in Exiv2::ImageFactory::open () from /usr/lib/libexiv2.so.0
#15 0x4034f390 in KExiv2Iface::KExiv2::load ()
   from /opt/kde3/lib/libkexiv2.so.0
#16 0x40276dfc in Digikam::DMetadata::load ()
   from /opt/kde3/lib/libdigikam.so.0
#17 0x40276e7c in Digikam::DMetadata::DMetadata ()
   from /opt/kde3/lib/libdigikam.so.0
#18 0x40257c44 in Digikam::ImagePropertiesSideBarCamGui::itemChanged ()
   from /opt/kde3/lib/libdigikam.so.0
#19 0x40230168 in Digikam::CameraUI::slotItemsSelected ()
   from /opt/kde3/lib/libdigikam.so.0
#20 0x40232a98 in Digikam::CameraUI::qt_invoke ()
   from /opt/kde3/lib/libdigikam.so.0
#21 0x40e43479 in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#22 0x402333d0 in Digikam::CameraIconView::signalSelected ()
   from /opt/kde3/lib/libdigikam.so.0
#23 0x40233470 in Digikam::CameraIconView::slotSelectionChanged ()
   from /opt/kde3/lib/libdigikam.so.0
#24 0x40236010 in Digikam::CameraIconView::qt_invoke ()
   from /opt/kde3/lib/libdigikam.so.0
#25 0x40e43479 in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#26 0x40e43930 in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#27 0x40129029 in Digikam::IconView::signalSelectionChanged ()
   from /opt/kde3/lib/libdigikam.so.0
#28 0x401297a3 in Digikam::IconView::selectItem ()
   from /opt/kde3/lib/libdigikam.so.0
#29 0x4012f232 in Digikam::IconItem::setSelected ()
   from /opt/kde3/lib/libdigikam.so.0
#30 0x4012c129 in Digikam::IconView::slotRearrange ()
   from /opt/kde3/lib/libdigikam.so.0
#31 0x4012c24c in Digikam::IconView::qt_invoke ()
   from /opt/kde3/lib/libdigikam.so.0
#32 0x40235fe3 in Digikam::CameraIconView::qt_invoke ()
   from /opt/kde3/lib/libdigikam.so.0
#33 0x40e43479 in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#34 0x40e43930 in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#35 0x411948a9 in QTimer::timeout () from /usr/lib/qt3/lib/libqt-mt.so.3
#36 0x40e67c8f in QTimer::event () from /usr/lib/qt3/lib/libqt-mt.so.3
#37 0x40de21d1 in QApplication::internalNotify ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#38 0x40de2b59 in QApplication::notify ()
from /usr/lib/qt3/lib/libqt-mt.so.3
#39 0x40b17fae in KApplication::notify () from /opt/kde3/lib/libkdecore.so.4
#40 0x40dd6ce5 in QEventLoop::activateTimers ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#41 0x40d8ec0e in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#42 0x40df9222 in QEventLoop::enterLoop ()
from /usr/lib/qt3/lib/libqt-mt.so.3
#43 0x40df9106 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#44 0x40de1b1f in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#45 0x0804a8a9 in main ()

If you need more info, please tell me.
Comment 1 caulier.gilles 2007-05-02 08:15:26 UTC
This message is important:

terminate called after throwing an instance of 'Exiv2::Error'
  what():  /store_00010001/DCIM/100K7300/100_1368.JPG: Failed to open the
data source: No such file or directory (2) 

This can be a problem with gphoto2 witch do not give acess right to read this file with digiKam. There is no reason to have a crash like this.

I have patched in svn the libkexiv2 implementation to test if the current file can be loaded by Exiv2 to prevent a crash in digiKam.

If your camera support Usb Mass Storage protocol, use the digiKam UMS interface instead the gphoto2 stuff. Look in camera config dialog for details.

Gilles Caulier

Comment 2 Marcus Meissner 2007-05-02 08:41:06 UTC
the /store_00010001/ is a virtual path on the camera.

perhaps the exiv2 handling should retrieve the data from the camera.

(you can get EXIF data seperately via gphoto)
Comment 3 caulier.gilles 2007-05-02 08:42:45 UTC
SVN commit 660276 by cgilles:

libkexiv2 from trunk : test if file is readable before to load it in Exiv2.
CCBUGS: 144895


 M  +12 -8     kexiv2.cpp  
 M  +2 -2      kexiv2.h  


--- trunk/extragear/libs/libkexiv2/kexiv2.cpp #660275:660276
@@ -1,6 +1,6 @@
 /* ============================================================
- * Authors: Gilles Caulier <caulier dot gilles at gmail dot com>
- *          Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
+ * Authors: Gilles Caulier 
+ *          Marcel Wiesweg 
  * Date   : 2006-09-15
  * Description : Exiv2 library interface for KDE
  *
@@ -344,13 +344,15 @@
 
 bool KExiv2::load(const QString& filePath)
 {
+    QFileInfo finfo(filePath);
+    if (filePath.isEmpty() || !finfo.isReadable())
+    {
+        qDebug("File '%s' is not readable.", finfo.fileName().ascii());
+        return false;
+    }
+
     try
-    {   
-        d->filePath = filePath;
- 
-        if (filePath.isEmpty())
-            return false;
-
+    {
         Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open((const char*)
                                       (QFile::encodeName(filePath)));
         image->readMetadata();
@@ -367,6 +369,8 @@
         
         d->iptcMetadata = image->iptcData();
 
+        d->filePath = filePath;
+
         return true;
     }
     catch( Exiv2::Error &e )
--- trunk/extragear/libs/libkexiv2/kexiv2.h #660275:660276
@@ -1,6 +1,6 @@
 /* ============================================================
- * Authors: Gilles Caulier <caulier dot gilles at gmail dot com>
- *          Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
+ * Authors: Gilles Caulier 
+ *          Marcel Wiesweg 
  * Date   : 2006-09-15
  * Description : Exiv2 library interface for KDE
  *
Comment 4 caulier.gilles 2007-05-02 08:49:44 UTC
To Marcus, #2.

I suspect than Sergio use the gphoto-hotplug feature witch autommount the camera in UMS mode somewhere in the file system.

Something is wrong somewhere when the path to the camera is pass to digiKam. There is only the relative camera path given to digiKam, not the full path. This is why the file cannot be loaded in Exiv2.

In digiKam, using UMS mode, we use Exiv2 instead gphoto2-exif interface because its more powerfull (exif, makernote, raw files support, GPS, etc.)

Gilles
Comment 5 Sergio 2007-05-09 12:12:17 UTC
Gilles,

Unfortunately that is not the case. The camera does not seem to be mounted
anywhere in the filesystem. As a matter of fact, I doubt it supports UMS at
all. At least, never did for me. OK, maybe I am wrong here.
The way I can acces my pictures now that digikam is not able any more, is
thru konqueror using the camera:/ protocol (no idea what that does in
reality :-).

For example, my camera is branched now and when I type "camera:/" in
konqueror the following path is available:
"camera://Kodak CX7300@[usb:1,5]/store_00010001/DCIM/100K7300" (my photos
are in this directory).

The only thing that seems to be appering in /dev dir is "/dev/usb/1/5"
(which in fact is my camera attached to the usb port). I noted that that
corresponds quite well with "[usb:1,5]" in konqueror's path. There is
nothing related ti the camera in /mnt or in /media.

As I pointed out in the bug report, the strange thing is that it worked fine
before (same camera, same version of SuSE, ok... with some packages
updated). The day I installed SuSE 10.0 digikam was one of the things that
worked straightforward.

I read in one of your other posts that you were talking about hotplug. I
know that my system is using udev for hotplugging and that the usb devices
are created with owner root and group usb. Permisson are set rw for both
owner and group. And my every-day-usage user is part of the usb group. As a
matter of fact I doubt it is a permission problem because I tried to run
digikam as root (thru kdesu) and I get the same error (same stack trace and
same message in the console).

Thanks for taking care of my problem. If you need more info, please let me
know.

Kind regards. Sergio
Comment 6 Arnd Baecker 2007-06-28 14:23:01 UTC
Hi Sergio,

not sure if the following will be of help in finding the origin of the problem,
but let's see:
1.) what is the output of `dmesg` after plugging in the camera
    (do dmesg before and after to see the difference)
2.) What do you get for
    gphoto2 --auto-detect -P -n --debug --debug-logfile gphoto2.lst 
3.) What do you get for
    gphoto2 --auto-detect -L -n --debug --debug-logfile gphoto22.lst 
4.) Maybe in addition:
    gphoto2 --auto-detect -l -n

Could you attach the files gphoto2.lst and gphoto22.lst here?

Thanks in advance, Arnd
Comment 7 caulier.gilles 2007-08-22 09:50:52 UTC
Arnd,

This file is relevant of other Kodak problem reported to #147071 ?

Gilles
Comment 8 Arnd Baecker 2007-11-05 10:23:44 UTC
Hi Sergio,

do you have any update on this issue?
Without further input we are not able to solve the problem ...

Many thanks, Arnd
Comment 9 Arnd Baecker 2007-11-13 13:03:42 UTC
OK, without further input nothing can be done here.
In view of the presumably related one
http://bugs.kde.org/show_bug.cgi?id=147071
(which is solved now) I am marking this bug as fixed.

Don't hesitate to re-open if you have new information.

Thanks a lot for your understanding,

Arnd