Bug 280142

Summary: Crash in libtiff when files are edited
Product: [Applications] digikam Reporter: philippe.quaglia
Component: Plugin-DImg-TIFFAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: axel.krebs, caulier.gilles, fredericg_99, jon33040, marcel.wiesweg
Priority: NOR    
Version: 2.6.0   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 2.7.0
Sentry Crash Report:

Description philippe.quaglia 2011-08-15 18:39:47 UTC
Version:           2.0.0
OS:                Linux

For some reasons, the pictures in the folder I have imported are all rated 3 stars. Therefore, I click on the stars to remove them (click to have 1 star, and click on this star to remove it). It makes Digikam crash. I tried it twice, and crash both times. The automatic bug report does not work (miss the debug package, and is not able to install them, looks like some packages are missing). Here is the copy of the report however:

Application: digikam (2.0.0)
KDE Platform Version: 4.6.2 (4.6.2)
Qt Version: 4.7.2
Operating System: Linux 2.6.38-10-generic i686
Distribution: Ubuntu 11.04

-- Information about the crash:
<Indiquez-nous en détails ce que vous faisiez lors du plantage de l'application.>

The crash can be reproduced some of the time.

-- Backtrace:
Application: digiKam (digikam), signal: Bus error
[Current thread is 1 (Thread 0xb3f9fb10 (LWP 4041))]

