Bug 128069

Summary: crash when moving an album to another album
Product: [Applications] digikam Reporter: glaurent
Component: Albums-TreeViewAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: caulier.gilles
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 0.9.0
Sentry Crash Report:

Description glaurent 2006-05-26 11:05:11 UTC
Version:           0.9 (svn) (using KDE KDE 3.5.2)
Installed from:    Compiled From Sources
OS:                Linux

with current svn (it's been there for a while) : open an album, move it to another album -> crash.
Comment 1 caulier.gilles 2006-05-26 12:30:43 UTC
Without a full and suitable gdb backtrace, we cannot do anything...

Gilles
Comment 2 glaurent 2006-05-26 14:54:24 UTC
not even try to reproduce it ? :-)
Comment 3 caulier.gilles 2006-05-26 15:36:44 UTC
Run digikam under gdb like this :

#gdb digikam
> run
...
crash
...
>bt

and report me the backtrace

Thanks in advance

Gilles
Comment 4 glaurent 2006-05-26 17:40:54 UTC
#0  0xb7dc5eaa in Digikam::ThumbnailJob::removeItem (this=0x0, url=@0xbfc252ac) at thumbnailjob.cpp:160
#1  0xb7d35973 in Digikam::AlbumFolderView::slotAlbumDeleted (this=0x828b578, album=0x8372150) at albumfolderview.cpp:282
#2  0xb7d38ab4 in Digikam::AlbumFolderView::qt_invoke (this=0x828b578, _id=85, _o=0xbfc25384) at albumfolderview.moc:141
#3  0xb6afdc01 in QObject::activate_signal () from /home/opt/qt-x11-free-3.3.6/lib/libqt-mt.so.3
#4  0xb7d0ac22 in Digikam::AlbumManager::signalAlbumDeleted (this=0x8140748, t0=0x8372150) at albummanager.moc:163
#5  0xb7d0baf4 in Digikam::AlbumManager::removePAlbum (this=0x8140748, album=0x8372150) at albummanager.cpp:1208
#6  0xb7d0dc87 in Digikam::AlbumManager::scanPAlbums (this=0x8140748) at albummanager.cpp:398
#7  0xb7d0e07e in Digikam::AlbumManager::refresh (this=0x8140748) at albummanager.cpp:327
#8  0xb7d6ae72 in DIO::Watch::slotDone (this=0x8392c08) at dio.cpp:232
#9  0xb7d6af00 in DIO::Watch::qt_invoke (this=0x8392c08, _id=2, _o=0xbfc25644) at dio_p.moc:85
#10 0xb6afdc01 in QObject::activate_signal () from /home/opt/qt-x11-free-3.3.6/lib/libqt-mt.so.3
#11 0xb7603e86 in KIO::Job::result () from /opt/kde3.5/lib/libkio.so.4
#12 0xb7659a39 in KIO::Job::emitResult () from /opt/kde3.5/lib/libkio.so.4
#13 0xb765ab7d in KIO::CopyJob::setNextDirAttribute () from /opt/kde3.5/lib/libkio.so.4
#14 0xb765ad07 in KIO::CopyJob::deleteNextDir () from /opt/kde3.5/lib/libkio.so.4
#15 0xb765b634 in KIO::CopyJob::copyNextFile () from /opt/kde3.5/lib/libkio.so.4
#16 0xb765c784 in KIO::CopyJob::createNextDir () from /opt/kde3.5/lib/libkio.so.4
#17 0xb765cd26 in KIO::CopyJob::statCurrentSrc () from /opt/kde3.5/lib/libkio.so.4
#18 0xb765d78b in KIO::CopyJob::statNextSrc () from /opt/kde3.5/lib/libkio.so.4
#19 0xb7661c8b in KIO::CopyJob::slotResultRenaming () from /opt/kde3.5/lib/libkio.so.4
#20 0xb766315d in KIO::CopyJob::slotResult () from /opt/kde3.5/lib/libkio.so.4
#21 0xb7657470 in KIO::CopyJob::qt_invoke () from /opt/kde3.5/lib/libkio.so.4
#22 0xb6afdca4 in QObject::activate_signal () from /home/opt/qt-x11-free-3.3.6/lib/libqt-mt.so.3
#23 0xb7603e86 in KIO::Job::result () from /opt/kde3.5/lib/libkio.so.4
#24 0xb7659a39 in KIO::Job::emitResult () from /opt/kde3.5/lib/libkio.so.4
#25 0xb76603fb in KIO::SimpleJob::slotFinished () from /opt/kde3.5/lib/libkio.so.4
#26 0xb7659398 in KIO::SimpleJob::qt_invoke () from /opt/kde3.5/lib/libkio.so.4
#27 0xb6afdca4 in QObject::activate_signal () from /home/opt/qt-x11-free-3.3.6/lib/libqt-mt.so.3
#28 0xb6afe585 in QObject::activate_signal () from /home/opt/qt-x11-free-3.3.6/lib/libqt-mt.so.3
#29 0xb75fd2da in KIO::SlaveInterface::finished () from /opt/kde3.5/lib/libkio.so.4
#30 0xb764ec9a in KIO::SlaveInterface::dispatch () from /opt/kde3.5/lib/libkio.so.4
#31 0xb763e297 in KIO::SlaveInterface::dispatch () from /opt/kde3.5/lib/libkio.so.4
#32 0xb761023b in KIO::Slave::gotInput () from /opt/kde3.5/lib/libkio.so.4
#33 0xb763f769 in KIO::Slave::qt_invoke () from /opt/kde3.5/lib/libkio.so.4
#34 0xb6afdca4 in QObject::activate_signal () from /home/opt/qt-x11-free-3.3.6/lib/libqt-mt.so.3
#35 0xb6afe497 in QObject::activate_signal () from /home/opt/qt-x11-free-3.3.6/lib/libqt-mt.so.3
#36 0xb6df732a in QSocketNotifier::activated () from /home/opt/qt-x11-free-3.3.6/lib/libqt-mt.so.3
#37 0xb6b195e1 in QSocketNotifier::event () from /home/opt/qt-x11-free-3.3.6/lib/libqt-mt.so.3
#38 0xb6aa391b in QApplication::internalNotify () from /home/opt/qt-x11-free-3.3.6/lib/libqt-mt.so.3
#39 0xb6aa45e2 in QApplication::notify () from /home/opt/qt-x11-free-3.3.6/lib/libqt-mt.so.3
#40 0xb718932a in KApplication::notify () from /opt/kde3.5/lib/libkdecore.so.4
#41 0xb6a98cbb in QEventLoop::activateSocketNotifiers () from /home/opt/qt-x11-free-3.3.6/lib/libqt-mt.so.3
#42 0xb6a58789 in QEventLoop::processEvents () from /home/opt/qt-x11-free-3.3.6/lib/libqt-mt.so.3
#43 0xb6ab8cfa in QEventLoop::enterLoop () from /home/opt/qt-x11-free-3.3.6/lib/libqt-mt.so.3
#44 0xb6ab8bb4 in QEventLoop::exec () from /home/opt/qt-x11-free-3.3.6/lib/libqt-mt.so.3
#45 0xb6aa3641 in QApplication::exec () from /home/opt/qt-x11-free-3.3.6/lib/libqt-mt.so.3
#46 0x0804a768 in main (argc=1, argv=0xbfc26bd4) at main.cpp:273

