Bug 134391 - Digikam camera gui dialog crashes if there is a filename without extension
Summary: Digikam camera gui dialog crashes if there is a filename without extension
Status: RESOLVED WORKSFORME
Alias: None
Product: digikam
Classification: Applications
Component: Import-Gphoto2 (show other bugs)
Version: 0.9.0
Platform: Compiled Sources Linux
: VHI crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-20 14:10 UTC by Josep Febrer
Modified: 2017-08-16 06:13 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 0.9.0
Sentry Crash Report:


Attachments
camera gui with a file without ext. (269.36 KB, image/png)
2006-11-27 21:00 UTC, caulier.gilles
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Josep Febrer 2006-09-20 14:10:49 UTC
Version:           0.9.0-beta2 (using KDE KDE 3.5.4)
Installed from:    Compiled From Sources
Compiler:          gcc version 4.1.2 20060901 (prerelease) (Debian 4.1.1-13) 
OS:                Linux

With digiKam 0.9.0-beta2 and also with today's svn (20060920) it crashes with the camera gui dialog when it's scanning a volume and finds a filename without an extension.
Digikam 0.9.0-beta1 didn't crashed.
I can confirm this issue because if I rename this file and add a filename extension digiKam doesn't crash.
Also I can reproduce it running digikam with this commandline on a terminal:

/usr/share/apps/digikam/utils/digikam-camera storage /dev/sdc1

Which gives me this output:

2727: arguments to dbus_message_new_method_call() were incorrect, assertion "_dbus_check_is_valid_path (path)" failed in file dbus-message.c line 797.
This is normally a bug in some application using the D-Bus library.
libhal.c 1058 : Couldn't allocate D-BUS message
2727: arguments to dbus_message_new_method_call() were incorrect, assertion "_dbus_check_is_valid_path (path)" failed in file dbus-message.c line 797.
This is normally a bug in some application using the D-Bus library.
libhal.c 1058 : Couldn't allocate D-BUS message
Error: l'UDI donat no és un volum montable
starting digikam with --download-from /dev/sdc1
/media/sdc1/INFO has no thumbnail.
Cannot decode /media/sdc1/INFO
digikam: Fatal IO error: client killed
KCrash: Application 'digikam' crashing...


Later If I rename /media/sdc1/INFO to /media/sdc1/INFO.txt digikam doesn't crash, also I reproduced this crash with other filenames without extensions.

This is the backtrace that I get:

