Bug 124199 - digikam crashed when I right-clicked in the (empty) "My Albums" view
Summary: digikam crashed when I right-clicked in the (empty) "My Albums" view
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Albums (show other bugs)
Version: 0.8.1
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-24 19:02 UTC by Gilles Schintgen
Modified: 2017-07-20 05:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 0.9.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gilles Schintgen 2006-03-24 19:02:58 UTC
Version:           0.8.1 (using KDE KDE 3.5.1)
Installed from:    Gentoo Packages
OS:                Linux

I wasn't really paying attention to what I was doing. Thus, I can't provide a more detailed description than in the subject line.

Using host libthread_db library "/lib/libthread_db.so.1".
`system-supplied DSO at 0xffffe000' has disappeared; keeping its symbols.
[Thread debugging using libthread_db enabled]
[New Thread -1224800064 (LWP 14895)]
[KCrash handler]
#6  0xb7dccb56 in Album::isRoot (this=0x0) at album.cpp:214
#7  0xb7df83e1 in AlbumIconView::slotRightButtonClicked (this=0x82a07f0, 
    pos=@0x0) at albumiconview.cpp:426
#8  0xb7dff486 in AlbumIconView::qt_invoke (this=0x82a07f0, _id=69, 
    _o=0xbfb5f920) at albumiconview.moc:234
#9  0x47af7b13 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#10 0xb7de089a in IconView::signalRightButtonClicked (this=0x82a07f0, t0=@0x0)
    at iconview.moc:144
#11 0xb7dde01b in IconView::contentsMousePressEvent (this=0x82a07f0, 
    e=0xbfb5fb40) at iconview.cpp:828
#12 0x47c099c2 in QScrollView::viewportMousePressEvent ()
   from /usr/qt/3/lib/libqt-mt.so.3
#13 0x47c09335 in QScrollView::eventFilter () from /usr/qt/3/lib/libqt-mt.so.3
#14 0x47af54ce in QObject::activate_filters ()
   from /usr/qt/3/lib/libqt-mt.so.3
#15 0x47af53f6 in QObject::event () from /usr/qt/3/lib/libqt-mt.so.3
#16 0x47b2d1ff in QWidget::event () from /usr/qt/3/lib/libqt-mt.so.3
#17 0x47a9c5fc in QApplication::internalNotify ()
   from /usr/qt/3/lib/libqt-mt.so.3
#18 0x47a9bab0 in QApplication::notify () from /usr/qt/3/lib/libqt-mt.so.3
#19 0xb71a048b in KApplication::notify (this=0xbfb606f0, receiver=0x8286d10, 
    event=0xbfb60140) at kapplication.cpp:550
#20 0x47a3230c in QETWidget::translateMouseEvent ()
   from /usr/qt/3/lib/libqt-mt.so.3
#21 0x47a2ff7c in QApplication::x11ProcessEvent ()
   from /usr/qt/3/lib/libqt-mt.so.3
#22 0x47a4797b in QEventLoop::processEvents ()
   from /usr/qt/3/lib/libqt-mt.so.3
#23 0x47aae558 in QEventLoop::enterLoop () from /usr/qt/3/lib/libqt-mt.so.3
#24 0x47aae408 in QEventLoop::exec () from /usr/qt/3/lib/libqt-mt.so.3
#25 0x47a9c831 in QApplication::exec () from /usr/qt/3/lib/libqt-mt.so.3
#26 0x0804a8a8 in main (argc=0, argv=0x0) at main.cpp:260
Comment 1 caulier.gilles 2006-07-03 16:32:58 UTC
I can't reproduce this crash with current 0.8.2-svn (and 0.9.0-svn) implementation.

Can you try again to checkout source code from svn and re-compile digiKam using ./configure --enable-debug=full option ?

Thanks in advance

Gilles Caulier
Comment 2 Gilles Schintgen 2006-07-03 23:31:26 UTC
> Can you try again to checkout source code from svn and re-compile digiKam
> using ./configure --enable-debug=full option ?

I'm sorry, currently I don't have time for such experiments. I couldn't even 
reproduce the issue when I filed the bug report.

Gilles
Comment 3 Marcel Wiesweg 2006-07-16 23:47:09 UTC
SVN commit 563173 by mwiesweg:

Add a null pointer check.
I cannot reproduce the crash, but it is ok to add a null pointer check here.

BuG: 124199


 M  +8 -5      albumiconview.cpp  


--- trunk/extragear/graphics/digikam/digikam/albumiconview.cpp #563172:563173
@@ -450,25 +450,28 @@
 
 void AlbumIconView::slotRightButtonClicked(const QPoint& pos)
 {
-    if(d->currentAlbum->isRoot() ||
+    if (!d->currentAlbum)
+        return;
+
+    if (d->currentAlbum->isRoot() ||
          (   d->currentAlbum->type() != Album::PHYSICAL
           && d->currentAlbum->type() != Album::TAG))
     {
         return;
     }
-            
+
     QPopupMenu popmenu(this);
     KAction *paste = KStdAction::paste(this, SLOT(slotPaste()), 0);
     QMimeSource *data = kapp->clipboard()->data(QClipboard::Clipboard);
-    
+
     if(!data || !QUriDrag::canDecode(data))
     {
         paste->setEnabled(false);
     }
-    
+
     paste->plug(&popmenu);
     popmenu.exec(pos);
-    delete paste;    
+    delete paste;
 }
 
 void AlbumIconView::slotRightButtonClicked(IconItem *item, const QPoint& pos)