Bug 344704

Summary: My application crashs when I include this library
Product: [Applications] digikam Reporter: mountybike
Component: Metadata-EngineAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: caulier.gilles
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 7.3.0
Attachments: An empty project with libkexiv2

Description mountybike 2015-03-01 14:23:51 UTC
Created attachment 91359 [details]
An empty project with libkexiv2

My application crashs when I try to use libkexiv2.

It crashs with the Mageia rpms of Exiv2 (0.23) / KExiv2 (0.23) and also with a manual build of Exiv2 (0.24) and the latest version of libKExiv2.

I created an empty QtCreator project (Qt5.4), with an empty main file (just with "QCoreApplication a(argc, argv);return a.exec();").

When I run my project with this option into the .pro file:
LIBS += -lkexiv2
LIBS += -L/home/thierry/Développement/libKExiv2/libkexiv2/lib
the software crash with this message:
*** Error in `/home/thierry/Développement/BUILDS/build-Test-Desktop_Qt_5_4_0_GCC_64bit-Debug/Test': realloc(): invalid pointer: 0x00007fc5fb39c0e0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7287f)[0x7fc5f9eff87f]
/lib64/libc.so.6(+0x7862e)[0x7fc5f9f0562e]
/lib64/libc.so.6(realloc+0x31d)[0x7fc5f9f0a4ad]
/home/thierry/Qt5.4.0/5.4/gcc_64/lib/libQt5Core.so.5(_ZN9QListData7reallocEi+0x26)[0x7fc5fad80216]
/home/thierry/Qt5.4.0/5.4/gcc_64/lib/libQt5Core.so.5(_ZN9QListData6appendEi+0x79)[0x7fc5fad802e9]
/home/thierry/Qt5.4.0/5.4/gcc_64/lib/libQt5Core.so.5(+0x229c1c)[0x7fc5faea5c1c]
/home/thierry/Qt5.4.0/5.4/gcc_64/lib/libQt5Core.so.5(_Z21qRegisterResourceDataiPKhS0_S0_+0x240)[0x7fc5faea34b0]
/lib64/libQtGui.so.4(+0x1b6813)[0x7fc5f885e813]
/lib64/ld-linux-x86-64.so.2(+0xeaba)[0x7fc5fb65baba]
/lib64/ld-linux-x86-64.so.2(+0xeba3)[0x7fc5fb65bba3]
/lib64/ld-linux-x86-64.so.2(+0x11ea)[0x7fc5fb64e1ea]
======= Memory map: ========
00400000-00401000 r-xp 00000000 08:06 56630894                           /home/thierry/Développement/BUILDS/build-Test-Desktop_Qt_5_4_0_GCC_64bit-Debug/Test
...
...
(would you like the whole message?)


If I remove this option, all works fine.
It run also with the Exiv2 library.

Is it a bug of libkexiv2?
Comment 1 caulier.gilles 2015-03-01 15:51:07 UTC
It crash in Qt5.

Libkexiv2 that you use is KDE4/Qt4 version based, so uncompatible

You must use libkexiv2 ported to Qt5. Look here for details :

https://techbase.kde.org/Projects/Digikam/CodingSprint2014#Branches_Creation

Gilles Caulier
Comment 2 caulier.gilles 2021-05-04 06:07:06 UTC
Not reproducible with digiKam 7.3.0 and Exiv2 0.27.4