Bug 159523 - digikam crashes while downloading images from Olympus mju 810/Stylus 810 camera no xD card
Summary: digikam crashes while downloading images from Olympus mju 810/Stylus 810 came...
Status: RESOLVED WORKSFORME
Alias: None
Product: digikam
Classification: Applications
Component: Import-UMS (show other bugs)
Version: 0.9.3
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-18 15:09 UTC by R (Chandra) Chandrasekhar
Modified: 2017-08-16 05:30 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 0.9.5


Attachments
Log file (backtrace?) of crash (4.71 KB, text/plain)
2008-03-18 15:12 UTC, R (Chandra) Chandrasekhar
Details
Backtrace file with digikam and digikam-dbg installed from repository http://www.mpe.mpg.de/~ach/kubuntu/gutsy/ (710 bytes, text/plain)
2008-03-19 06:40 UTC, R (Chandra) Chandrasekhar
Details
gdb-digikam-backtrace log (6.06 KB, text/plain)
2008-03-19 09:26 UTC, R (Chandra) Chandrasekhar
Details
gzipped valgrind-digikam log (244.11 KB, application/gzip)
2008-03-19 09:32 UTC, R (Chandra) Chandrasekhar
Details
gdb digikam log after updating libgphoto2-2 and libexif12 but with no crash (8.68 KB, text/plain)
2008-03-19 13:56 UTC, R (Chandra) Chandrasekhar
Details
Image of the two icons for one camera on Desktop with tooltip displayed for top icon (13.22 KB, image/jpeg)
2008-03-19 14:14 UTC, R (Chandra) Chandrasekhar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description R (Chandra) Chandrasekhar 2008-03-18 15:09:56 UTC
Version:            (using KDE 3.5.8)
Installed from:    Ubuntu Packages
OS:                Linux

To get my Olympus mju 810/Stylus 810 to successfully connect to the PC as a USB mass storage device, I had to comment out lines beginning with

ATTRS{idVendor}=="07b4", ATTRS{idProduct}=="0109"

in /etc/udev/rules.d/45-libgphoto2.rules

as advised in the gphoto-users mailing list at

http://tinyurl.com/2lqda7

After that, I was able to see and use my camera as a USB mass storage device. But there were two camera icons: one for a camera interface and another for the USB mass storage device. I tried both icons, both with and without an xD card memory. This is what happened:

1. I get two icons for the camera, regardless of whether or not I use xD card memory. The icon tooltips reveal the following for the pair of icons:

A. Camera with no card but only internal memory
===============================================
Name: USB Mass Storage Interface
Type: Camera
Base URL: camera://Olympus%20X-450@[usb:003,005]/

Name: 30M Removable Media
Type: Mounted Camera
Base URL: file:///media/disk
Device Node: /dev/sdc1

B. Camera with xD card memory
=============================
Name: USB Mass Storage Interface
Type: Camera
Base URL: camera://Olympus%20X-450@[usb:003,008]/

Name: 1.0G Removable Media
Type: Mounted Camera
Base URL: file:///media/disk
Device Node: /dev/sdc1

The second icon of each pair shows up like a conventional USB drive in that it has a mount point (automatically selected by udev.rules?) at /media/disk. When mounted, it has a green arrow at the bottom right corner, and must be safely removed.

The first icon of each pair is identified as a camera but it crashes digikam when used with internal memory (see below).

2. With the 30 MB internal memory, if I click on the first icon, digikam downloads images from internal memory but crashes at 30% of download. However, if I click on the second icon, it downloads successfully all the way.

3. With the 1 GB xD card memory, digikam downloads successfully from both icons.

On all occasions, the USB mass storage camera is being autodetected by digikam.

I can furnish screenshots of the two icons and their tooltips if necessary. Do let me know please.
Comment 1 R (Chandra) Chandrasekhar 2008-03-18 15:12:18 UTC
Created attachment 23950 [details]
Log file (backtrace?) of crash
Comment 2 caulier.gilles 2008-03-18 15:17:21 UTC
There is no debug symbol in your backtrace. It's not suitable to hack...

Please compile digiKam and libgphoto2 using full debug symbol options...

Gilles Caulier
Comment 3 R (Chandra) Chandrasekhar 2008-03-18 15:37:30 UTC
Gilles Caulier wrote:

> ------- Additional Comments From caulier.gilles gmail com  2008-03-18 15:17 -------
> There is no debug symbol in your backtrace. It's not suitable to hack...
> 
> Please compile digiKam and libgphoto2 using full debug symbol options...
> 
> Gilles Caulier


I am using the Ubuntu packages:

digikam_0.9.2-2ubuntu2_i386.deb as an already-built package from the Ubuntu repos

