Bug 145497

Summary: Crash when opening first folder
Product: [Applications] digikam Reporter: Axel Braun <axel.braun>
Component: Metadata-EngineAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: ahuggel, caulier.gilles
Priority: NOR    
Version: 0.9.1   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 7.1.0
Sentry Crash Report:
Attachments: Traceback
Crash report after update
backtrace: First folder empty
backtrace with exiv2 0.15

Description Axel Braun 2007-05-16 12:36:53 UTC
Version:           0.9.1 (using KDE 3.5.6 "release 64.1" , openSUSE )
Compiler:          Target: i586-suse-linux
OS:                Linux (i686) release 2.6.13-15.10-default

digikam starts up 'normal' in the folder last opened. changing to a different folder is OK, but clicking the first folder in the list results in a crash.
Comment 1 Axel Braun 2007-05-16 12:37:26 UTC
Created attachment 20586 [details]
Traceback
Comment 2 Arnd Baecker 2007-06-06 16:10:26 UTC
Could you try to install 0.9.2.beta3 to see if the problem persist?
Comment 3 Axel Braun 2007-06-06 17:28:56 UTC
can you send me a SPEC file for the RPM compilation? All SuSE packages are far behind, so I would build from tar
Comment 4 Arnd Baecker 2007-06-06 17:43:59 UTC
Hmm, I have no experience with SPEC files (this would be provided/created by the distributors). So maybe you could directly build from the tar file
(or svn)? 
See http://www.digikam.org/?q=download/svn
"Install digiKam in your Home Directory"
Comment 5 Axel Braun 2007-06-23 09:11:28 UTC
Had some problems compiling it, but in between 0.9.2 is out - same problem
Comment 6 caulier.gilles 2007-06-23 09:53:19 UTC
Arnd, 

Look the backtrace of crash. It's relevant of Exiv2 shared lib, not digiKam directly:

Axel, update your computer with 

- Exiv2 0.13 release at least (0.14 will be better).
- Last libkexiv2 to last stable release 0.1.5.

Gilles

Comment 7 Axel Braun 2007-06-23 11:17:19 UTC
southpole:/home/axel # apt policy libkexiv2
libkexiv2:
  Installiert: 0.1.5-2.1
  Kandidat: 0.1.5-2.1
southpole:/home/axel # apt policy libexiv2
libexiv2:
  Installiert: 0.14-2.1
  Kandidat: 0.14-2.1

Comment 8 Axel Braun 2007-06-23 11:18:39 UTC
Created attachment 20936 [details]
Crash report after update

his is the latest traceback after the update (and restart)
Comment 9 caulier.gilles 2007-06-23 11:35:25 UTC
Ok, now, a second try. Check if you haven't both release of Exiv2 installed on your computer...

Note : here i'm use Exiv2 0.14 and libkexiv2 0.1.5 without problem...

Gilles
Comment 10 Axel Braun 2007-06-23 11:45:14 UTC
southpole:/home/axel # rpm -qa *exiv2*
libexiv2-0.14-2.1
libexiv2-devel-0.14-2.1
libkexiv2-devel-0.1.5-2.1
libkexiv2-0.1.5-2.1

As you cahnged it to Metadata: First folder is an 'older' one, with still an preview icon in the tree view of digikam. Can that be a reason?

I changed a folder from anything to 0-anything, after the warning that anyting is not in the database anymore, digikam crashes immediately
Comment 11 Arnd Baecker 2007-06-23 11:46:47 UTC
Thanks for the backtrace - this indicates that the problem occurs
on the libexiv2 (just talked with Gilles on the IRC on this).

Therefore it seems that one of your images in the first folder
causes libexiv2 to crash.
To narrow the problem down, could you run
exiv2 image_name.jpg for each of the image files
to find out the problematic one?

Thanks a lot, Arnd
Comment 12 Axel Braun 2007-06-23 17:03:04 UTC
Exiv2 exception in print action for file picture.bmp:
picture.bmp: The file contains data of an unknown image type

Is that the problem?
Comment 13 Arnd Baecker 2007-06-23 18:12:25 UTC
might be ...
could you put that file somewhere to download?
(Gilles is surely happy to add this to his collection ;-),
and I could try this out here as well ...)

