Bug 255930

Summary: Digikam crashes on start-up after throwing an instance of 'std::bad_alloc'
Product: [Applications] digikam Reporter: Jeff Robinson <jeffnik>
Component: Thumbs-EngineAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: caulier.gilles
Priority: NOR    
Version: 1.5.0   
Target Milestone: ---   
Platform: Slackware   
OS: Linux   
Latest Commit: Version Fixed In: 6.3.0
Sentry Crash Report:

Description Jeff Robinson 2010-11-03 01:43:58 UTC
Application: digikam (1.5.0)
KDE Platform Version: 4.4.3 (KDE 4.4.3)
Qt Version: 4.6.2
Operating System: Linux 2.6.33.4-smp i686
Distribution (Platform): Slackware Packages

-- Information about the crash:
Originally running Digikam 1.4 running the "find duplicates" function against my image collection caused Digikam to crash.

After upgrading to Digikam 1.5 (compiled from source) the program does not load past the splash screen.  On the console the following messages are printed:
QSqlDatabasePrivate::removeDatabase: connection 'ConnectionTest' is still in use, all queries will cease to work.
Time elapsed: 223 ms
Time elapsed: 32 ms
Model: Time elapsed: 335 ms
TextureColorizer: Time elapsed: 172 ms
Time elapsed: 14 ms
Time elapsed: 32 ms
Model: Time elapsed: 78 ms
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
KCrash: Application 'digikam' crashing...
sock_file=/home/jeffnik/.kde/socket-kilgore/kdeinit4__0

I have the "same" set-up on my laptop (same version of Slackware) with Digikam 1.5 and it works correctly.

The crash can be reproduced every time.

 -- Backtrace:
Application: digiKam (digikam), signal: Aborted
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib/libgobject-2.0.so.0.2200.5-gdb.py", line 9, in <module>
    from gobject import register
  File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module>
    import gdb.backtrace
ImportError: No module named backtrace
[Current thread is 1 (Thread 0xb252f740 (LWP 9998))]

Thread 13 (Thread 0xb0e52b70 (LWP 9999)):
#0  0xb4b16210 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0xb4bbc107 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x0832692a in Digikam::ScanController::run (this=0x8641718) at /usr/src/digikam-1.5.0/digikam/scancontroller.cpp:515
#3  0xb4bbb1de in ?? () from /usr/lib/libQtCore.so.4
#4  0xb4b11830 in start_thread () from /lib/libpthread.so.0
#5  0xb48dc15e in clone () from /lib/libc.so.6

Thread 12 (Thread 0xb0652b70 (LWP 10003)):
#0  0xb4b1549b in pthread_mutex_unlock () from /lib/libpthread.so.0
#1  0xb423ff26 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#2  0xb42406dc in ?? () from /usr/lib/libglib-2.0.so.0
#3  0xb4240ac3 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#4  0xb4ce8aef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0xb4cbb689 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0xb4cbbada in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#7  0xb4bb8478 in QThread::exec() () from /usr/lib/libQtCore.so.4
#8  0xb669441c in Digikam::ImageFilterModelWorker::Thread::run (this=0x8742dd8) at /usr/src/digikam-1.5.0/digikam/../libs/models/imagefiltermodelthreads.h:66
#9  0xb4bbb1de in ?? () from /usr/lib/libQtCore.so.4
#10 0xb4b11830 in start_thread () from /lib/libpthread.so.0
#11 0xb48dc15e in clone () from /lib/libc.so.6

Thread 11 (Thread 0xafddfb70 (LWP 10004)):
#0  0xb4b13fad in pthread_mutex_lock () from /lib/libpthread.so.0
#1  0xb424086f in ?? () from /usr/lib/libglib-2.0.so.0
#2  0xb4240ac3 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0xb4ce8aef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0xb4cbb689 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0xb4cbbada in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0xb4bb8478 in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0xb669441c in Digikam::ImageFilterModelWorker::Thread::run (this=0x8736568) at /usr/src/digikam-1.5.0/digikam/../libs/models/imagefiltermodelthreads.h:66
#8  0xb4bbb1de in ?? () from /usr/lib/libQtCore.so.4
#9  0xb4b11830 in start_thread () from /lib/libpthread.so.0
#10 0xb48dc15e in clone () from /lib/libc.so.6

Thread 10 (Thread 0xaf3ffb70 (LWP 10005)):
#0  0xb4b16210 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0xb4bbc107 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0xb69a9dd0 in Digikam::ParkingThread::run (this=0x87a8c28) at /usr/src/digikam-1.5.0/libs/threads/threadmanager.cpp:101
#3  0xb4bbb1de in ?? () from /usr/lib/libQtCore.so.4
#4  0xb4b11830 in start_thread () from /lib/libpthread.so.0
#5  0xb48dc15e in clone () from /lib/libc.so.6