Thread 12 (Thread 0xb3cfeb70 (LWP 4044)):
#0  0x00ff7416 in __kernel_vsyscall ()
#1  0x02208f76 in poll () from /lib/i386-linux-gnu/libc.so.6
#2  0x04fe784b in g_poll () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0x04fd71af in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0x04fd792b in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5  0x03484304 in ?? () from /usr/lib/i386-linux-gnu/libgio-2.0.so.0
#6  0x050002df in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#7  0x03dfe9cd in ?? () from /usr/lib/nvidia-current/libGL.so.1
#8  0x0221773e in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 11 (Thread 0xb0b84b70 (LWP 4046)):
#0  0x0225e6cc in ?? () from /lib/i386-linux-gnu/libc.so.6
#1  0x01d206fd in ?? () from /usr/lib/libexiv2.so.10
#2  0x01c7ace3 in Exiv2::Exifdatum::Exifdatum(Exiv2::Exifdatum const&) () from /usr/lib/libexiv2.so.10
#3  0x00948bda in KExiv2Iface::KExiv2::getExifTagString(char const*, bool) const () from /usr/lib/libkexiv2.so.10
#4  0x028464d7 in Digikam::DMetadata::getLensDescription (this=0xb0b83d80) at /build/buildd/digikam2-2.0.0/core/libs/dmetadata/dmetadata.cpp:1521
#5  0x0284ce3e in Digikam::DMetadata::getMetadataField (this=0xb0b83d80, field=Digikam::MetadataInfo::Lens) at /build/buildd/digikam2-2.0.0/core/libs/dmetadata/dmetadata.cpp:1766
#6  0x0284c00f in Digikam::DMetadata::getMetadataFields (this=0xb0b83d80, fields=...) at /build/buildd/digikam2-2.0.0/core/libs/dmetadata/dmetadata.cpp:2001
#7  0x0060c1ad in Digikam::ImageScanner::scanImageMetadata (this=0xb0b83d78) at /build/buildd/digikam2-2.0.0/core/libs/database/imagescanner.cpp:394
#8  0x0060f73e in Digikam::ImageScanner::scanFile (this=0xb0b83d78, mode=Digikam::ImageScanner::NewScan) at /build/buildd/digikam2-2.0.0/core/libs/database/imagescanner.cpp:271
#9  0x0061121d in Digikam::ImageScanner::newFile (this=0xb0b83d78, albumId=0) at /build/buildd/digikam2-2.0.0/core/libs/database/imagescanner.cpp:107
#10 0x005b2a88 in Digikam::CollectionScanner::scanNewFile (this=0xb0b8406c, info=..., albumId=0) at /build/buildd/digikam2-2.0.0/core/libs/database/collectionscanner.cpp:945
#11 0x005b52eb in Digikam::CollectionScanner::scanAlbum (this=0xb0b8406c, location=..., album=...) at /build/buildd/digikam2-2.0.0/core/libs/database/collectionscanner.cpp:801
#12 0x005b794c in Digikam::CollectionScanner::partialScan (this=0xb0b8406c, albumRoot=..., album=...) at /build/buildd/digikam2-2.0.0/core/libs/database/collectionscanner.cpp:421
#13 0x005b7d24 in Digikam::CollectionScanner::partialScan (this=0xb0b8406c, filePath=...) at /build/buildd/digikam2-2.0.0/core/libs/database/collectionscanner.cpp:353
#14 0x081e4a53 in Digikam::ScanController::run (this=0xa52e598) at /build/buildd/digikam2-2.0.0/core/digikam/database/scancontroller.cpp:659
#15 0x071a4da2 in QThreadPrivate::start (arg=0xa52e598) at thread/qthread_unix.cpp:320
#16 0x03dfe9cd in ?? () from /usr/lib/nvidia-current/libGL.so.1
#17 0x0221773e in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 10 (Thread 0xb0383b70 (LWP 4047)):
#0  0x00ff3d7a in ?? () from /usr/lib/i386-linux-gnu/libgthread-2.0.so.0
#1  0x05001482 in g_thread_self () from /lib/i386-linux-gnu/libglib-2.0.so.0
#2  0x04fd5572 in g_main_context_acquire () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0x04fd6dde in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0x04fd7524 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5  0x072c6577 in QEventDispatcherGlib::processEvents (this=0xa6c8a50, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#6  0x07298289 in QEventLoop::processEvents (this=0xb0383020, flags=...) at kernel/qeventloop.cpp:149
#7  0x07298522 in QEventLoop::exec (this=0xb0383020, flags=...) at kernel/qeventloop.cpp:201
#8  0x071a22a0 in QThread::exec (this=0xa52d3a8) at thread/qthread.cpp:492
#9  0x07279fdb in QInotifyFileSystemWatcherEngine::run (this=0xa52d3a8) at io/qfilesystemwatcher_inotify.cpp:248
#10 0x071a4da2 in QThreadPrivate::start (arg=0xa52d3a8) at thread/qthread_unix.cpp:320
#11 0x03dfe9cd in ?? () from /usr/lib/nvidia-current/libGL.so.1
#12 0x0221773e in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 9 (Thread 0xafb82b70 (LWP 4049)):
#0  0x00ff7416 in __kernel_vsyscall ()
#1  0x007d648c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i386-linux-gnu/libpthread.so.0
#2  0x022253fd in pthread_cond_wait () from /lib/i386-linux-gnu/libc.so.6
#3  0x071a5467 in wait (this=0xa789cb8, mutex=0xa789cb4, time=4294967295) at thread/qwaitcondition_unix.cpp:88
#4  QWaitCondition::wait (this=0xa789cb8, mutex=0xa789cb4, time=4294967295) at thread/qwaitcondition_unix.cpp:160
#5  0x028cd82a in Digikam::ParkingThread::run (this=0xa789ca8) at /build/buildd/digikam2-2.0.0/core/libs/threads/threadmanager.cpp:119
#6  0x071a4da2 in QThreadPrivate::start (arg=0xa789ca8) at thread/qthread_unix.cpp:320
#7  0x03dfe9cd in ?? () from /usr/lib/nvidia-current/libGL.so.1
#8  0x0221773e in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 8 (Thread 0xa3bfeb70 (LWP 4056)):
#0  timerSourcePrepareHelper (src=0xa7c37810, timeout=0xa3bfde5c) at kernel/qeventdispatcher_glib.cpp:135
#1  0x072c5dcd in timerSourcePrepare (source=0xa7c37810, timeout=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:169
#2  0x04fd5fd4 in g_main_context_prepare () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0x04fd6e63 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0x04fd7524 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5  0x072c6577 in QEventDispatcherGlib::processEvents (this=0xb361328, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#6  0x07298289 in QEventLoop::processEvents (this=0xa3bfe030, flags=...) at kernel/qeventloop.cpp:149
#7  0x07298522 in QEventLoop::exec (this=0xa3bfe030, flags=...) at kernel/qeventloop.cpp:201
#8  0x028cce75 in Digikam::WorkerObjectRunnable::run (this=0xbc5aba0) at /build/buildd/digikam2-2.0.0/core/libs/threads/threadmanager.cpp:196
#9  0x07198866 in QThreadPoolThread::run (this=0xb359a60) at concurrent/qthreadpool.cpp:106
#10 0x071a4da2 in QThreadPrivate::start (arg=0xb359a60) at thread/qthread_unix.cpp:320
#11 0x03dfe9cd in ?? () from /usr/lib/nvidia-current/libGL.so.1
#12 0x0221773e in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 7 (Thread 0xa7bffb70 (LWP 4060)):
#0  0x005078de in ?? () from /usr/lib/i386-linux-gnu/libgomp.so.1
#1  0x00507991 in ?? () from /usr/lib/i386-linux-gnu/libgomp.so.1
#2  0x00506225 in ?? () from /usr/lib/i386-linux-gnu/libgomp.so.1
#3  0x03dfe9cd in ?? () from /usr/lib/nvidia-current/libGL.so.1
#4  0x0221773e in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 6 (Thread 0xa6dedb70 (LWP 4072)):
#0  0x007d436b in pthread_mutex_lock () from /lib/i386-linux-gnu/libpthread.so.0
#1  0x02225616 in pthread_mutex_lock () from /lib/i386-linux-gnu/libc.so.6
#2  0x04fd6009 in g_main_context_prepare () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0x04fd6e63 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0x04fd7524 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5  0x072c6577 in QEventDispatcherGlib::processEvents (this=0xbb7ae20, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#6  0x07298289 in QEventLoop::processEvents (this=0xa6ded030, flags=...) at kernel/qeventloop.cpp:149
#7  0x07298522 in QEventLoop::exec (this=0xa6ded030, flags=...) at kernel/qeventloop.cpp:201
#8  0x028cce75 in Digikam::WorkerObjectRunnable::run (this=0xa7cb2570) at /build/buildd/digikam2-2.0.0/core/libs/threads/threadmanager.cpp:196
#9  0x07198866 in QThreadPoolThread::run (this=0xb6f9960) at concurrent/qthreadpool.cpp:106
#10 0x071a4da2 in QThreadPrivate::start (arg=0xb6f9960) at thread/qthread_unix.cpp:320
#11 0x03dfe9cd in ?? () from /usr/lib/nvidia-current/libGL.so.1
#12 0x0221773e in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 5 (Thread 0xa65ecb70 (LWP 4073)):
#0  0x03939d70 in sqlite3_errmsg16 () from /usr/lib/i386-linux-gnu/libsqlite3.so.0
#1  0x06fbb517 in qMakeError (access=<value optimized out>, descr=..., type=QSqlError::ConnectionError, errorCode=10) at ../../../sql/drivers/sqlite/qsql_sqlite.cpp:98
#2  0x06fbdab3 in QSQLiteResultPrivate::fetchNext (this=0xa7c7ee88, values=..., idx=0, initialFetch=true) at ../../../sql/drivers/sqlite/qsql_sqlite.cpp:276
#3  0x06fbe9aa in QSQLiteResult::exec (this=0xa7c47370) at ../../../sql/drivers/sqlite/qsql_sqlite.cpp:410
#4  0x00519752 in QSqlQuery::exec (this=0xa65ebb08) at kernel/qsqlquery.cpp:943
#5  0x0285d826 in Digikam::DatabaseCoreBackend::exec (this=0xa6d5a10, query=...) at /build/buildd/digikam2-2.0.0/core/libs/database/databasecorebackend.cpp:1405
#6  0x0285da43 in Digikam::DatabaseCoreBackend::execQuery (this=0xa6d5a10, query=..., boundValue1=..., boundValue2=..., boundValue3=..., boundValue4=...) at /build/buildd/digikam2-2.0.0/core/libs/database/databasecorebackend.cpp:1077
#7  0x0285daae in Digikam::DatabaseCoreBackend::execQuery (this=0xa6d5a10, sql=..., boundValue1=..., boundValue2=..., boundValue3=..., boundValue4=...) at /build/buildd/digikam2-2.0.0/core/libs/database/databasecorebackend.cpp:1022
#8  0x0285f895 in Digikam::DatabaseCoreBackend::execSql (this=0xa6d5a10, sql=..., boundValue1=..., boundValue2=..., boundValue3=..., boundValue4=..., values=0x0, lastInsertId=0xa65ebbc0) at /build/buildd/digikam2-2.0.0/core/libs/database/databasecorebackend.cpp:921
#9  0x0286b46f in Digikam::ThumbnailDB::insertThumbnail (this=0xa712360, info=..., lastInsertId=0xa65ebc3c) at /build/buildd/digikam2-2.0.0/core/libs/database/thumbnaildb.cpp:262
#10 0x028a2565 in Digikam::ThumbnailCreator::storeInDatabase (this=0xaa1ae08, info=..., image=...) at /build/buildd/digikam2-2.0.0/core/libs/threadimageio/thumbnailcreator.cpp:753
#11 0x028a81c6 in Digikam::ThumbnailCreator::load (this=0xaa1ae08, path=..., rect=..., pregenerate=false) at /build/buildd/digikam2-2.0.0/core/libs/threadimageio/thumbnailcreator.cpp:264
#12 0x028a8a9b in Digikam::ThumbnailCreator::load (this=0xaa1ae08, path=...) at /build/buildd/digikam2-2.0.0/core/libs/threadimageio/thumbnailcreator.cpp:196
#13 0x028b9477 in Digikam::ThumbnailLoadingTask::execute (this=0xbd7c168) at /build/buildd/digikam2-2.0.0/core/libs/threadimageio/thumbnailtask.cpp:169
#14 0x028882b0 in Digikam::LoadSaveThread::run (this=0xaa0f408) at /build/buildd/digikam2-2.0.0/core/libs/threadimageio/loadsavethread.cpp:118
#15 0x028cf010 in Digikam::DynamicThread::DynamicThreadPriv::run (this=0xaa1ada8) at /build/buildd/digikam2-2.0.0/core/libs/threads/dynamicthread.cpp:328
#16 0x07198866 in QThreadPoolThread::run (this=0xad3e7f0) at concurrent/qthreadpool.cpp:106
#17 0x071a4da2 in QThreadPrivate::start (arg=0xad3e7f0) at thread/qthread_unix.cpp:320
#18 0x03dfe9cd in ?? () from /usr/lib/nvidia-current/libGL.so.1
#19 0x0221773e in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 4 (Thread 0xb34c0b70 (LWP 4083)):
#0  0x005078de in ?? () from /usr/lib/i386-linux-gnu/libgomp.so.1
#1  0x00507991 in ?? () from /usr/lib/i386-linux-gnu/libgomp.so.1
#2  0x00506225 in ?? () from /usr/lib/i386-linux-gnu/libgomp.so.1
#3  0x03dfe9cd in ?? () from /usr/lib/nvidia-current/libGL.so.1
#4  0x0221773e in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 3 (Thread 0xa46ffb70 (LWP 4088)):
#0  0x005078de in ?? () from /usr/lib/i386-linux-gnu/libgomp.so.1
#1  0x00507991 in ?? () from /usr/lib/i386-linux-gnu/libgomp.so.1
#2  0x00506225 in ?? () from /usr/lib/i386-linux-gnu/libgomp.so.1
#3  0x03dfe9cd in ?? () from /usr/lib/nvidia-current/libGL.so.1
#4  0x0221773e in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 2 (Thread 0xa85dcb70 (LWP 4089)):
[KCrash Handler]
#7  0x0225bab0 in ?? () from /lib/i386-linux-gnu/libc.so.6
#8  0x01e4a0ab in _TIFFmemcpy () from /usr/lib/i386-linux-gnu/libtiff.so.4
#9  0x01e24967 in ?? () from /usr/lib/i386-linux-gnu/libtiff.so.4
#10 0x01e47ec6 in TIFFReadEncodedStrip () from /usr/lib/i386-linux-gnu/libtiff.so.4
#11 0x026f5bd3 in Digikam::TIFFLoader::load (this=0xa85db730, filePath=..., observer=0xbdaee60) at /build/buildd/digikam2-2.0.0/core/libs/dimg/loaders/tiffloader.cpp:327
#12 0x026ce4ec in Digikam::DImg::load (this=0xa85dbb5c, filePath=..., loadFlagsInt=13, observer=0xbdaee60, rawDecodingSettings=...) at /build/buildd/digikam2-2.0.0/core/libs/dimg/dimg.cpp:440
#13 0x026cf715 in Digikam::DImg::load (this=0xa85dbb5c, filePath=..., loadMetadata=false, loadICCData=true, loadUniqueHash=false, loadImageHistory=false, observer=0xbdaee60, rawDecodingSettings=...) at /build/buildd/digikam2-2.0.0/core/libs/dimg/dimg.cpp:397
#14 0x028a6916 in Digikam::ThumbnailCreator::loadWithDImg (this=0xb1be1d8, path=..., profile=0xa85dbc80) at /build/buildd/digikam2-2.0.0/core/libs/threadimageio/thumbnailcreator.cpp:558
#15 0x028a7450 in Digikam::ThumbnailCreator::createThumbnail (this=0xb1be1d8, info=..., detailRect=..., isFace=false) at /build/buildd/digikam2-2.0.0/core/libs/threadimageio/thumbnailcreator.cpp:487
#16 0x028a7be9 in Digikam::ThumbnailCreator::load (this=0xb1be1d8, path=..., rect=..., pregenerate=false) at /build/buildd/digikam2-2.0.0/core/libs/threadimageio/thumbnailcreator.cpp:257
#17 0x028a8a9b in Digikam::ThumbnailCreator::load (this=0xb1be1d8, path=...) at /build/buildd/digikam2-2.0.0/core/libs/threadimageio/thumbnailcreator.cpp:196
#18 0x028b9477 in Digikam::ThumbnailLoadingTask::execute (this=0xbdaee58) at /build/buildd/digikam2-2.0.0/core/libs/threadimageio/thumbnailtask.cpp:169
#19 0x028882b0 in Digikam::LoadSaveThread::run (this=0xb1a61c0) at /build/buildd/digikam2-2.0.0/core/libs/threadimageio/loadsavethread.cpp:118
#20 0x028cf010 in Digikam::DynamicThread::DynamicThreadPriv::run (this=0xb1bfee8) at /build/buildd/digikam2-2.0.0/core/libs/threads/dynamicthread.cpp:328
#21 0x07198866 in QThreadPoolThread::run (this=0xbaa78f0) at concurrent/qthreadpool.cpp:106
#22 0x071a4da2 in QThreadPrivate::start (arg=0xbaa78f0) at thread/qthread_unix.cpp:320
#23 0x03dfe9cd in ?? () from /usr/lib/nvidia-current/libGL.so.1
#24 0x0221773e in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 1 (Thread 0xb3f9fb10 (LWP 4041)):
#0  0x00ff7416 in __kernel_vsyscall ()
#1  0x007d648c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i386-linux-gnu/libpthread.so.0
#2  0x022253fd in pthread_cond_wait () from /lib/i386-linux-gnu/libc.so.6
#3  0x071a5467 in wait (this=0xb1bff0c, mutex=0xb1bff08, time=4294967295) at thread/qwaitcondition_unix.cpp:88
#4  QWaitCondition::wait (this=0xb1bff0c, mutex=0xb1bff08, time=4294967295) at thread/qwaitcondition_unix.cpp:160
#5  0x028cf0a4 in Digikam::DynamicThread::wait (this=0xb1a61c0, locker=...) at /build/buildd/digikam2-2.0.0/core/libs/threads/dynamicthread.cpp:348
#6  0x028cf267 in Digikam::DynamicThread::shutDown (this=0xb1a61c0) at /build/buildd/digikam2-2.0.0/core/libs/threads/dynamicthread.cpp:103
#7  0x0288d860 in Digikam::ManagedLoadSaveThread::shutDown (this=0xb1a61c0) at /build/buildd/digikam2-2.0.0/core/libs/threadimageio/managedloadsavethread.cpp:91
#8  0x028ab5e6 in Digikam::ThumbnailLoadThread::~ThumbnailLoadThread (this=0xb1a61c0, __in_chrg=<value optimized out>) at /build/buildd/digikam2-2.0.0/core/libs/threadimageio/thumbnailloadthread.cpp:176
#9  0x028ab742 in Digikam::ThumbnailLoadThread::~ThumbnailLoadThread (this=0xb1a61c0, __in_chrg=<value optimized out>) at /build/buildd/digikam2-2.0.0/core/libs/threadimageio/thumbnailloadthread.cpp:179
#10 0x028a91a5 in destroy () at /build/buildd/digikam2-2.0.0/core/libs/threadimageio/thumbnailloadthread.cpp:152
#11 0x026e9f9b in KCleanUpGlobalStatic::~KCleanUpGlobalStatic (this=0x2adf8d8, __in_chrg=<value optimized out>) at /usr/include/kglobal.h:62
#12 0x02176a6f in ?? () from /lib/i386-linux-gnu/libc.so.6
#13 0x02176acf in exit () from /lib/i386-linux-gnu/libc.so.6
#14 0x09d23a90 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#15 0x03bb011a in KApplication::xioErrhandler (this=0xbfde040c, dpy=0xa503ea0) at ../../kdeui/kernel/kapplication.cpp:419
#16 0x03bb0156 in kde_xio_errhandler (dpy=0xa503ea0) at ../../kdeui/kernel/kapplication.cpp:126
#17 0x023ec166 in _XIOError () from /usr/lib/i386-linux-gnu/libX11.so.6
#18 0x023e981f in _XEventsQueued () from /usr/lib/i386-linux-gnu/libX11.so.6
#19 0x023da4eb in XEventsQueued () from /usr/lib/i386-linux-gnu/libX11.so.6
#20 0x06580042 in x11EventSourcePrepare (s=0xa4ebb60, timeout=0xbfde00dc) at kernel/qguieventdispatcher_glib.cpp:77
#21 0x04fd5fd4 in g_main_context_prepare () from /lib/i386-linux-gnu/libglib-2.0.so.0
#22 0x04fd6e63 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#23 0x04fd7524 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#24 0x072c6577 in QEventDispatcherGlib::processEvents (this=0xa48c7a8, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#25 0x065801e5 in QGuiEventDispatcherGlib::processEvents (this=0xa48c7a8, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#26 0x07298289 in QEventLoop::processEvents (this=0xbfde02d4, flags=...) at kernel/qeventloop.cpp:149
#27 0x07298522 in QEventLoop::exec (this=0xbfde02d4, flags=...) at kernel/qeventloop.cpp:201
#28 0x0729cecc in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1008
#29 0x064c78e7 in QApplication::exec () at kernel/qapplication.cpp:3736
#30 0x082be083 in main (argc=) at /build/buildd/digikam2-2.0.0/core/digikam/main/main.cpp:232