Best, Arnd
Comment 14 Axel Braun 2007-06-23 20:02:03 UTC
Well, seems that the last activity (renaming anything to 0-anything) did some sreious harm: I reverted everything, placed the content of the first folder into the backyard (so first folder is empty), removed ~/.kde/share/config/digikam*, removed (path)/digikam3.db, but on start it immediately crashes (after asking for the path to the pictures and creating the .db file). I'll attach another log.
Comment 15 Axel Braun 2007-06-23 20:02:36 UTC
Created attachment 20937 [details]
backtrace: First folder empty
Comment 16 Arnd Baecker 2007-06-23 20:18:08 UTC
Do you have other folders which have image files?
The last backtrace also points to exiv2...

Just to be sure, could you start again with a non-existing directory
for the images. Digikam should come up fine (and no call to exiv2
should be made, I would guess ...).
Comment 17 caulier.gilles 2007-06-23 20:27:52 UTC
Axel,

Andreas, the Exiv2 lead developper, has recently fixed a similar bug in current implementation of libary. This is have been already reported in this room...

I recommend you to try the Exiv2 implementation from svn. 

1/ Uninstall old Exiv2 0.14
2/ Checkout source code, recompile and install Exiv2 from svn (look http://www.exiv2.org)
3/ recompile and install libkexiv2, kipi-plugins, and digiKam

I CC Andreas for informations.

Gilles Caulier
Comment 18 Andreas Huggel 2007-06-25 10:26:43 UTC
KExiv2Iface::KExiv2::load() calls 
Exiv2::ImageFactory::open() which apparently throws,
latest when it encounters the BMP file mentioned in note #12 (or was it note ~12)

Could it be that the Exiv2 exception is not caught?

-ahu.
Comment 19 Axel Braun 2007-07-09 23:07:39 UTC
Have the gurus sorted out who's chicken and who egg?
Meanwhile I went back to SuSE 10.0 delivery package: 0.7.anything. works again
Comment 20 caulier.gilles 2007-08-24 22:33:06 UTC
Axel,

Can you give us fresh information about this report, to use last stable :
- Exiv2 0.15
- libkexiv2 0.1.5
- digiKam 0.9.2

Thanks in advance

Gilles Caulier
Comment 21 Axel Braun 2007-09-02 18:21:14 UTC
Hello Charles,
sorry for the delay, I first had to find a way to build exiv2 for SuSE 10.0.
Result is still the same: immediate crash
As coming from 0.7.x, I first deleted the old database and started digikam again. the log is attached.
Cheers
Axel
Comment 22 Axel Braun 2007-09-02 18:21:57 UTC
Created attachment 21532 [details]
backtrace with exiv2 0.15
Comment 23 Axel Braun 2007-09-02 18:23:43 UTC
One more: Starting from command line.

axel@southpole:~> digikam
terminate called after throwing an instance of 'Exiv2::Error'
  what():  /daten/2privat/Bilder/70 Jahre Nordparksiedlung/Thumbs.db: Die Datei enthält Daten eines unbekannten Bildtyps.
KCrash: Application 'digikam' crashing...

means nomething like: The file contains data of an unknown picture type
Comment 24 caulier.gilles 2007-09-02 18:31:41 UTC
Axel,

Exiv2 generate an exception and it's not handle properlly by the libkexiv2 interface used by digiKam... Result digiKam crash.

This problem have been already reported in this roorm and fixed in current implementation from svn.

Look here : http://bugs.kde.org/show_bug.cgi?id=149267

and especially #2 with this patch :

http://websvn.kde.org/branches/extragear/kde3/libs/libkexiv2/libkexiv2/kexiv2.cpp?r1=704515&r2=704514&pathrev=704515

Gilles
Comment 25 Axel Braun 2007-09-03 13:08:34 UTC
Thanks for the info. Then you should close this bug with reference to bug 149267
Comment 26 caulier.gilles 2007-09-03 13:16:07 UTC
Axel,

I will be happy if you can confirm than your problem is solved to apply patch: 

http://websvn.kde.org/branches/extragear/kde3/libs/libkexiv2/libkexiv2/kexiv2.cpp?r1=704515&r2=704514&pathrev=704515

It's must be apply on kexiv2.cpp from libkexiv2. It's easy to do. The binary compatibility is respected and you just need to recompile and install libkexiv2 (normally)

Gilles
Comment 27 caulier.gilles 2007-09-04 08:56:00 UTC

*** This bug has been marked as a duplicate of 149267 ***
Comment 28 Axel Braun 2007-09-07 18:36:49 UTC
The latest version of libkexiv2 (0.1.5-26.2) fixes the problem. 
Thanks guys
Comment 29 caulier.gilles 2020-08-29 20:47:10 UTC
Fixed with #149267