Thread 9 (Thread 0xaebffb70 (LWP 10006)):
#0  0xb4b1546a in pthread_mutex_unlock () from /lib/libpthread.so.0
#1  0xb42401de in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
#2  0xb42405b1 in ?? () from /usr/lib/libglib-2.0.so.0
#3  0xb4240ac3 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#4  0xb4ce8aef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0xb4cbb689 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0xb4cbbada in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#7  0xb4bb8478 in QThread::exec() () from /usr/lib/libQtCore.so.4
#8  0xb4bbb1de in ?? () from /usr/lib/libQtCore.so.4
#9  0xb4b11830 in start_thread () from /lib/libpthread.so.0
#10 0xb48dc15e in clone () from /lib/libc.so.6

Thread 8 (Thread 0xae3ffb70 (LWP 10007)):
#0  0xb48d171c in poll () from /lib/libc.so.6
#1  0xb424d5cb in g_poll () from /usr/lib/libglib-2.0.so.0
#2  0xb42407cb in ?? () from /usr/lib/libglib-2.0.so.0
#3  0xb4240ac3 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#4  0xb4ce8aef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0xb4cbb689 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0xb4cbbada in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#7  0xb4bb8478 in QThread::exec() () from /usr/lib/libQtCore.so.4
#8  0xb4bbb1de in ?? () from /usr/lib/libQtCore.so.4
#9  0xb4b11830 in start_thread () from /lib/libpthread.so.0
#10 0xb48dc15e in clone () from /lib/libc.so.6

Thread 7 (Thread 0xac172b70 (LWP 10008)):
#0  0xb4b16528 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0xaf523f49 in ?? () from /usr/lib/libxine.so.1
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Thread 6 (Thread 0xab508b70 (LWP 10009)):
#0  0xb48d4597 in select () from /lib/libc.so.6
#1  0xaf54e2b4 in xine_usec_sleep () from /usr/lib/libxine.so.1
#2  0x00000000 in ?? ()

Thread 5 (Thread 0xaad08b70 (LWP 10010)):
#0  0xb4ce8d70 in ?? () from /usr/lib/libQtCore.so.4
#1  0xb42401f0 in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
#2  0xb42405b1 in ?? () from /usr/lib/libglib-2.0.so.0
#3  0xb4240ac3 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#4  0xb4ce8aef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0xb4cbb689 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0xb4cbbada in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#7  0xb4bb8478 in QThread::exec() () from /usr/lib/libQtCore.so.4
#8  0xaf57186a in ?? () from /usr/lib/kde4/plugins/phonon_backend/phonon_xine.so
#9  0xb4bbb1de in ?? () from /usr/lib/libQtCore.so.4
#10 0xb4b11830 in start_thread () from /lib/libpthread.so.0
#11 0xb48dc15e in clone () from /lib/libc.so.6

Thread 4 (Thread 0xaa508b70 (LWP 10013)):
#0  0xb48d171c in poll () from /lib/libc.so.6
#1  0xab957081 in ?? () from /usr/lib/xine/plugins/1.27/xineplug_ao_out_alsa.so
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Thread 3 (Thread 0xa9d08b70 (LWP 10014)):
#0  0xb4b16210 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0xaf535b18 in ?? () from /usr/lib/libxine.so.1
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Thread 2 (Thread 0xa6bfcb70 (LWP 10026)):
[KCrash Handler]
#5  0xb4827a67 in raise () from /lib/libc.so.6
#6  0xb48292e2 in abort () from /lib/libc.so.6
#7  0xb4a5cf5f in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/libstdc++.so.6
#8  0xb4a5ae95 in ?? () from /usr/lib/libstdc++.so.6
#9  0xb4a5aed2 in std::terminate() () from /usr/lib/libstdc++.so.6
#10 0xb4a5aef5 in ?? () from /usr/lib/libstdc++.so.6
#11 0xb4a5a345 in __cxa_call_unexpected () from /usr/lib/libstdc++.so.6
#12 0xb69a3d30 in CPGFImage::Read (this=0xa6bfb920, level=0, cb=0, data=0x0) at /usr/src/digikam-1.5.0/libs/3rdparty/libpgf/PGFimage.cpp:252
#13 0xb69a798a in Digikam::readPGFImageData (data=..., img=...) at /usr/src/digikam-1.5.0/libs/threadimageio/pgfutils.cpp:73
#14 0xb6980060 in Digikam::ThumbnailCreator::loadFromDatabase (this=0xa089a40, info=...) at /usr/src/digikam-1.5.0/libs/threadimageio/thumbnailcreator.cpp:667
#15 0xb6982d1b in Digikam::ThumbnailCreator::load (this=0xa089a40, path=...) at /usr/src/digikam-1.5.0/libs/threadimageio/thumbnailcreator.cpp:185
#16 0xb698a5f3 in Digikam::ThumbnailLoadingTask::execute (this=0x2218ae0) at /usr/src/digikam-1.5.0/libs/threadimageio/thumbnailtask.cpp:133
#17 0xb6965a59 in Digikam::LoadSaveThread::run (this=0xa0897c8) at /usr/src/digikam-1.5.0/libs/threadimageio/loadsavethread.cpp:116
#18 0xb69ab35f in Digikam::DynamicThread::DynamicThreadPriv::run (this=0xa0883d8) at /usr/src/digikam-1.5.0/libs/threads/dynamicthread.cpp:240
#19 0xb4bb0d4c in ?? () from /usr/lib/libQtCore.so.4
#20 0xb4bbb1de in ?? () from /usr/lib/libQtCore.so.4
#21 0xb4b11830 in start_thread () from /lib/libpthread.so.0
#22 0xb48dc15e in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb252f740 (LWP 9998)):
#0  0xb5901980 in ?? () from /usr/lib/libQtGui.so.4
#1  0xb59063c1 in ?? () from /usr/lib/libQtGui.so.4
#2  0xb5906a17 in ?? () from /usr/lib/libQtGui.so.4
#3  0xb590868f in ?? () from /usr/lib/libQtGui.so.4
#4  0xb590a44f in QSortFilterProxyModel::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libQtGui.so.4
#5  0x0825e7de in Digikam::AlbumFilterModel::qt_metacall (this=0xa0728a8, _c=QMetaObject::InvokeMetaMethod, _id=37, _a=0xbfe20c00) at /usr/src/digikam-1.5.0/digikam/albumfiltermodel.moc:80
#6  0xb4cc226a in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/libQtCore.so.4
#7  0xb4cd0885 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#8  0xb4d2140f in QAbstractItemModel::rowsInserted(QModelIndex const&, int, int) () from /usr/lib/libQtCore.so.4
#9  0xb4cb6a03 in QAbstractItemModel::endInsertRows() () from /usr/lib/libQtCore.so.4
#10 0x082560a2 in Digikam::AbstractAlbumModel::slotAlbumAdded (this=0x875f770, album=0x89a36c0) at /usr/src/digikam-1.5.0/libs/models/abstractalbummodel.cpp:387
#11 0x082586a2 in Digikam::AbstractAlbumModel::qt_metacall (this=0x875f770, _c=QMetaObject::InvokeMetaMethod, _id=26, _a=0xbfe20ea8) at /usr/src/digikam-1.5.0/digikam/abstractalbummodel.moc:90
#12 0x0825872e in Digikam::AbstractSpecificAlbumModel::qt_metacall (this=0x875f770, _c=QMetaObject::InvokeMetaMethod, _id=26, _a=0xbfe20ea8)
    at /usr/src/digikam-1.5.0/digikam/abstractalbummodel.moc:161