#1  0xb7d35973 in Digikam::AlbumFolderView::slotAlbumDeleted (this=0x828b578, album=0x8372150) at albumfolderview.cpp:282
282             d->iconThumbJob->removeItem(palbum->icon());
(gdb) p *d
$1 = {albumMan = 0x8140748, iconThumbJob = 0x0, groupItems = {sh = 0x82862c0}}
Comment 5 glaurent 2006-05-26 18:03:23 UTC
Given that the fix was obvious and trivial, I took the liberty to commit it

The fault was :

    if(!palbum->icon().isEmpty() && !d->iconThumbJob)
        d->iconThumbJob->removeItem(palbum->icon());

which obviously should be :

    if(!palbum->icon().isEmpty() && d->iconThumbJob)
        d->iconThumbJob->removeItem(palbum->icon());
Comment 6 glaurent 2006-05-26 18:03:58 UTC
*** Bug has been marked as fixed ***.
Comment 7 caulier.gilles 2006-05-26 19:23:22 UTC
Right. Thanks for this Fix Guillaume (:=)))

Gilles
Comment 8 caulier.gilles 2006-05-26 19:31:12 UTC
SVN commit 545051 by cgilles:

digikam from stable : backport of commit #545017 by glaurent
CCBUGS: 128069


 M  +1 -1      albumfolderview.cpp  


--- branches/stable/extragear/graphics/digikam/digikam/albumfolderview.cpp #545050:545051
@@ -267,7 +267,7 @@
     if(!palbum)
         return;
 
-    if(!palbum->icon().isEmpty() && !d->iconThumbJob)
+    if(!palbum->icon().isEmpty() && d->iconThumbJob)
         d->iconThumbJob->removeItem(palbum->icon());
 
     AlbumFolderViewItem* item = (AlbumFolderViewItem*) palbum->extraData(this);