Rapporter à https://bugs.kde.org

Reproducible: Always

Steps to Reproduce:
Select a picture with 3 stars rating. Click on the first one to have 1 star only. Click on this star to have no more star -> crash


Expected Results:  
Just no more star for the picture, and go on.
Comment 1 philippe.quaglia 2011-08-19 10:41:21 UTC
I have encountered this bug many time again, even when rating the thumbnails in line above the main window.
Also, It appears that the name of the picture I was rating has been changed by digikam ! In that case, the file "Numb01_01.tif" has been renamed "Numb01_01.tif15671". The extension has been changed, and digikam does not catalog it. Very strange !
Comment 2 caulier.gilles 2011-08-23 08:24:04 UTC
Crash appear in libtiff, in digiKam tiff loader. which libtiff version you use ? Go to Help/Components Info for details.

Gilles Caulier
Comment 3 philippe.quaglia 2011-08-23 16:29:53 UTC
Hello Gilles, here is a copy of the componant info window:

digiKam version 2.0.0
Dématriçage parallélisé: Oui
Exiv2 peut écrire dans un fichier JP2: Oui
Exiv2 peut écrire dans un fichier JPEG: Oui
Exiv2 peut écrire dans un fichier PGF: Oui
Exiv2 peut écrire dans un fichier PNG: Oui
Exiv2 peut écrire dans un fichier TIFF: Oui
Exiv2 prend en charge les métadonnées XMP: Oui
LibCImg: 130
LibClapack: bibliothèque interne
LibExiv2: 0.21.1
LibJPEG: 62
LibJasper: 1.900.1
LibKDE: 4.6.2 (4.6.2)
LibKExiv2: 2.0.0
LibKGeoMap: 2.0.0
LibKdcraw: 2.0.0
LibLCMS: 118
LibPGF: 6.11.24 - bibliothèque interne
LibPNG: 1.2.44
LibQt: 4.7.2
LibRaw: 0.13.7
LibTIFF: LIBTIFF, Version 3.9.4 Copyright (c) 1988-1996 Sam Leffler 
Copyright (c) 1991-1996 Silicon Graphics, Inc.
Marble Widget: 0.11.2 (Stable Release)
LibGphoto2: 2.4.11
LibKface: 2.0.0
LibKipi: 1.2.0
LibOpenCV: 2.3.0
Libface: 0.2
Moteur de base de données: QSQLITE


