Bug 339144 - digiKam crashes in MetaEngine
Summary: digiKam crashes in MetaEngine
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Engine (show other bugs)
Version: 4.3.0
Platform: Gentoo Packages Linux
: VHI crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-17 13:09 UTC by DrSlony
Modified: 2018-04-01 09:49 UTC (History)
25 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.4.0


Attachments
DrKonqi report of non-debug type build (15.24 KB, text/plain)
2014-09-17 13:11 UTC, DrSlony
Details
attachment-8629-0.html (1.67 KB, text/html)
2014-09-22 23:27 UTC, Philip Johnsson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description DrSlony 2014-09-17 13:09:28 UTC
digiKam-4.3.0 crashes when creating or updating a sidecar file.

Reproducible: Always

Steps to Reproduce:
1. Add "pp3" to Configure digiKam > MIME Types > Image/Movie/Audio Files. Doesn't matter which. Restart if needed.
2. Open some album, /photos/2015
3. From a console, "touch foo.pp3" in that album.
Crash

Same if you edit an existing pp3 and save.



I attached the DrKonqi debug log.

Next I recompiled digiKam with debug flags, did the same except instead of creating it with "touch" i deleted it with "rm", and here is the gdb stack backtrace:
http://dpaste.com/30PP371
Comment 1 DrSlony 2014-09-17 13:11:07 UTC
Created attachment 88721 [details]
DrKonqi report of non-debug type build
Comment 2 caulier.gilles 2014-09-17 13:24:25 UTC
It crash in Exiv2 shared lib at preview extraction :

Thread 2 (Thread 0x7f7fc37fe700 (LWP 4029)):
[KCrash Handler]
#5  0x00007f7ffab660a2 in Exiv2::PreviewManager::getPreviewImage(Exiv2::PreviewProperties const&) const () from /usr/lib64/libexiv2.so.13
#6  0x00007f8001f7ce12 in KExiv2Iface::KExiv2Previews::data(int) () from /usr/lib64/libkexiv2.so.11

I remember to have consolidated code in libkexiv2 to not crash with irrelevant offset in preview container taken from Exiv2.

Did you use libkexiv2 code provided with digiKam tarball, or system based ? Look details from Help/Component Info dialog. Libkexiv2 version must be 2.3.2.

Gilles Caulier
Comment 3 DrSlony 2014-09-17 13:46:06 UTC
LibExiv2: 0.24
LibKExiv2: 2.3.1

Portage tells me libkexiv2-4.14.0 is installed, whatever that is. I don't know whether the ebuild used that one, or the one in the tarball, but if 2.3.2 is in the tarball then I guess it used the system one.
Comment 4 caulier.gilles 2014-09-17 13:49:08 UTC
No. If digikam said that libkexiv2 version 2.3.1, it's not 2.3.2.

When digiKam is configured before compilation, to use libkexiv2 from tarball, you need to turn on this cmake switch :

https://projects.kde.org/projects/extragear/graphics/digikam/digikam-software-compilation/repository/revisions/master/entry/README#L123

Gilles Caulier
Comment 5 Christoph Feck 2014-09-17 22:38:38 UTC
Multiple crashes ending here... is this a BIC in libkexiv2 that needs to be reported to distributions?
Comment 6 Christoph Feck 2014-09-17 22:45:35 UTC
*** Bug 339150 has been marked as a duplicate of this bug. ***
Comment 7 Christoph Feck 2014-09-17 22:45:57 UTC
*** Bug 339151 has been marked as a duplicate of this bug. ***
Comment 8 Christoph Feck 2014-09-17 22:46:22 UTC
*** Bug 339152 has been marked as a duplicate of this bug. ***
Comment 9 Christoph Feck 2014-09-17 22:48:07 UTC
*** Bug 339158 has been marked as a duplicate of this bug. ***
Comment 10 Christoph Feck 2014-09-17 22:52:18 UTC
This had already been reported as bug 339088. Given the variety of bug reports, I doubt that the bug is upstream.
Comment 11 Christoph Feck 2014-09-17 22:55:55 UTC
Backtrace from bug 339152 confirms that libkexiv2 calls Exiv2::PreviewManager::getPreviewImage() with a null object pointer.
Comment 12 caulier.gilles 2014-09-18 05:20:49 UTC
This commit must prevent this kind of crash :

