Bug 133567 - crash when testing tags in digikam image editor (saveWithExiv2)
Summary: crash when testing tags in digikam image editor (saveWithExiv2)
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Engine (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-04 22:20 UTC by Roger Larsson
Modified: 2017-08-10 19:47 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 0.9.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roger Larsson 2006-09-04 22:20:46 UTC
Version:           0.9.0-beta2 (using KDE 3.5.1 Level "a" , SUSE 10.1)
Compiler:          Target: x86_64-suse-linux
OS:                Linux (x86_64) release 2.6.16.21-0.13-default

Change tags, and move forward and backward. Repeat (at least 16 times)

Control of systemsettings on start inactive. [translated]

Using host libthread_db library "/lib64/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 47540087871104 (LWP 7214)]
[New Thread 1082140992 (LWP 7484)]
[KCrash handler]
#5  0x00002b3cc9e00955 in free () from /lib64/libc.so.6
#6  0x00002b3cc5577637 in ~Entry (this=0x11eae58) at ifd.cpp:62
#7  0x00002b3cc5577c50 in ~Ifd (this=<value optimized out>)
    at /usr/include/c++/4.1.0/bits/stl_construct.h:107
#8  0x00002b3cc556ad62 in ~ExifData (this=0x1220888) at exif.cpp:389
#9  0x00002b3cc5582d88 in ~JpegBase (this=0x1220870) at jpgimage.hpp:123
#10 0x00002b3cc5582ec7 in ~JpegImage (this=0x10000ba010000) at jpgimage.hpp:284
#11 0x00002b3cc4ade304 in Digikam::DMetaLoader::saveWithExiv2 ()
   from /opt/kde3/lib64/libdigikam.so.0
#12 0x00002b3cc4aded69 in Digikam::JPEGMetaLoader::save ()
   from /opt/kde3/lib64/libdigikam.so.0
#13 0x00002b3cc4ac9760 in Digikam::DMetadata::save ()
   from /opt/kde3/lib64/libdigikam.so.0
#14 0x00002b3cc4ac987f in Digikam::DMetadata::applyChanges ()
   from /opt/kde3/lib64/libdigikam.so.0
#15 0x00002b3cc4a36e55 in Digikam::ImageDescEditTab::applyAllChanges ()
   from /opt/kde3/lib64/libdigikam.so.0
#16 0x00002b3cc4a3a01b in Digikam::ImageDescEditTab::setItem ()
   from /opt/kde3/lib64/libdigikam.so.0
#17 0x00002b3cc4a2a60d in Digikam::ImagePropertiesSideBarDB::slotNoCurrentItem
    () from /opt/kde3/lib64/libdigikam.so.0
#18 0x00002b3cc4a2ac82 in Digikam::ImagePropertiesSideBarDB::qt_invoke ()
   from /opt/kde3/lib64/libdigikam.so.0
#19 0x00002b3cc77a97ac in QObject::activate_signal ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#20 0x00002b3cc77aa4c3 in QObject::activate_signal ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#21 0x00002b3cc4ae4316 in Digikam::EditorWindow::slotLoadingStarted ()
   from /opt/kde3/lib64/libdigikam.so.0
#22 0x00002b3cc4ae9046 in Digikam::EditorWindow::qt_invoke ()
   from /opt/kde3/lib64/libdigikam.so.0
#23 0x00002b3cc4aef56d in Digikam::ImageWindow::qt_invoke ()
   from /opt/kde3/lib64/libdigikam.so.0
#24 0x00002b3cc77a97ac in QObject::activate_signal ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#25 0x00002b3cc77aa0d6 in QObject::activate_signal ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#26 0x00002b3cc4a92138 in Digikam::Canvas::signalLoadingStarted ()
   from /opt/kde3/lib64/libdigikam.so.0
#27 0x00002b3cc4aeef38 in Digikam::ImageWindow::slotLoadCurrent ()
   from /opt/kde3/lib64/libdigikam.so.0
#28 0x00002b3cc4aef950 in Digikam::ImageWindow::slotBackward ()
   from /opt/kde3/lib64/libdigikam.so.0
#29 0x00002b3cc4aef5a4 in Digikam::ImageWindow::qt_invoke ()
   from /opt/kde3/lib64/libdigikam.so.0
#30 0x00002b3cc77a97ac in QObject::activate_signal ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#31 0x00002b3cc77aa4c3 in QObject::activate_signal ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#32 0x00002b3cc65ecd21 in KAction::qt_invoke ()
   from /opt/kde3/lib64/libkdeui.so.4
#33 0x00002b3cc77a97ac in QObject::activate_signal ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#34 0x00002b3cc65061eb in KToolBarButton::buttonClicked ()
   from /opt/kde3/lib64/libkdeui.so.4
#35 0x00002b3cc6506498 in KToolBarButton::mouseReleaseEvent ()
   from /opt/kde3/lib64/libkdeui.so.4
#36 0x00002b3cc77dc667 in QWidget::event ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#37 0x00002b3cc656a3b6 in KToolBarButton::event ()
   from /opt/kde3/lib64/libkdeui.so.4
#38 0x00002b3cc7752985 in QApplication::internalNotify ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#39 0x00002b3cc775379b in QApplication::notify ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#40 0x00002b3cc6bc6708 in KApplication::notify ()
   from /opt/kde3/lib64/libkdecore.so.4
#41 0x00002b3cc76fb0c4 in QETWidget::translateMouseEvent ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#42 0x00002b3cc76fa2a3 in QApplication::x11ProcessEvent ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#43 0x00002b3cc770922f in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#44 0x00002b3cc77676a1 in QEventLoop::enterLoop ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#45 0x00002b3cc776754a in QEventLoop::exec ()
   from /usr/lib/qt3/lib64/libqt-mt.so.3
#46 0x0000000000402c34 in main ()
Comment 1 caulier.gilles 2006-09-05 07:58:26 UTC
Roger,

Witch Exiv2 release you use. Here i connot reproduce the problem under Mandriva 2005-2006 and Suse 10.1

Here i'm using Exiv2 from svn (next 10.1 release).

Gilles Caulier
Comment 2 caulier.gilles 2006-09-05 17:50:46 UTC
Andreas,

Whats wrong with libc exactly ? There are a lots of crash report in libc. Any suggestions ?

Gilles
Comment 3 Andreas Huggel 2006-09-05 19:19:19 UTC
digikam et al. -> exiv2 -> STL -> libc
The root cause for the memory corruption can be anywhere
(or a 64bit issue, as this is on a 64bit system)

Roger, can you please do this in Valgrind? Valgrind might be able to pinpoint the memory problem.

Thanks,
Andreas
Comment 4 caulier.gilles 2006-09-05 21:07:00 UTC
Roger,

Look at end of HACKING file in digiKam trunk repository to see the notice about valgrind. Thanks in advance

Gilles
Comment 5 caulier.gilles 2006-09-05 22:53:43 UTC
Paco, can you reproduce this crash under you 64 bits computer ?

Gilles
Comment 6 Roger Larsson 2006-09-06 00:21:21 UTC
Valgrind build problem... missing libraries - tomorrow...
Comment 7 Roger Larsson 2006-09-06 23:30:31 UTC
Uninitialized data is written.

==11943==
==11943== Syscall param write(buf) points to uninitialised byte(s)
==11943==    at 0x9091ECB: (within /lib64/libpthread-2.4.so)
==11943==    by 0x8CAD5BE: (within /usr/X11R6/lib64/libX11.so.6.2)
==11943==    by 0x8C91D2E: (within /usr/X11R6/lib64/libX11.so.6.2)
==11943==    by 0x8C6EF53: XCheckIfEvent (in /usr/X11R6/lib64/libX11.so.6.2)
==11943==    by 0x7A49117: QETWidget::translatePaintEvent(_XEvent const*) (in /usr/lib/qt3/lib64/libqt-mt.so.3.3.5)
==11943==    by 0x7A5473A: QApplication::x11ProcessEvent(_XEvent*) (in /usr/lib/qt3/lib64/libqt-mt.so.3.3.5)
==11943==    by 0x7A6322E: QEventLoop::processEvents(unsigned) (in /usr/lib/qt3/lib64/libqt-mt.so.3.3.5)
==11943==    by 0x7AC16A0: QEventLoop::enterLoop() (in /usr/lib/qt3/lib64/libqt-mt.so.3.3.5)
==11943==    by 0x7AC1549: QEventLoop::exec() (in /usr/lib/qt3/lib64/libqt-mt.so.3.3.5)
==11943==    by 0x402C33: main (in /opt/kde3/bin/digikam)
==11943==  Address 0xA454931 is 7,761 bytes inside a block of size 16,384 alloc'd
==11943==    at 0x4A1FB37: calloc (vg_replace_malloc.c:279)
==11943==    by 0x8C81FE6: XOpenDisplay (in /usr/X11R6/lib64/libX11.so.6.2)
==11943==    by 0x7A50D0E: qt_init_internal(int*, char**, _XDisplay*, unsigned long, unsigned long) (in /usr/lib/qt3/lib64/libqt-mt.so.3.3.5)
==11943==    by 0x7AB30B8: QApplication::construct(int&, char**, QApplication::Type) (in /usr/lib/qt3/lib64/libqt-mt.so.3.3.5)
==11943==    by 0x6F26313: KApplication::KApplication(bool, bool) (in /opt/kde3/lib64/libkdecore.so.4.2.0)
==11943==    by 0x402729: main (in /opt/kde3/bin/digikam)
digikam: /[...]/img_1084.jpg : JPEG file identified
digikam: Dirty: /
digikam: Exif color-space tag is sRGB. Using default sRGB ICC profile.
digikam: Exif Orientation: 1

* Moving forward to next image in Image Editor (no tag change) gives this:

digikam: /[...]/img_1085.jpg : JPEG file identified
digikam: Exif color-space tag is sRGB. Using default sRGB ICC profile.
digikam: Exif Orientation: 1

Clean while running!

But quitting shows some leaked memory:

==11943== ERROR SUMMARY: 528 errors from 29 contexts (suppressed: 58 from 2)
==11943== malloc/free: in use at exit: 845,536 bytes in 11,847 blocks.
==11943== malloc/free: 4,853,930 allocs, 4,842,083 frees, 902,706,257 bytes allocated.
==11943== For counts of detected errors, rerun with: -v
==11943== searching for pointers to 11,847 not-freed blocks.
==11943== checked 14,886,320 bytes.
==11943==
==11943== LEAK SUMMARY:
==11943==    definitely lost: 26,256 bytes in 376 blocks.
==11943==      possibly lost: 304 bytes in 1 blocks.
==11943==    still reachable: 818,976 bytes in 11,470 blocks.
==11943==         suppressed: 0 bytes in 0 blocks.

This new valgrind version did not have --tool=helgrind so I could not
see if this is a threading issue.
Comment 8 Andreas Huggel 2006-09-09 13:03:31 UTC
Thanks. So it doesn't crash when run in Valgrind and the issues Valgrind highlights are not related to Exiv2. Sounds good but doesn't help unfortunately.
-ahu.
Comment 9 Roger Larsson 2006-09-09 23:18:11 UTC
Is these parts multithreaded?
If so then running an older valgrind with --tool=helgrind [threading check]
might give some additional info.
Comment 10 caulier.gilles 2006-11-14 21:28:54 UTC
Another crash about Exiv2

Gilles
Comment 11 Andreas Huggel 2006-11-16 12:36:23 UTC
Roger,

This could be a duplicate of bug #136855.

Can you still recreate this? If so, please upgrade to the latest Exiv2 from SVN and check if it helps. Thanks!

-ahu.
Comment 12 caulier.gilles 2006-12-12 09:16:37 UTC
Roger,

This crash still reproductible using digiKam/DigikamImagePlugins 0.9.0-RC2 and Exiv2 0.12 ?

Thanks in advance for your report.

Gilles Caulier
Comment 13 Roger Larsson 2006-12-13 02:08:21 UTC
I updated and have been using a svn versions lately.
 Exiv2 0.11
 DigikamImagePlugins v0.9.0-rc1
No problem that I can remember. I assume problem is fixed.