Best regards.

Le 23/08/2011 10:24, Gilles Caulier a écrit :
> https://bugs.kde.org/show_bug.cgi?id=280142
>
>
> Gilles Caulier<caulier.gilles@gmail.com>  changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                   CC|                            |caulier.gilles@gmail.com
>
>
>
>
> --- Comment #2 from Gilles Caulier<caulier gilles gmail com>   2011-08-23 08:24:04 ---
> Crash appear in libtiff, in digiKam tiff loader. which libtiff version you use
> ? Go to Help/Components Info for details.
>
> Gilles Caulier
>
Comment 4 Marcel Wiesweg 2011-08-26 16:34:25 UTC
Is the bug only reproducible with TIFF images? Can you reproduce it with multiple images, or is there a specific one? Have you enabled writing tags to image metadata? Does it still crash if you disable?

Do you get the same backtrace if you run digikam under gdb:
gdb digikam
run
<provoke crash>
bt
?
Comment 5 philippe.quaglia 2011-08-28 18:59:50 UTC
Hello Marcel,
sorry for the delay for answering, I did not had time to make some 
tests. I will do some in the next days. However, I can tell that the 
crash is reproducible with many different pictures, but I only have 
tested with .Tiff pictures. It is clearly not linked with one specific 
picture. I do have enabled writing tags to image metadata.
I will do some tests to answer your other questions.
Best regards.


