Summary: | Crash after add second image | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Maxes <maxes> |
Component: | Database-Scan | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | CLOSED FIXED | ||
Severity: | crash | CC: | caulier.gilles |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | FreeBSD Ports | ||
OS: | FreeBSD | ||
Latest Commit: | Version Fixed In: | 0.9.0 | |
Sentry Crash Report: | |||
Attachments: | Debug statements |
Description
Maxes
2006-07-24 18:11:59 UTC
sqlite3 dump: INSERT INTO "Albums" VALUES(1, '/New Album', '2006-07-24', '', 'Uncategorized Album', NULL); INSERT INTO "Images" VALUES(1, 'd2_0003.JPG', 1, '', '2006-07-17T21:25:30'); INSERT INTO "Images" VALUES(2, 'small_0011.JPG', 1, '', '2006-07-07T21:13:45'); INSERT INTO "Settings" VALUES('DBVersion', '1'); INSERT INTO "Settings" VALUES('Locale', 'ISO 8859-1'); INSERT INTO "Settings" VALUES('UpgradedFromSqlite2', 'yes'); INSERT INTO "Settings" VALUES('Scanned', '2006-07-24T20:28:27'); Update: installed from tgz, not from ports. The crash happens when data sent from the albums ioslave is deserialized. Please check that there are no old kde/3.5/lib/kde3/kio_digikamalbums.so libs lying around (although the format has not changed I think, so it shouldn't cause this). Then, please recompile with --enable-debug so that the backtrace provides the source locations. Marcel, This is certainly a duplicate of #121905. I have fixed it in the past. You have right... The problem is duing of a wrong cast in serialization data from kio-slave. The Free-BSD team have reported this problem and provide patches, because we cannot reproduce it under linux (the cast depand of an internal libc data format witch is different of linux libc). For more informations, I recommend to contact Marc Espie <espie@nerim.net> from FREE-BSD team witch have provide the #121905 patches. Gilles Caulier 1) deinstall digikam and all related kio_ libs. 2) recomopiled with debug full 3) install 4) rm ~/.thumbnails and ~/Pictures 5) run first time, make new album, add one jpg. Add second jpg and catch crash 6) run under gdb terminate called after throwing an instance of 'std::bad_alloc' what(): St9bad_alloc Program received signal SIGABRT, Aborted. 0x29b9cf4b in kill () from /lib/libc.so.6 (gdb) bt #0 0x29b9cf4b in kill () from /lib/libc.so.6 #1 0x29ac2236 in raise () from /usr/lib/libpthread.so.2 #2 0x29b9bbfc in abort () from /lib/libc.so.6 #3 0x29a38027 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/libstdc++.so.5 #4 0x29a3c22c in __cxxabiv1::__terminate(void (*)()) () from /usr/lib/libstdc++.so.5 #5 0x29a3c264 in std::terminate() () from /usr/lib/libstdc++.so.5 #6 0x29a3c1b8 in __cxa_throw () from /usr/lib/libstdc++.so.5 #7 0x29a7b7ca in operator new(unsigned) () from /usr/lib/libstdc++.so.5 #8 0x29a7b713 in operator new[](unsigned) () from /usr/lib/libstdc++.so.5 #9 0x2956caf2 in QString::setLength(unsigned) () from /usr/X11R6/lib/libqt-mt.so.3 #10 0x2957490e in operator>>(QDataStream&, QString&) () from /usr/X11R6/lib/libqt-mt.so.3 #11 0x281967d2 in Digikam::AlbumLister::slotData(KIO::Job*, QMemArray<char> const&) (this=0x815f600, data=@0xbfbfdea0) at albumlister.cpp:338 #12 0x28196b96 in Digikam::AlbumLister::qt_invoke(int, QUObject*) (this=0x815f600, _id=695136572, _o=0xbfbfdf70) at albumlister.moc:191 #13 0x292c91e0 in QObject::activate_signal(QConnectionList*, QUObject*) () from /usr/X11R6/lib/libqt-mt.so.3 #14 0x288c6fcc in KIO::TransferJob::data(KIO::Job*, QMemArray<char> const&) () from /usr/local/lib/libkio.so.6 #15 0x288c7030 in KIO::TransferJob::slotData(QMemArray<char> const&) () from /usr/local/lib/libkio.so.6 #16 0x288c85ad in KIO::TransferJob::qt_invoke(int, QUObject*) () from /usr/local/lib/libkio.so.6 #17 0x292c91e0 in QObject::activate_signal(QConnectionList*, QUObject*) () from /usr/X11R6/lib/libqt-mt.so.3 #18 0x288b545b in KIO::SlaveInterface::data(QMemArray<char> const&) () from /usr/local/lib/libkio.so.6 #19 0x288b80fa in KIO::SlaveInterface::dispatch(int, QMemArray<char> const&) () from /usr/local/lib/libkio.so.6 #20 0x288b69f5 in KIO::SlaveInterface::dispatch() () from /usr/local/lib/libkio.so.6 #21 0x288b2f64 in KIO::Slave::gotInput() () from /usr/local/lib/libkio.so.6 #22 0x288b32c9 in KIO::Slave::qt_invoke(int, QUObject*) () from /usr/local/lib/libkio.so.6 #23 0x292c91e0 in QObject::activate_signal(QConnectionList*, QUObject*) () from /usr/X11R6/lib/libqt-mt.so.3 #24 0x292c9714 in QObject::activate_signal(int, int) () from /usr/X11R6/lib/libqt-mt.so.3 #25 0x295cae85 in QSocketNotifier::activated(int) () from /usr/X11R6/lib/libqt-mt.so.3 #26 0x292e2264 in QSocketNotifier::event(QEvent*) () from /usr/X11R6/lib/libqt-mt.so.3 #27 0x2926d265 in QApplication::internalNotify(QObject*, QEvent*) () from /usr/X11R6/lib/libqt-mt.so.3 #28 0x2926d3fa in QApplication::notify(QObject*, QEvent*) () from /usr/X11R6/lib/libqt-mt.so.3 #29 0x28e47fc6 in KApplication::notify(QObject*, QEvent*) () from /usr/local/lib/libkdecore.so.6 #30 0x29261c1f in QEventLoop::activateSocketNotifiers() () from /usr/X11R6/lib/libqt-mt.so.3 #31 0x2921fb28 in QEventLoop::processEvents(unsigned) () from /usr/X11R6/lib/libqt-mt.so.3 #32 0x29281627 in QEventLoop::enterLoop() () from /usr/X11R6/lib/libqt-mt.so.3 #33 0x29281580 in QEventLoop::exec() () from /usr/X11R6/lib/libqt-mt.so.3 #34 0x2926c5a0 in QApplication::exec() () from /usr/X11R6/lib/libqt-mt.so.3 #35 0x0804a756 in main () #36 0x08049e8e in _start () p.s. as I can see, patches from #121905 already applied to 0.9.0-beta1 Yes, patches from #121905 have already applied to 0.9.0-beta1. I suspect others wrong cast in kio-slave witch crash digiKam only under FreeBSD. In fact, something is different in libc Freebsd port and libc from Linux. I cannot debug digiKam under freebsd, sorry. Please report this problem to freebsd team to make a little patch. Like the problem is know, it will be easy to hack this point check old patches. Thanks in advance Gilles Caulier Created attachment 17125 [details]
Debug statements
You might want to try this patch to get more debug output, and to try to find
the exact location of the problem.
You need to make install after compiling (kioslave is changed), and one part of
the debug output will be found in your ~/.xsession-errors (from the kioslave,
again)
digikam: Read albumID 4 digikam: Read name IMG_2017.JPG digikam: Read date 2006-06-11T17:12:51 digikam: Read size 8 digikam: Read dims kio_digikamalbums: -- Adding ID 8 8 kio_digikamalbums: Adding albumid 4 12 kio_digikamalbums: Adding name IMG_2017.JPG 40 kio_digikamalbums: Adding date 2006-06-11T17:12:51 82 kio_digikamalbums: Adding st_size 4 86 kio_digikamalbums: Adding dims 94 kio_digikamalbums: -- Adding ID 8 8 kio_digikamalbums: Adding albumid 4 12 kio_digikamalbums: Adding name IMG_2017.JPG 40 kio_digikamalbums: Adding date 2006-06-11T17:12:51 82 kio_digikamalbums: Adding st_size 4 86 kio_digikamalbums: Adding dims 94 digikam: -- Read imageID 8 digikam: Read albumID 4 digikam: Read name IMG_2017.JPG digikam: Read date 2006-06-11T17:12:51 digikam: Read size 8 digikam: Read dims kio_digikamalbums: -- Adding ID 8 8 kio_digikamalbums: Adding albumid 4 12 kio_digikamalbums: Adding name IMG_2017.JPG 40 kio_digikamalbums: Adding date 2006-06-11T17:12:51 82 kio_digikamalbums: Adding st_size 4 86 kio_digikamalbums: Adding dims 94 kio_digikamalbums: -- Adding ID 8 102 kio_digikamalbums: Adding albumid 4 106 kio_digikamalbums: Adding name IMG_2132.JPG 134 kio_digikamalbums: Adding date 2006-06-18T13:00:26 176 kio_digikamalbums: Adding st_size 4 180 kio_digikamalbums: Adding dims 188 digikam: -- Read imageID 8 digikam: Read albumID 4 digikam: Read name IMG_2017.JPG digikam: Read date 2006-06-11T17:12:51 digikam: Read size 8 digikam: Read dims digikam: -- Read imageID 8 digikam: Read albumID 4 digikam: Read name G_2132.JPGterminate called after throwing an instance of 'std::bad_alloc' what(): St9bad_alloc KCrash: Application 'digikam' crashing... where is first 2 char from second filename ? "G_2132.JPG" The kioslave writes 4 bytes for "st_size", albumlister is reading 8 bytes, and attempting to read the string one byte off is fatal. Could you please change digikam/albumlister.cpp, line 326 off_t size; to size_t size; Perhaps off_t has 8 bytes on FreeBSD. Marcel, This is exactly the problem. i remember to have talk about this point (in French) with Marc Espie from FreeBSD team on B.K.O file #121905. Making a cast solve the problem. Gilles Marcel, This is exactly the problem. i remember to have talk about this point (in French) with Marc Espie from FreeBSD team on B.K.O file #121905. Using the right data format solve the problem. Gilles -off_t +size_t fixed problem, tnks SVN commit 566463 by cgilles: digikam from trunk : fix crash under FreeBsd CCBUGS: 131301 M +1 -1 albumlister.cpp --- trunk/extragear/graphics/digikam/digikam/albumlister.cpp #566462:566463 @@ -323,7 +323,7 @@ int albumID; QString name; QString date; - off_t size; + size_t size; QSize dims; ImageInfoList newItemsList; SVN commit 566465 by cgilles: digikam from stable: fix crash under FreeBsd BUG: 131301 M +1 -1 albumlister.cpp --- branches/stable/extragear/graphics/digikam/digikam/albumlister.cpp #566464:566465 @@ -313,7 +313,7 @@ int albumID; QString name; QString date; - off_t size; + size_t size; QSize dims; ImageInfoList newItemsList; |