gphoto2_2.4.0-1~7.10prevu1_i386.deb from Ubuntu source repos and built on my machine

I am afraid my current experience rests with building debs from source packages; 
nothing more fancy than that. If there debs with the debug options compiled in, 
I am happy to try them out if pointed to them.

Thanks.

Chandra
Comment 4 caulier.gilles 2008-03-18 15:42:11 UTC
Achim, can you point R.Chandrasekhar on the right way under Debian ?

Gilles Caulier
Comment 5 Arnd Baecker 2008-03-18 16:27:59 UTC
A pointer to packages for kubuntu can be found at
http://www.digikam.org/?q=download/binary/
In particular
  http://www.mpe.mpg.de/~ach/kubuntu/gutsy/
which also has the corresponding packages ( digikam-dbg etc.) 
with debugging symbols for 0.9.3.
Comment 6 R (Chandra) Chandrasekhar 2008-03-19 06:37:58 UTC
Thank you for the pointers. I have installed digikam, digikam-dbg, and dependencies from this repository. The packages are:
 
digikam_0.9.3-1build2~ach0gutsy2_i386.deb

and 

digikam-dbg_0.9.3-1build2~ach0gutsy2_i386.deb.

The backtrace file is attached separately. I got it simply by trying to download the images from the camera using the new digikam package and saving the backtrace file when it crashed. If you need me to run gdb and digikam together, please let me know what to do.

Thanks.
Comment 7 R (Chandra) Chandrasekhar 2008-03-19 06:40:11 UTC
Created attachment 23958 [details]
Backtrace file with digikam and digikam-dbg installed from repository http://www.mpe.mpg.de/~ach/kubuntu/gutsy/
Comment 8 caulier.gilles 2008-03-19 07:44:49 UTC
There is nothing to see in GDB backtrace... Are you running digiKam under gdb as explained in here :

http://websvn.kde.org/branches/extragear/kde3/graphics/digikam/HACKING?revision=670778&view=markup

Try to use valgrind program to get more info about memory leak. Sometimes, valgrind backtrace are more instructive. All is explained at the same place...

Gilles Caulier
Comment 9 R (Chandra) Chandrasekhar 2008-03-19 09:26:16 UTC
Created attachment 23961 [details]
gdb-digikam-backtrace log

Cut and paste of onscreen messages from:

gdb digikam
run
bt
quit
Comment 10 caulier.gilles 2008-03-19 09:31:22 UTC
Now it's more interresing... 

Look like the crash appears in "libexif" !

Only libgphoto2 use libexif. digiKam do not use libexif but Exiv2 library since a long time.

I recommend to update libexif/libgphoto2 if you can and try again...

Gilles Caulier
Comment 11 R (Chandra) Chandrasekhar 2008-03-19 09:32:31 UTC
Created attachment 23962 [details]
gzipped valgrind-digikam log

Result of

valgrind --tool=memcheck --leak-check=full --error-limit=no
--show-reachable=yes
-v digikam 2> valgrind-digikam.log

using the USB camera interface until the crash happens at 30% of download.
Comment 12 caulier.gilles 2008-03-19 09:45:44 UTC
 Chandrasekhar,

I have never seen a valgrind backtrace like this. all Qt/KDE are corrupted every where...

Something is wrong in your system. Are you using 64 bits system (as AMD stuff) ?

Achim, what do you think about ?

Marcus, look in valgrind backtrace, there are few lines interresing about libgphoto2

Gilles Caulier
Comment 13 R (Chandra) Chandrasekhar 2008-03-19 10:26:49 UTC
Gilles Caulier wrote:

> I have never seen a valgrind backtrace like this. all Qt/KDE are corrupted
> every where...


This is the first time I have used valgrind. I followed the instructions at the 
website and also added the -v and --show-reachable=yes options.

> Something is wrong in your system. Are you using 64 bits system (as AMD
> stuff) ?


No, I am on an i686 system running a 2.6.22-14-generic kernel in Kubuntu Gutsy.

The administrator button in kcontrol is not working off and on my system. I have 
filed a bug report at launchpad at:

https://bugs.launchpad.net/bugs/175909

I have also filed a KDE bug report about the "Report Bug..." dialogue not 
working at:

http://bugs.kde.org/show_bug.cgi?id=159521

I think my system is corrupted in a non-digital fashion and giving me several 
problems as a result, but most things are working and the system is usable.

I am grateful if the cause can be found.

Chandra
Comment 14 Marcus Meissner 2008-03-19 11:42:04 UTC
- the gp_load_abilities_list are all going down to libltdl and dlopen, its not a libgphoto2 problem

- the libexif ones are interesting and is cazused by libgphoto2.

File 'p3140001.jpg' is not readable.
==7901== Warning: silly arg (-528230372) to realloc()
==7901== Warning: silly arg (-528229634) to realloc()