Le 26/08/2011 18:34, Marcel Wiesweg a écrit :
> https://bugs.kde.org/show_bug.cgi?id=280142
>
>
>
>
>
> --- Comment #4 from Marcel Wiesweg<marcel wiesweg gmx de>   2011-08-26 16:34:25 ---
> Is the bug only reproducible with TIFF images? Can you reproduce it with
> multiple images, or is there a specific one? Have you enabled writing tags to
> image metadata? Does it still crash if you disable?
>
> Do you get the same backtrace if you run digikam under gdb:
> gdb digikam
> run
> <provoke crash>
> bt
> ?
>
Comment 6 philippe.quaglia 2011-09-16 12:37:26 UTC
Hello Marcel,
I did some more tests this morning.
Apparently, the bug does not occur anymore if I disable the tag writing 
in image metadata. I did experience it with many different images. As I 
already reported, it sometimes have change my picture file (at least 
rename it). It look like that it happen also with .jpg.
Hope this helps.
Best regards, and thanks for the latest release.


Le 26/08/2011 18:34, Marcel Wiesweg a écrit :
> https://bugs.kde.org/show_bug.cgi?id=280142
>
>
>
>
>
> --- Comment #4 from Marcel Wiesweg<marcel wiesweg gmx de>   2011-08-26 16:34:25 ---
> Is the bug only reproducible with TIFF images? Can you reproduce it with
> multiple images, or is there a specific one? Have you enabled writing tags to
> image metadata? Does it still crash if you disable?
>
> Do you get the same backtrace if you run digikam under gdb:
> gdb digikam
> run
> <provoke crash>
> bt
> ?
>
Comment 7 caulier.gilles 2011-09-16 13:19:53 UTC
As i can see in backtrace, it's fully relevant of Exiv2 library. This is why crash disapear when you disable this option.

Can you reproduce the crash when you try to change something in image metadata using Exiv2 command line tool ?

Gilles Caulier
Comment 8 Marcel Wiesweg 2011-09-17 15:09:48 UTC
In thread 11, we have the ImageScanner scanning a new file. Not a changed or moved file, but one that was never seen before. More information could be gathered from console output.
In thread 2, we have the thumbnail thread create a thumbnail from a file, probably in the currently opened album. We cannot know if the file was changed or new. The crash occurs deep inside libtiff.