#13 0x082587ae in Digikam::AbstractCountingAlbumModel::qt_metacall (this=0x875f770, _c=QMetaObject::InvokeMetaMethod, _id=26, _a=0xbfe20ea8)
    at /usr/src/digikam-1.5.0/digikam/abstractalbummodel.moc:234
#14 0x082588ee in Digikam::AbstractCheckableAlbumModel::qt_metacall (this=0x875f770, _c=QMetaObject::InvokeMetaMethod, _id=26, _a=0xbfe20ea8)
    at /usr/src/digikam-1.5.0/digikam/abstractalbummodel.moc:303
#15 0x0825bb2d in Digikam::SearchModel::qt_metacall (this=0x875f770, _c=QMetaObject::InvokeMetaMethod, _id=26, _a=0xbfe20ea8) at /usr/src/digikam-1.5.0/digikam/albummodel.moc:67
#16 0xb4cc226a in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/libQtCore.so.4
#17 0xb4cd0885 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#18 0x0826fc47 in Digikam::AlbumManager::signalAlbumAdded (this=0x8641678, _t1=0x89a36c0) at /usr/src/digikam-1.5.0/digikam/albummanager.moc:217
#19 0x08273bf3 in Digikam::AlbumManager::scanSAlbums (this=0x8641678) at /usr/src/digikam-1.5.0/digikam/albummanager.cpp:1617
#20 0x0827eb10 in Digikam::AlbumManager::refresh (this=0x8641678) at /usr/src/digikam-1.5.0/digikam/albummanager.cpp:1162
#21 0x0827f244 in Digikam::AlbumManager::startScan (this=0x8641678) at /usr/src/digikam-1.5.0/digikam/albummanager.cpp:1075
#22 0x082d3737 in DigikamApp (this=0x8676b88, __in_chrg=<value optimized out>, __vtt_parm=<value optimized out>) at /usr/src/digikam-1.5.0/digikam/digikamapp.cpp:248
#23 0x083b4248 in main (argc=1, argv=0xbfe216d4) at /usr/src/digikam-1.5.0/digikam/main.cpp:172

Possible duplicates by query: bug 247977, bug 246789, bug 220875.

Reported using DrKonqi
Comment 1 caulier.gilles 2010-11-03 08:18:08 UTC

*** This bug has been marked as a duplicate of bug 247977 ***
Comment 2 Jeff Robinson 2010-11-03 12:33:27 UTC
Apparently my digikam4.db had become corrupt during the crash when searching for duplicates.  I backed up the db file and deleted the original.  Now Digikam 1.5 correctly starts and runs (though it did give me a warning my local had changed from ISO-8890-1 to ISO-8890-1).

The only issue I have now is that if I continue with the new database all my RAW files have lost their tags/captions.  At least Digikam works again and I have the labelled JPEGs in the same directories!
Comment 3 caulier.gilles 2019-08-15 12:58:08 UTC
Fixed with bug #247977