I guess I dont handle "not readable files" not well enough. Wonder why it is not readable though.
Comment 15 R (Chandra) Chandrasekhar 2008-03-19 13:47:31 UTC
Gilles Caulier wrote:

> I recommend to update libexif/libgphoto2 if you can and try again...


I have now built from new sources and installed the following packages:

libgphoto2-2_2.4.0-8ubuntu5~7.10prevu1_i386.deb
libexif12_0.6.16-2.1~7.10prevu1_i386.deb

After that, I ran  digikam in gdb but this time there was no crash. When I tried 
connecting to the USB camera interface, using the Mass Storage Camera, I got 
this error message:

"Failed to connect to camera. Please make sure it is connected properly and
turned on. Would you like to try again?"

Repeated tries gave no change: same error again. This is worse than before 
because there is no connection and no downloading up to 30%.

Note that in /etc/udev/rules.d/ there is no 45-libgphoto2.rules file. So the 
previous workaround is void for the new new libgphoto2-2 that I have installed.

Moreover, using the Olympus C-370Z as camera gives the same error message.

Note that the second, mass storage icon works OK as before. So, it seems to me, 
  as a user, that removing the cause of the second icon is the route to the 
solution of this problem.

I will upload the gdb debug log separately.

Chandra
Comment 16 R (Chandra) Chandrasekhar 2008-03-19 13:56:18 UTC
Created attachment 23964 [details]
gdb digikam log after updating libgphoto2-2 and libexif12 but with no crash

This log is after updating the two libraries using these packages:

libgphoto2-2_2.4.0-8ubuntu5~7.10prevu1_i386.deb
libexif12_0.6.16-2.1~7.10prevu1_i386.deb

There was no crash but an error message:

Failed to connect to camera. Please make sure it is connected properly and
turned on. Would you like to try again?

Trying to auto-detect camera led to this error message:

Failed to auto-detect camera.
Please check if your camera is turned on and retry or try setting it manually.

In a way, this is worse than before!
Comment 17 caulier.gilles 2008-03-19 14:03:24 UTC
Chandrasekhar,

From a developer viewpoint, it's better than before since crash diseapear (:=))). Now investiguations will be more simple.

Marcus, look the console trace. some libgphoto components cannot be loaded...

Gilles Caulier
Comment 18 R (Chandra) Chandrasekhar 2008-03-19 14:14:10 UTC
Created attachment 23965 [details]
Image of the two icons for one camera on Desktop with tooltip displayed for top icon

Initially, the crash occurred when digikam was launched from the top icon and
Mass Storage Camera was selected for download.

After updating libexif12 and libgphoto2-2, digikam failed to auto-detect or
connect to camera. So there was no crash but no functionality either.

The bottom icon behaves as a mass storage medium and images can be downloaded
from it. The trouble is that there are two icons in the first place. If there
were only the latter icon, there would be no trouble. Incidentally, when
launched from this bottom icon, digikam does not detect a camera but instead
has "Browse media:/ sdc1" in place of a camera model.

Thanks.
Comment 19 Arnd Baecker 2008-04-24 11:30:34 UTC
Chandrasekhar, 

do you have any update on this bug?

Unfortunately I have no idea about the cause of your problems...
All sounds more a problem in the direction of gphoto than digikam.
Could you try the following:

a) connect camera, what is the output of dmesg
   (only the camera related part)
b) gphoto2 -v
c) gphoto2 --list ports
d) gphoto2 --auto-detect -L
e) gphoto2 --abilities
f) gphoto2 --list-folders
and post the output here.

Marcus, any other ideas?

Best, Arnd
Comment 20 R (Chandra) Chandrasekhar 2008-07-14 08:06:56 UTC
Sorry Arnd, I did not get to see your email earlier.

On Kubuntu 8.04

dpkg -l digikam *photo2* | grep ii

gives

ii  digikam 2:0.9.3-2ubuntu1
ii  gphoto2 2.4.0-1
ii  libgphoto2-2 2.4.1-1~8.04prevu1
ii  libgphoto2-port0 2.4.1-1~8.04prevu1

The problem does not arise any more with this setup. I believe that it was solved after the installation of the new libgphoto2-2 that I downloaded and copiled from source .deb today 14 Jul 08.

The bug may be closed as far as I am concerned.

Thank you.
Comment 21 Andi Clemens 2008-08-16 11:39:41 UTC
Ok so I'm closing this one now? The problem seems to have disappeared.

R (Chandra) Chandrasekhar,
is this ok for you?

Andi
Comment 22 Andi Clemens 2008-08-16 11:47:36 UTC
Chandrasekhar,

just re-read your above post again where you mentioned it can be closed, I will do so now.

Andi