The x.org crash handler has already been called in thread 1, so some time after the crash has passed. Crashing digikam under gdb may give a more reliable bt (or confirm this unusual one)
Comment 9 Marcel Wiesweg 2011-09-25 13:55:13 UTC
Philippe: See http://www.digikam.org/drupal/contrib how to create a backtrace with digikam running under gdb
Comment 10 philippe.quaglia 2011-09-29 18:34:53 UTC
I get a crash this evening, using gdb.
Here is the backtrace. I hope this helps:

(gdb) bt
#0  0x04329326 in ?? () from /usr/lib/i386-linux-gnu/libtiff.so.4
#1  0x04333fa1 in ?? () from /usr/lib/i386-linux-gnu/libtiff.so.4
#2  0x04337ec6 in TIFFReadEncodedStrip ()
    from /usr/lib/i386-linux-gnu/libtiff.so.4
#3  0x0431fb1d in ?? () from /usr/lib/i386-linux-gnu/libtiff.so.4
#4  0x04321b92 in TIFFRGBAImageGet () from 
/usr/lib/i386-linux-gnu/libtiff.so.4
#5  0x00f5994b in Digikam::TIFFLoader::load (this=0xa62fd620, filePath=...,
     observer=0xa131830)
     at 
/build/buildd/digikam2-2.1.1/core/libs/dimg/loaders/tiffloader.cpp:605
#6  0x00f31c7c in Digikam::DImg::load (this=0xa131998, filePath=...,
     loadFlagsInt=63, observer=0xa131830, rawDecodingSettings=...)
     at /build/buildd/digikam2-2.1.1/core/libs/dimg/dimg.cpp:443
#7  0x00f33263 in Digikam::DImg::load (this=0xa131998, filePath=...,
     observer=0xa131830, rawDecodingSettings=...)
     at /build/buildd/digikam2-2.1.1/core/libs/dimg/dimg.cpp:372
#8  0x01103d12 in Digikam::PreviewLoadingTask::execute (this=0xa131828)
     at 
/build/buildd/digikam2-2.1.1/core/libs/threadimageio/previewtask.cpp:294
#9  0x010ed220 in Digikam::LoadSaveThread::run (this=0x8c0c710)
     at 
/build/buildd/digikam2-2.1.1/core/libs/threadimageio/loadsavethread.cpp:118
#10 0x01134020 in Digikam::DynamicThread::DynamicThreadPriv::run (
---Type <return> to continue, or q <return> to quit---
     this=0x8c0c7a8)
     at /build/buildd/digikam2-2.1.1/core/libs/threads/dynamicthread.cpp:328
#11 0x02d5b866 in QThreadPoolThread::run (this=0x96a31a0)
     at concurrent/qthreadpool.cpp:106
#12 0x02d67da2 in QThreadPrivate::start (arg=0x96a31a0)
     at thread/qthread_unix.cpp:320
#13 0x03391e99 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#14 0x032fb73e in clone () from /lib/i386-linux-gnu/libc.so.6


Le 25/09/2011 15:55, Marcel Wiesweg a écrit :
> https://bugs.kde.org/show_bug.cgi?id=280142
>
>
>
>
>
> --- Comment #9 from Marcel Wiesweg<marcel wiesweg gmx de>   2011-09-25 13:55:13 ---
> Philippe: See http://www.digikam.org/drupal/contrib how to create a backtrace
> with digikam running under gdb
>
Comment 11 Marcel Wiesweg 2011-10-07 16:33:47 UTC
The trace confirms that the crash occurs in libtiff (this time, not a 16bit image as above but an 8bit image, so the traces are slightly different).
Apparently, the metadata was written to the image, changing the timestamp and causing a thumbnail recreation. All fine so far.

I assume loading these images normally (in preview or editor) is no problem, so the situation of concurrent exiv2 write access and libtiff reading, or some other involved memory corruption, is necessary to trigger the problem.

I would recommend to try with current git (or wait for 2.3) and, if still reproducible, try to reproduce with digikam running under valgrind to rule out memory corruption.
Comment 12 philippe.quaglia 2011-11-22 19:17:29 UTC
Hello. bug is still there in release 2.3.0. Happens always if I make two or more fast clicks. Moreover. the image file is duplicated with a modified name (a numerical extension is added) and the original file is empty: for example, I now have one file: "Vanoise1999.tif" of 0 octets and one file "Vanoise1999.tif12155" of 76,7 Mo.
Here is the corresponding backtrace:

philippe@philippe-P5E:~$ gdb digikam
GNU gdb (Ubuntu/Linaro 7.3-0ubuntu2) 7.3-2011.08
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /usr/bin/digikam...Reading symbols from /usr/lib/debug/usr/bin/digikam...done.
done.
(gdb) run
Starting program: /usr/bin/digikam 
[Thread debugging using libthread_db enabled]

(digikam:12155): Gtk-WARNING **: Impossible de trouver le moteur de thème dans module_path : « pixmap »

(digikam:12155): Gtk-WARNING **: Impossible de trouver le moteur de thème dans module_path : « pixmap »

(digikam:12155): Gtk-WARNING **: Impossible de trouver le moteur de thème dans module_path : « pixmap »