https://projects.kde.org/projects/kde/kdegraphics/libs/libkexiv2/repository/revisions/26d707eb08a88341449c1dff2637bf40551a6a75

But it have been introduced with libkexiv2 2.3.2

Gilles caulier
Comment 13 Rex Dieter 2014-09-18 23:24:33 UTC
The commit referenced in comment #12 seems to be only in master/ branch, not 4.14/ .  Would be ideal to backport so it gets included in the next 4.14.2 point release.
Comment 14 Rex Dieter 2014-09-19 02:37:32 UTC
I could help do that, if there are no objections.
Comment 15 caulier.gilles 2014-09-19 08:14:00 UTC
Rex,

You are welcome to backport this commit to 4.14 branch. No problem. patch is very simple as you can seen. 

I just delayed to do it myself to be sure that no side effects have been introduced by this commit.

Thanks in advance

Gilles Caulier
Comment 16 Rex Dieter 2014-09-19 14:51:15 UTC
Git commit 25ad41274d0f4084554794ee91e183accfce781f by Rex Dieter, on behalf of Gilles Caulier.
Committed on 02/09/2014 at 12:04.
Pushed by rdieter into branch 'KDE/4.14'.

Prevent crash if index if out of QList range.
FIXED-IN: 4.14.2

M  +23   -4    libkexiv2/kexiv2previews.cpp

http://commits.kde.org/libkexiv2/25ad41274d0f4084554794ee91e183accfce781f
Comment 17 caulier.gilles 2014-09-19 16:08:54 UTC
Note : fixed in libkexiv2 through kdegraphics/libs version 4.14.2

Gilles Caulier
Comment 18 Rex Dieter 2014-09-19 16:22:56 UTC
If you want mention of this bugfix included in the 4.14.2 release announcement, I think it needs to say 4.14.2 , but I'll leave that to you. :)
Comment 19 caulier.gilles 2014-09-19 16:26:38 UTC
Rex,

I use fixed in tag to register all files closed between digiKam release.

All files closed can be listed quickly through bugzilla database :

https://bugs.kde.org/buglist.cgi?f1=cf_versionfixedin&list_id=1124467&o1=equals&product=digikam&product=digikamimageplugins&product=kipiplugins&product=showfoto&query_format=advanced&v1=4.4.0

Libkexiv2 is also published into digiKam SC tarball, but disabled by default at compile time...

Gilles
Comment 20 caulier.gilles 2014-09-19 16:28:00 UTC
Note : the version ID of the report use digiKam release, as libkexiv2 is included in digiKam section from bugzilla. So we must still homogeneous here between report version and fixed version...

Gilles
Comment 21 caulier.gilles 2014-09-19 21:20:53 UTC
*** Bug 339217 has been marked as a duplicate of this bug. ***
Comment 22 Christian 2014-09-21 13:47:23 UTC
Request for help:
---------------------------

Please inform repobuilders to provide digikam 4.2 as package as soon as possible, e.g. Stephan Kulow from openSuse. 

Stephan, like many others provides early factory builds of digikam, because digikam 3.5 is still the official openSuse build. I cannot go back to 3.5, and Stephan removed all earlier packages from the web. 4.3 package crashes.
My suggestion: Please provide the 4.2 version till the bug is fixed in the various distros.