(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1240512832 (LWP 6940)]
[New Thread -1252381776 (LWP 6972)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
0xffffe410 in __kernel_vsyscall ()
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb65167fb in __read_nocancel () from /lib/tls/i686/cmov/libpthread.so.0
#2  0xb6473d8e in _X11TransGetMyAddr () from /usr/lib/libX11.so.6
#3  0xb647387f in _X11TransRead () from /usr/lib/libX11.so.6
#4  0xb6478869 in _XRead () from /usr/lib/libX11.so.6
#5  0xb6479315 in _XReply () from /usr/lib/libX11.so.6
#6  0xb64706c8 in XSync () from /usr/lib/libX11.so.6
#7  0xb690358a in QPixmap::convertFromImage () from /usr/lib/libqt-mt.so.3
#8  0xb69ceb78 in QPixmap::convertFromImage () from /usr/lib/libqt-mt.so.3
#9  0xb69ced45 in QPixmap::QPixmap () from /usr/lib/libqt-mt.so.3
#10 0xb7e63f60 in Digikam::CameraIconViewItem::calcRect ()
   from /usr/lib/libdigikam.so.0
#11 0xb7e6486b in Digikam::CameraIconViewItem::paintItem ()
   from /usr/lib/libdigikam.so.0
#12 0xb7d0164a in Digikam::IconView::viewportPaintEvent ()
   from /usr/lib/libdigikam.so.0
#13 0xb6aebcba in QScrollView::eventFilter () from /usr/lib/libqt-mt.so.3
#14 0xb69b7204 in QObject::activate_filters () from /usr/lib/libqt-mt.so.3
#15 0xb69b7282 in QObject::event () from /usr/lib/libqt-mt.so.3
#16 0xb69ee420 in QWidget::event () from /usr/lib/libqt-mt.so.3
#17 0xb6950086 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#18 0xb6952843 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#19 0xb70e07ee in KApplication::notify () from /usr/lib/libkdecore.so.4
#20 0xb68e3081 in QApplication::sendEvent () from /usr/lib/libqt-mt.so.3
#21 0xb691c905 in QWidget::repaint () from /usr/lib/libqt-mt.so.3
#22 0xb6950fed in QApplication::sendPostedEvents ()
   from /usr/lib/libqt-mt.so.3
#23 0xb695110c in QApplication::sendPostedEvents ()
   from /usr/lib/libqt-mt.so.3
#24 0xb68f6995 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#25 0xb696a269 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#26 0xb696a0ba in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#27 0xb6951a49 in QApplication::exec () from /usr/lib/libqt-mt.so.3
#28 0x0804a5d8 in main ()
Comment 1 Josep Febrer 2006-11-27 20:02:30 UTC
I can confirm that this bug is still present on digikam 0.9-rc1.
I also patched digikam 0.9-rc1 with this patch:

http://commit-digest.org/issues/2006-11-26/moreinfo/606923/

And it's still crashing.

Also this bug can be reproduced this way, rename an image and quit it's extension like from image.jpg to image ,this is the output from the console when Digikam crashes:

/media/SD-1G/image has no thumbnail.
Cannot decode /media/SD-1G/image

If later I rename image to image.jpg Digikam doesn't crash and it works great.
Comment 2 caulier.gilles 2006-11-27 20:31:11 UTC
This patch is not in relation with camera gui.

Gilles Caulier
Comment 3 caulier.gilles 2006-11-27 20:31:40 UTC
This file must be fixed for 0.9.0 final release.

Gilles
Comment 4 caulier.gilles 2006-11-27 21:00:24 UTC
Created attachment 18708 [details]
camera gui with a file without ext.

Josep,

digikam 0.9.0-RC1 doesn't crash using UMS camera. Look screenshot attached

Witch camera driver you use ?

Gilles
Comment 5 caulier.gilles 2006-11-28 07:33:07 UTC
Also, your crash backtrace is not relevant of digiKam directly but from certainly HAL/hotplug interface. Please check this part.

Gilles Caulier
Comment 6 Josep Febrer 2006-11-28 18:23:53 UTC
My camera is a Canon Powershot S2 IS and before I used the PTP mode, but after some minutes of usage Digikam always lost it's connection, and I think it wasn't a Digikam fault, because it happened the same with the camera:/ kioslave and other program (which I don't remember it's name) that also used gphoto, so I think that my problem with the PTP mode was an issue with gphoto or something else not related to Digikam.
So, since them I extracted the SD card from the camera and connected to a card reader and when the KDE popup dialog appeared I selected the option "digiKam Mount and Download" and Digikam worked great. Also with Digikam I selected the SD card in the menu "Camera - Media Browse", which also worked great.
However, since Digikam 0.9beta2 I noticed that Digikam crashed if in the SD card there was a filename without an extension.
I noticed this because I formated the SD card in the camera and it seems that it created a filename without extension, called INFO or similar.

Also I will try to import photos with Digikam using the PTP mode to see if it crashed with this mode.

If you can't reproduce this problem, I can compile digikam with debug mode if that helps.

Thanks.
Comment 7 Josep Febrer 2006-11-29 18:40:10 UTC
Hi,

I tried to connect the digital camera to the computer and import the photos with Digikam using the PTP mode. In this way, Digikam camera gui dialog doesn't show the image which their filename doesn't have an extension.
But this isn't a Digikam bug's because the camera:/ kioslave does the same, so I think that it's a bug or a feature from gphoto.

So to my case, it's seems that this bug is related to connecting a flash card to a card reader.

I'm using Debian sid and to my knwoledge it seems that I haven't any problem related to HAL/DBUS/Hotplug, the errors or warning messages that appear on the log it's seems to be due to a more recent version of Dbus that it's more verbose.

I also will try if I can reproduce this bug with another distribution like SUSE 10.1.

Thanks.
Comment 8 Josep Febrer 2006-11-30 14:03:42 UTC
Hi,

I just recompiled digikam 0.9-rc1 with --enable-debug=full and I think that I know why Digikam crashes.
It seems that when Digikam finds a filename without extension thinks that it is a RAW image and try to run digikamdcraw and it crashes.

So, I inserted the SD card from the digital camera to the card reader and on a console I run this commands:

pmount-hal /dev/sdc1 (which mounts the card on /media/SD-1G)
/usr/share/apps/digikam/utils/digikam-camera storage /media/SD-1G

And this is the output that it shows on the console:

digikam: /media/SD-1G//IMG_1340.JPG : JPEG file identified
digikam: Cannot load metadata using Exiv2 (/media/SD-1G//IMG_1340: The file contains data of an unknown image type)
digikam: Running dcraw command dcraw -c -e '/media/SD-1G//IMG_1340'
/media/SD-1G//IMG_1340 has no thumbnail.
digikam: Running dcraw command dcraw -c -h -w -a '/media/SD-1G//IMG_1340'
Cannot decode /media/SD-1G//IMG_1340
digikam: /media/SD-1G//IMG_1340 : RAW file identified
digikam: Cannot load metadata using Exiv2 (/media/SD-1G//IMG_1340: The file contains data of an unknown image type)
KCrash: Application 'digikam' crashing...
digikam: Running dcraw command (digikamdcraw,-c,-w,-a,-H,0,-b,1,-q,0,-o,1,/media/SD-1G//IMG_1340)
QSocketNotifier: Multiple socket notifiers for same socket 4 and type read
Temporitzador


IMG_1340.JPG and IMG_1340 are the same which I copied on the root folder from the SD card and just deleted the filename extension on IMG_1340.
If I run the command:

file /media/SD-1G/IMG_1340*

/media/SD-1G/IMG_1340.JPG: JPEG image data, EXIF standard 2.2
/media/SD-1G/IMG_1340: JPEG image data, EXIF standard 2.2


Thanks.
Comment 9 caulier.gilles 2006-11-30 14:26:08 UTC
Ok, i understand better now. We have 2 important lines in console :

digikam: Cannot load metadata using Exiv2 (/media/SD-1G//IMG_1340: The file contains data of an unknown image type)

==> Why ? 

Witch Exiv2 release you use. Are you an old one ? We need to use 0.12 release with digiKam now. Look my blog : http://www.digikam.org/?q=node/193

digikam: Running dcraw command dcraw -c -e '/media/SD-1G//IMG_1340'

==> This is normal than dcraw crash during jpeg file parsing. This program do not support it and its annoted on dcraw web project page. I have fixed this point in current implementation from svn. Now all files with an empty filename extension are not parsed by dcraw.

So, i recommend to do an ultimate test with using svn implementation. Look here how to download svn source code (UNSTABLE) :

http://www.digikam.org/?q=node/19

Thanks in advance

Gilles Caulier
Comment 10 Josep Febrer 2006-11-30 17:46:51 UTC
I was using Exiv2 0.12 already.

I build Digikam from svn trunk from today, and now Digikam does not crashes anymore.

So I will close this bug now.

Also in the meantime it was compiling Digikam from trunk I remembered that some time ago I installed kde-rawimage to be able to view thumbnails of raw images on Konqueror filebrowser, and my fear was that kde-rawimage was really the culprit, but it seems to be not.

Kde-rawimage: http://www.kde-apps.org/content/show.php?content=30971

Thanks.