(digikam:12155): Gtk-WARNING **: Impossible de trouver le moteur de thème dans module_path : « pixmap »
[New Thread 0xaf338b70 (LWP 12258)]
[New Thread 0xae9ffb70 (LWP 12259)]
[New Thread 0xad5f4b70 (LWP 12260)]
[New Thread 0xacdf3b70 (LWP 12261)]
[New Thread 0xac5f2b70 (LWP 12262)]
QSqlDatabasePrivate::removeDatabase: connection 'ConnectionTest' is still in use, all queries will cease to work.
[Thread 0xac5f2b70 (LWP 12262) exited]
[New Thread 0xac5f2b70 (LWP 12283)]
[New Thread 0xa4d84b70 (LWP 12284)]
[Thread 0xa4d84b70 (LWP 12284) exited]
[New Thread 0xa4d84b70 (LWP 12285)]
[New Thread 0xa04f0b70 (LWP 12286)]
[Thread 0xa4d84b70 (LWP 12285) exited]
[Thread 0xa04f0b70 (LWP 12286) exited]
digikam(12155)/digikam (core) Digikam::ImageInfoJob::slotResult: Failed to list url:  "" 
digikam(12155)/digikam (core) Digikam::ImageInfoJob::slotResult: Failed to list url:  "" 
[New Thread 0xa04f0b70 (LWP 12302)]
[Thread 0xaf338b70 (LWP 12258) exited]
[New Thread 0xaf338b70 (LWP 12366)]
void DBusMenuExporterPrivate::fillLayoutItem(DBusMenuLayoutItem*, QMenu*, int, int, const QStringList&): No id for action 
void DBusMenuExporterPrivate::fillLayoutItem(DBusMenuLayoutItem*, QMenu*, int, int, const QStringList&): No id for action 
void DBusMenuExporterPrivate::fillLayoutItem(DBusMenuLayoutItem*, QMenu*, int, int, const QStringList&): No id for action 
void DBusMenuExporterPrivate::fillLayoutItem(DBusMenuLayoutItem*, QMenu*, int, int, const QStringList&): No id for action 
void DBusMenuExporterPrivate::fillLayoutItem(DBusMenuLayoutItem*, QMenu*, int, int, const QStringList&): No id for action 
void DBusMenuExporterPrivate::fillLayoutItem(DBusMenuLayoutItem*, QMenu*, int, int, const QStringList&): No id for action 
void DBusMenuExporterPrivate::fillLayoutItem(DBusMenuLayoutItem*, QMenu*, int, int, const QStringList&): No id for action 
void DBusMenuExporterPrivate::fillLayoutItem(DBusMenuLayoutItem*, QMenu*, int, int, const QStringList&): No id for action 
void DBusMenuExporterPrivate::fillLayoutItem(DBusMenuLayoutItem*, QMenu*, int, int, const QStringList&): No id for action 
void DBusMenuExporterPrivate::fillLayoutItem(DBusMenuLayoutItem*, QMenu*, int, int, const QStringList&): No id for action 
void DBusMenuExporterPrivate::fillLayoutItem(DBusMenuLayoutItem*, QMenu*, int, int, const QStringList&): No id for action 
void DBusMenuExporterPrivate::fillLayoutItem(DBusMenuLayoutItem*, QMenu*, int, int, const QStringList&): No id for action 
[New Thread 0xa4d84b70 (LWP 12367)]
[New Thread 0xa2e9fb70 (LWP 12368)]
[New Thread 0xa269eb70 (LWP 12369)]
[New Thread 0x8cc14b70 (LWP 12370)]
[New Thread 0xa1cffb70 (LWP 12383)]
[New Thread 0xa12ffb70 (LWP 12384)]
digikam(12155)/digikam (core) Digikam::CollectionScanner::scanAlbum: Folder does not exist or is not readable:  "/home/philippe/Images/PelliculeMarielleVanoise1996/Vanoise1999.tif12155" 
digikam(12155)/digikam (core) Digikam::CollectionScanner::scanAlbum: Folder does not exist or is not readable:  "/home/philippe/Images/PelliculeMarielleVanoise1996/Vanoise1999.tif" 

Program received signal SIGBUS, Bus error.
[Switching to Thread 0xa4d84b70 (LWP 12367)]
0xb3fa1aa0 in ?? () from /usr/lib/i386-linux-gnu/libtiff.so.4
Comment 13 caulier.gilles 2011-11-22 20:43:53 UTC
Your last trace is not suitable.

To get a better backtrace, please run digiKam through GDB like this :

http://www.digikam.org/drupal/contrib

Gilles Cauier
Comment 14 philippe.quaglia 2011-11-24 18:07:37 UTC
New bt follwing Gille's instructions:

Program received signal SIGBUS, Bus error.
[Switching to Thread 0xa09ffb70 (LWP 19132)]
0xb3fa1aa0 in ?? () from /usr/lib/i386-linux-gnu/libtiff.so.4
(gdb) bt
#0  0xb3fa1aa0 in ?? () from /usr/lib/i386-linux-gnu/libtiff.so.4
#1  0xb3fad3f0 in ?? () from /usr/lib/i386-linux-gnu/libtiff.so.4
#2  0xb3fb1411 in TIFFReadEncodedStrip ()
   from /usr/lib/i386-linux-gnu/libtiff.so.4
#3  0xb3f98053 in ?? () from /usr/lib/i386-linux-gnu/libtiff.so.4
#4  0xb3f9a295 in TIFFRGBAImageGet () from /usr/lib/i386-linux-gnu/libtiff.so.4
#5  0xb7135be1 in Digikam::TIFFLoader::load (this=0xa09fe7a0, filePath=..., 
    observer=0xa0dc1a8)
    at /build/buildd/digikam-2.3.0/core/libs/dimg/loaders/tiffloader.cpp:605
#6  0xb710cf28 in Digikam::DImg::load (this=0xa09fec24, filePath=..., 
    loadFlagsInt=13, observer=0xa0dc1a8, rawDecodingSettings=...)
    at /build/buildd/digikam-2.3.0/core/libs/dimg/dimg.cpp:444
#7  0xb710dece in Digikam::DImg::load (this=0xa09fec24, filePath=..., 
    loadMetadata=false, loadICCData=true, loadUniqueHash=false, 
    loadImageHistory=false, observer=0xa0dc1a8, rawDecodingSettings=...)
    at /build/buildd/digikam-2.3.0/core/libs/dimg/dimg.cpp:401
