Summary: | Crash when overwriting images which are displayed in the thumbnail list | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Frank Osterfeld <osterfeld> |
Component: | Thumbs-Engine | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | ntung |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 7.6.0 | |
Sentry Crash Report: |
Description
Frank Osterfeld
2005-09-03 22:42:24 UTC
I can reproduce the problem using SVN commit 457252: Using host libthread_db library "/lib/tls/libthread_db.so.1". `shared object read from target memory' has disappeared; keeping its symbols. [Thread debugging using libthread_db enabled] [New Thread -1237297472 (LWP 4868)] [KCrash handler] #4 0xb7dbc84a in IconGroupItem::iconView () from /usr/lib/libdigikam.so.0 #5 0xb7dbd2d9 in IconItem::repaint () from /usr/lib/libdigikam.so.0 #6 0xb7dd419e in AlbumIconView::slotGotThumbnail () from /usr/lib/libdigikam.so.0 #7 0xb7dd55b2 in AlbumIconView::qt_invoke () from /usr/lib/libdigikam.so.0 #8 0xb6ca41dd in QObject::activate_signal () from /usr/lib/qt3/lib/libqt-mt.so.3 #9 0xb70e9401 in ?? () from /usr/lib/qt3/lib/libqt-mt.so.3 #10 0x081ffc28 in ?? () #11 0xb70e9434 in ?? () from /usr/lib/qt3/lib/libqt-mt.so.3 #12 0xb6f74016 in QGDict::look_string () from /usr/lib/qt3/lib/libqt-mt.so.3 #13 0xbf92a198 in ?? () #14 0xbf92a1ac in ?? () #15 0xbf92a1b8 in ?? () #16 0xb7e04912 in PixmapManager::signalPixmap () from /usr/lib/libdigikam.so.0 I can reproduce the bug. It's indeep in digikam core. I need any time to solve it. Gilles SVN commit 458915 by jahrens: When an image was saved with "Save As" with a filename that already existed in the album, the new ImageInfo was first created through signalNewFilteredItems but deleted through signalDeleteFilteredItem for the old image - because both used the same filename. BUG: 112000 M +19 -5 digikam/albumiconview.cpp M +1 -0 digikam/albumlister.cpp M +7 -1 utilities/imageeditor/imagewindow.cpp --- trunk/extragear/graphics/digikam/digikam/albumiconview.cpp #458914:458915 @@ -315,6 +315,14 @@ ImageInfo* item; for (ImageInfoListIterator it(itemList); (item = it.current()); ++it) { + KURL url( item->kurl() ); + url.cleanPath(); + + if (AlbumIconItem *oldItem = d->itemDict.find(url.url())) + { + slotImageListerDeleteItem(oldItem->imageInfo()); + } + AlbumIconGroupItem* group = d->albumDict.find(item->albumID()); if (!group) { @@ -332,8 +340,6 @@ AlbumIconItem* iconItem = new AlbumIconItem(group, item); item->setViewItem(iconItem); - KURL url( item->kurl() ); - url.cleanPath(); d->itemDict.insert(url.url(), iconItem); } @@ -347,6 +353,16 @@ AlbumIconItem* iconItem = static_cast<AlbumIconItem*>(item->getViewItem()); + KURL url(item->kurl()); + url.cleanPath(); + + AlbumIconItem *oldItem = d->itemDict[url.url()]; + if( oldItem && + (oldItem->imageInfo()->id() != iconItem->imageInfo()->id())) + { + return; + } + d->pixMan->remove(item->kurl()); emit signalItemDeleted(iconItem); @@ -354,9 +370,7 @@ delete iconItem; item->setViewItem(0); - KURL u(item->kurl()); - u.cleanPath(); - d->itemDict.remove(u.url()); + d->itemDict.remove(url.url()); IconGroupItem* group = firstGroup(); IconGroupItem* tmp; --- trunk/extragear/graphics/digikam/digikam/albumlister.cpp #458914:458915 @@ -120,6 +120,7 @@ ds << d->filter; ds << AlbumSettings::instance()->getIconShowResolution(); + // Protocol = digikamalbums -> kio_digikamalbums d->job = new KIO::TransferJob(album->kurl(), KIO::CMD_SPECIAL, ba, QByteArray(), false); connect(d->job, SIGNAL(result(KIO::Job*)), --- trunk/extragear/graphics/digikam/utilities/imageeditor/imagewindow.cpp #458914:458915 @@ -1071,6 +1071,7 @@ // Check for overwrite ---------------------------------------------------------- QFileInfo fi(newURL.path()); + bool fileExists = false; if ( fi.exists() ) { int result = @@ -1086,6 +1087,8 @@ if (result != KMessageBox::Yes) return; + + fileExists = true; } // Now do the actual saving ----------------------------------------------------- @@ -1176,7 +1179,10 @@ m_urlCurrent = newURL; } - emit signalFileAdded(newURL); + if(fileExists) + emit signalFileModified(newURL); + else + emit signalFileAdded(newURL); m_canvas->setModified( false ); kapp->restoreOverrideCursor(); Hi Joern, I have tested your SVN commit 458915 and now I can freely overwrite photos with "Save as..." without crash. I think you can close the bug report. Thank you very much. Cool, thanks for your feedback! |