Bug 147458

Summary: crash when reading EXIF from USB PtP camera or newly imported album
Product: [Applications] digikam Reporter: Bruce M. Simpson <bms>
Component: Import-Gphoto2Assignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: crash CC: caulier.gilles
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: FreeBSD Ports   
OS: FreeBSD   
Latest Commit: Version Fixed In: 8.2.0

Description Bruce M. Simpson 2007-07-02 16:29:27 UTC
Version:           0.9.2-final (using KDE KDE 3.5.6)
Installed from:    FreeBSD Ports
Compiler:          gcc 3.4.6 FreeBSD system compiler
OS:                FreeBSD

Since rebuilding all my FreeBSD ports for the X.Org 7.2 upgrade, DigiKam consistently crashes if it has to read or write EXIF information.

I am using an Olympus D-435 camera. Import is OK over USB -- it shows up as an Olympus C-310Z. I also see a crash immediately on image import from the camera if I leave JPEG  auto-rotation enabled. The imported images are not corrupt; verified with ImageMagick.

If I instead remove the newly imported album from my albums directory and attempt to import it from the default gallery screen I get "The process for the digikamalbums:// protocol died unexpectedly".

No backtrace is available from KCrash as KDE has not been built with debugging information.
Comment 1 caulier.gilles 2007-07-02 16:49:03 UTC
You must compile digiKam using .configure --enable-debug=full to have a suitable backtrace...

Gilles Caulier
Comment 2 Bruce M. Simpson 2007-07-03 00:54:08 UTC
I have recompiled digikam from ports, modifying the Makefile to pass --enable-debug=full to the configure script, and I still get the same KCrash message about the backtrace being corrupt.
Comment 3 Bruce M. Simpson 2007-07-03 14:54:13 UTC
FYI: As of this morning I forced another recompile of digikam from ports. I also forced a rebuild of libexif, libkexif and libexif-gtk. I still see the same failure, this time on digikam startup.

A build with the configure option --enable-debug=full still produces a corrupt backtrace.
Comment 4 caulier.gilles 2007-07-03 14:56:22 UTC
since digiKam 0.9.0, we don't use libexif, which is obsolete library since a long time, but libExiv2 to handle Exif, makernote, and iptc...

Gilles Caulier

Comment 5 Bruce M. Simpson 2007-07-03 15:28:06 UTC
I forced a portupgrade of libkexivm libexiv2 and exiv2 ports. digikam still crashes. it appears to link against libexif somewhere down the line:
%%%
empiric:~ % ldd `which digikam` | grep ex
        libkexiv2.so.2 => /usr/local/lib/libkexiv2.so.2 (0x28c3f000)
        libexiv2.so.0 => /usr/local/lib/libexiv2.so.0 (0x28c63000)
        libXext.so.6 => /usr/local/lib/libXext.so.6 (0x29e5c000)
        libexif.so.12 => /usr/local/lib/libexif.so.12 (0x2a01a000)
        libexpat.so.6 => /usr/local/lib/libexpat.so.6 (0x2a4ba000)
%%%

I will now try rebuilding digikam against the rebuilt exiv libraries.
Comment 6 caulier.gilles 2007-07-03 15:30:30 UTC
digikam is linked indirectly to libexif because it use libgphoto2 which is linked to libexif

so, i recommend to recompile libgphoto2 too...

Gilles
Comment 7 Bruce M. Simpson 2007-07-03 16:26:48 UTC
I forced a rebuild of gphoto2, libgphoto2, and digikam with the same result -- a crash on startup. However I noticed that gdb is in fact dumping core also when KCrash invokes it...

#0  0x0819f4e9 in cplus_demangle_mangled_name ()
#1  0x0819f637 in cplus_demangle_mangled_name ()
#2  0x0819f13a in cplus_demangle_fill_dtor ()
#3  0x0819f1c9 in cplus_demangle_fill_dtor ()
#4  0x081a2426 in cplus_demangle_init_info ()
#5  0x081a2571 in cplus_demangle_v3 ()
#6  0x0819af57 in cplus_demangle ()
#7  0x080e0ec3 in symbol_init_language_specific ()
#8  0x080e102d in symbol_set_names ()
#9  0x080ac275 in prim_record_minimal_symbol_and_info ()
#10 0x081312df in f_print_type ()
#11 0x081315e7 in f_print_type ()
#12 0x0813193c in f_print_type ()
#13 0x080e7911 in syms_from_objfile ()
#14 0x080e8ced in new_symfile_objfile ()
#15 0x080aeec5 in free_so ()
#16 0x080c73d0 in throw_exception ()
#17 0x080c751a in catch_errors ()
#18 0x080af1b1 in solib_add ()
#19 0x0807488e in attach_command ()
#20 0x080c753d in catch_errors ()
#21 0x080c73d0 in throw_exception ()
#22 0x080c751a in catch_errors ()
#23 0x080c757e in catch_command_errors ()
#24 0x08071918 in main ()

I have also informed the FreeBSD port maintainer about this bug... thanks for all your help to date...
Comment 8 Bruce M. Simpson 2007-07-09 13:09:03 UTC
After a complete restart of X and KDE, everything seems to be working. Sorry for the confusion and thanks for all your help so far.