#8  0xb7308edd in Digikam::ThumbnailCreator::loadWithDImg (this=0x8b7e368, 
    path=..., profile=0xa09fed10)
    at /build/buildd/digikam-2.3.0/core/libs/threadimageio/thumbnailcreator.cpp:558
#9  0xb7309b89 in Digikam::ThumbnailCreator::createThumbnail (this=0x8b7e368, 
    info=..., detailRect=..., isFace=false)
    at /build/buildd/digikam-2.3.0/core/libs/threadimageio/thumbnailcreator.cpp:---Type <return> to continue, or q <return> to quit---
487
#10 0xb730a273 in Digikam::ThumbnailCreator::load (this=0x8b7e368, path=..., 
    rect=..., pregenerate=false)
    at /build/buildd/digikam-2.3.0/core/libs/threadimageio/thumbnailcreator.cpp:257
#11 0xb730b272 in Digikam::ThumbnailCreator::load (this=0x8b7e368, path=...)
    at /build/buildd/digikam-2.3.0/core/libs/threadimageio/thumbnailcreator.cpp:196
#12 0xb731b6c9 in Digikam::ThumbnailLoadingTask::execute (this=0xa0dc1a0)
    at /build/buildd/digikam-2.3.0/core/libs/threadimageio/thumbnailtask.cpp:169
#13 0xb72e7048 in Digikam::LoadSaveThread::run (this=0x8aad488)
    at /build/buildd/digikam-2.3.0/core/libs/threadimageio/loadsavethread.cpp:118
#14 0xb7332c1e in Digikam::DynamicThread::DynamicThreadPriv::run (
    this=0x8aad950)
    at /build/buildd/digikam-2.3.0/core/libs/threads/dynamicthread.cpp:328
#15 0xb53cf651 in QThreadPoolThread::run (this=0xaea6b688)
    at concurrent/qthreadpool.cpp:106
#16 0xb53db7b3 in QThreadPrivate::start (arg=0xaea6b688)
    at thread/qthread_unix.cpp:331
#17 0xb3f1cd31 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#18 0xb51180ce in clone () from /lib/i386-linux-gnu/libc.so.6
---Type <return> to continue, or q <return> to quit---
Backtrace stopped: Not enough registers or memory available to unwind further
(gdb)
Comment 15 caulier.gilles 2011-11-24 18:37:33 UTC
Philippe,

Crash occurs when TIFF thumbnail image is generated. libtiff crash in fact.

To continue investiguations, we need a tiff image sample to reproduce the crash here.

Try to find the relevant image which make the crash, and give us an url to donload it through internet

Gilles Caulier
Comment 16 philippe.quaglia 2011-11-25 09:55:13 UTC
Hello,
it happens with most of the big .Tiff files produced by my scanner. I have shared the image used in the last backtrace: 
http://ubuntuone.com/0h8bB9yyia5H7YBeCrMRPF
Comment 17 caulier.gilles 2011-11-25 10:08:34 UTC
Philippe,

No problem here with your image :

1/ no crash at startup when image is imported to DB
2/ no crash when thumb is generated
3/ no crash to load image in preview mode
4/ no crash when image is loaded in editor
5/ no crash when i assign/unassign star

http://www.flickr.com/photos/digikam/6398986193/sizes/o/in/photostream/

Gilles Caulier
Comment 18 philippe.quaglia 2011-11-26 13:48:40 UTC
As confirmed by Gilles, the crash occurs systematically if the rating is changed rapidly, i.e. two or 3 clicks in few seconds.
Comment 19 caulier.gilles 2012-02-29 04:33:53 UTC
*** Bug 295020 has been marked as a duplicate of this bug. ***
Comment 20 Marcel Wiesweg 2012-03-05 20:39:34 UTC
The read/write locking implemented for 2.6 may offer new aspects here  as well
Comment 21 Marcel Wiesweg 2012-04-21 15:26:21 UTC
*** Bug 298547 has been marked as a duplicate of this bug. ***
Comment 22 caulier.gilles 2012-06-03 21:10:47 UTC
*** Bug 301122 has been marked as a duplicate of this bug. ***
Comment 23 caulier.gilles 2012-06-22 08:50:45 UTC
Official digiKam 2.6.0 release is out since few days now :

http://www.digikam.org/drupal/node/656

Please, check if this entry still valid, or update report accordingly.

Thanks in advance.

Gilles Caulier
Comment 24 philippe.quaglia 2012-06-26 18:20:42 UTC
Hello,
I have perform some tests with release 2.6.0, and I have not been able to reproduce the bug. Good news, thanks for this release.
Comment 25 Axel Krebs 2012-06-26 19:55:48 UTC
Am 26.06.2012 20:20, schrieb philippe.quaglia@laposte.net:
> https://bugs.kde.org/show_bug.cgi?id=280142
> 
> philippe.quaglia@laposte.net changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>             Version|2.3.0                       |2.6.0
> 
> --- Comment #24 from philippe.quaglia@laposte.net ---
> Hello,
> I have perform some tests with release 2.6.0, and I have not been able to
> reproduce the bug. Good news, thanks for this release.
> 

I am happy, if "some tests" fit precisely the original bug. Good!

Axel
Comment 26 Axel Krebs 2012-09-01 12:44:05 UTC
Am 21.04.2012 17:26, schrieb Marcel Wiesweg:
> https://bugs.kde.org/show_bug.cgi?id=280142
> 
> Marcel Wiesweg <marcel.wiesweg@gmx.de> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |axel.krebs@t-online.de
> 
> --- Comment #21 from Marcel Wiesweg <marcel.wiesweg@gmx.de> ---
> *** Bug 298547 has been marked as a duplicate of this bug. ***
> 
Any news convcerning the externally modified tiff producing digiKam
crashes??


Axel