To give an example what happened to me this morning:
----------------------------------------------------------------------------------
I end up with no digikam on two workstations for production. In my second office there are still valid 4.2 installations and i can get the package files out of the yum cache, but this office is 200 km away from here. : (
Comment 23 caulier.gilles 2014-09-21 16:10:40 UTC
*** Bug 339269 has been marked as a duplicate of this bug. ***
Comment 24 robinherink 2014-09-21 16:33:34 UTC
Is there some work around for this bug?

Or is the only option waiting another months for Digikam 4.4 and KDE 4.14.2 and hoping no new bug is introduced? Sorry for the bluntness, I love Digikam but hate this policy of not releasing bugfixes until the next version. 4.2 was unusable for me for some other bug, now 4.3, and the last available version for *buntu is 4.0, so I'm back there right now.
Comment 25 Kenneth Ingham 2014-09-22 17:39:02 UTC
I second the comment from robinherink@yahoo.com.
Comment 26 caulier.gilles 2014-09-22 20:32:59 UTC
*** Bug 339309 has been marked as a duplicate of this bug. ***
Comment 27 Thomas Arend 2014-09-22 20:44:09 UTC
4.2 hangs up during the working and produces no crashed report.
Tried the same with 4.3 and could not force a crash. It crashes when (sometimes) when I close the program. But I don't care much about crashes when closing an program. :-)

So going back to 4.2 is not a solution. I don't need the worse bug back.
Comment 28 caulier.gilles 2014-09-22 20:58:00 UTC
I want to be clear about this file.

Bug is in libkexiv2 and fixed after digiKam 4.3.0.

libkexiv2 patch have been back-ported from master to stable KDE branch. This want mean that  bug will be fixed at next KDE 4.14.2 or using an update of KDE > 4.14.2 where patch can be back-ported by distro packagers.
Comment 29 Philip Johnsson 2014-09-22 23:27:21 UTC
Created attachment 88797 [details]
attachment-8629-0.html

For those using my kubuntu-backports PPA with digikam 4.3.0 for ubuntu
14.04 with the kubuntu teams PPA with KDE 4.14.x I have updated my digikam
4.3.0 packages with the libkexiv2 fix. Hopefully that solves this bug for
some users until the fix have found itself to upstream releases.

On Mon, Sep 22, 2014 at 10:58 PM, Gilles Caulier <caulier.gilles@gmail.com>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=339144
>
> --- Comment #28 from Gilles Caulier <caulier.gilles@gmail.com> ---
> I want to be clear about this file.
>
> Bug is in libkexiv2 and fixed after digiKam 4.3.0.
>
> libkexiv2 patch have been back-ported from master to stable KDE branch.
> This
> want mean that  bug will be fixed at next KDE 4.14.2 or using an update of
> KDE
> > 4.14.2 where patch can be back-ported by distro packagers.
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
> _______________________________________________
> Digikam-devel mailing list
> Digikam-devel@kde.org
> https://mail.kde.org/mailman/listinfo/digikam-devel
>
Comment 30 Christian 2014-09-23 06:43:16 UTC
(In reply to Thomas Arend from comment #27)
> So going back to 4.2 is not a solution. I don't need the worse bug back.

You are refering to your distribution - but don't forget there are many others out there. The last 4.x build for openSuse is 4.3, which crashes, while 4.2 was working fine, but is not on the net any more. 

Therefore I repeat my Request for help: 
------------------------------------------------------------

Please inform repobuilders to check their latest digikam packages as soon as possible, e.g. Stephan Kulow from openSuse.  I am not the only one who have NO digikam available for a whole working day till now on several workstations:
http://forums.opensuse.org/showthread.php/501064-digikam-4-3-0

Please be aware of the users perspective: 
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
I use digikam in production. It is good news that the source of the bug is known and resolved. But this DOES NOT HELP ME in the situation, where NO working package of digikam is available at all, because my auto-update script installed the bad release on two workstations.

It is a NO GO from user perspective, that there is no working release online,  because the repo-builder are not informed that he/she might have build dead software.

Christian
________________
PS: I am fully aware that this is an openSuse issue, because  release 3.5 (stone age) is the official supported version. So I am forced to use an early adopters releases in production without any support ... and no regular way to contact the builder.
Comment 31 caulier.gilles 2014-09-23 07:41:26 UTC
The next digiKam release 4.4.0 is planed at 10 october 2014

This version will include all fix to prevent this crash.

Gilles Caulier
Comment 32 caulier.gilles 2014-09-23 07:50:10 UTC
Git commit 573069e8cd3b7155582e0c7be3625c0cc4879619 by Gilles Caulier.
Committed on 23/09/2014 at 07:49.
Pushed by cgilles into branch 'master'.

Handle right libkexiv2 version to extract preview and prevent crash in Exiv2 preview extractor.

M  +6    -0    libs/threadimageio/thumbnailcreator.cpp

http://commits.kde.org/digikam/573069e8cd3b7155582e0c7be3625c0cc4879619
Comment 33 caulier.gilles 2014-09-23 07:52:01 UTC
To all packagers,

Patch from comment #32 prevent digiKam crash if libkexiv2 version is not right one. You can backport this patch to 4.3.0 source code.

Gilles Caulier
Comment 34 caulier.gilles 2014-09-23 08:29:16 UTC
Git commit e2eeb730d02aad858f15c6f35f2a6b6beb38acf5 by Gilles Caulier.
Committed on 23/09/2014 at 08:28.
Pushed by cgilles into branch 'master'.

Another place where we need to handle right libkexiv2 version to extract preview and prevent crash in Exiv2 preview extractor.

M  +5    -1    libs/threadimageio/previewtask.cpp

http://commits.kde.org/digikam/e2eeb730d02aad858f15c6f35f2a6b6beb38acf5
Comment 35 caulier.gilles 2014-09-23 08:30:29 UTC
To all packagers,

Consider also patch from comment #34 to prevent digiKam crash if libkexiv2 version is not right one. You can backport this patch also to 4.3.0 source code.

Gilles Caulier
Comment 36 caulier.gilles 2014-09-23 12:07:16 UTC
*** Bug 339325 has been marked as a duplicate of this bug. ***
Comment 37 caulier.gilles 2014-09-24 07:04:14 UTC
*** Bug 339348 has been marked as a duplicate of this bug. ***
Comment 38 caulier.gilles 2014-10-02 06:28:59 UTC
*** Bug 339593 has been marked as a duplicate of this bug. ***
Comment 39 Pino Toscano 2014-10-07 05:51:30 UTC
(In reply to Gilles Caulier from comment #32)
> Git commit 573069e8cd3b7155582e0c7be3625c0cc4879619 by Gilles Caulier.
> Committed on 23/09/2014 at 07:49.
> Pushed by cgilles into branch 'master'.
> 
> Handle right libkexiv2 version to extract preview and prevent crash in Exiv2
> preview extractor.
> 
> M  +6    -0    libs/threadimageio/thumbnailcreator.cpp
> 
> http://commits.kde.org/digikam/573069e8cd3b7155582e0c7be3625c0cc4879619

The problem with this commit is that it masks a feature in digikam, using a version of libkexiv2 from master only. This means that updating libkexiv2 to 4.14.2 (which has the backported fix) is not enough to get the feature back in digikam.

I'm just going to bump the minor libkexiv2 version (part of commit http://commits.kde.org/libkexiv2/cc2b72b933fa72841b665d6bb82efde4bb518669) to the KDE/4.14 branch.
Comment 40 Christoph Feck 2014-10-07 21:43:27 UTC
*** Bug 339751 has been marked as a duplicate of this bug. ***
Comment 41 caulier.gilles 2014-10-09 11:30:53 UTC
*** Bug 339811 has been marked as a duplicate of this bug. ***
Comment 42 caulier.gilles 2014-10-09 18:01:28 UTC
*** Bug 339823 has been marked as a duplicate of this bug. ***
Comment 43 Philip Johnsson 2014-10-09 18:53:04 UTC
I just got my bug report for this kind of bug in digikam 4.4.0 and libkexiv2  2.3.2 that comes with it and got the crash but as I can see it's now considered " RESOLVED FIXED"? Is it resolved after the release of the 4.4.0 tarball or should the bug report be re-opened again?
Comment 44 caulier.gilles 2014-10-11 09:24:14 UTC
*** Bug 339748 has been marked as a duplicate of this bug. ***
Comment 45 caulier.gilles 2014-10-11 16:38:35 UTC
*** Bug 339880 has been marked as a duplicate of this bug. ***
Comment 46 caulier.gilles 2014-10-12 10:08:47 UTC
*** Bug 339898 has been marked as a duplicate of this bug. ***
Comment 47 Michael Reed 2014-10-13 06:21:33 UTC
Last night I received 4.40 on Kubuntu 14.04 and the crashing seems to have stopped. Thanks guys.
Comment 48 caulier.gilles 2014-12-07 08:42:31 UTC
*** Bug 341605 has been marked as a duplicate of this bug. ***