Bug 112932 - akgregator crashs on deleting items
Summary: akgregator crashs on deleting items
Status: RESOLVED FIXED
Alias: None
Product: akregator
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: VHI crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 113845 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-09-20 09:44 UTC by Tobias Powalowski
Modified: 2005-10-05 05:26 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Powalowski 2005-09-20 09:44:45 UTC
Version:           3.4.91 (using KDE KDE 3.4.90)
Installed from:    Compiled From Sources
Compiler:          gcc 4.0.1 
OS:                Linux

Hi
using here pre 3.4.91 tarballs.
to reproduce, fetch some feeds, then start deleting items from the feeds, suddenly it crashes 
greetings from archlinux maintainer
here is the crash log:
[Thread debugging using libthread_db enabled]
[New Thread -1248814592 (LWP 6522)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[KCrash handler]
#7  0xb7f2f617 in Akregator::Article::pubDate ()
   from /opt/kde/lib/libakregatorprivate.so
#8  0xb57190b1 in QMapPrivate<Akregator::Article, Akregator::ArticleListView::ArticleItem*>::find () from /opt/kde/lib/kde3/libakregatorpart.so
#9  0xb56d0bcb in Akregator::ArticleListView::slotArticlesRemoved ()
   from /opt/kde/lib/kde3/libakregatorpart.so
#10 0xb56decdb in Akregator::ArticleListView::qt_invoke ()
   from /opt/kde/lib/kde3/libakregatorpart.so
#11 0xb68b5afc in QObject::activate_signal () from /opt/qt/lib/libqt-mt.so.3
#12 0xb7f35bbc in Akregator::TreeNode::signalArticlesRemoved ()
   from /opt/kde/lib/libakregatorprivate.so
#13 0xb7f3af50 in Akregator::Feed::doArticleNotification ()
   from /opt/kde/lib/libakregatorprivate.so
#14 0xb7f358d2 in Akregator::TreeNode::setNotificationMode ()
   from /opt/kde/lib/libakregatorprivate.so
#15 0xb56f45b7 in Akregator::View::slotArticleDelete ()
   from /opt/kde/lib/kde3/libakregatorpart.so
#16 0xb570c00e in Akregator::View::qt_invoke ()
   from /opt/kde/lib/kde3/libakregatorpart.so
#17 0xb68b5b99 in QObject::activate_signal () from /opt/qt/lib/libqt-mt.so.3
#18 0xb68b6040 in QObject::activate_signal () from /opt/qt/lib/libqt-mt.so.3
#19 0xb712aa89 in KAction::activated () from /opt/kde/lib/libkdeui.so.4
#20 0xb7164731 in KAction::slotActivated () from /opt/kde/lib/libkdeui.so.4
#21 0xb71838bf in KAction::qt_invoke () from /opt/kde/lib/libkdeui.so.4
#22 0xb68b5b99 in QObject::activate_signal () from /opt/qt/lib/libqt-mt.so.3
#23 0xb68b6040 in QObject::activate_signal () from /opt/qt/lib/libqt-mt.so.3
#24 0xb6e79639 in KAccelPrivate::menuItemActivated ()
   from /opt/kde/lib/libkdecore.so.4
#25 0xb6eb4797 in KAccelPrivate::emitActivatedSignal ()
   from /opt/kde/lib/libkdecore.so.4
#26 0xb6f13a03 in KAccelPrivate::eventFilter ()
   from /opt/kde/lib/libkdecore.so.4
#27 0xb68b58de in QObject::activate_filters () from /opt/qt/lib/libqt-mt.so.3
#28 0xb68b595b in QObject::event () from /opt/qt/lib/libqt-mt.so.3
#29 0xb68ef24c in QWidget::event () from /opt/qt/lib/libqt-mt.so.3
#30 0xb69aad82 in QMainWindow::event () from /opt/qt/lib/libqt-mt.so.3
#31 0xb6856b01 in QApplication::internalNotify ()
   from /opt/qt/lib/libqt-mt.so.3
#32 0xb6857a95 in QApplication::notify () from /opt/qt/lib/libqt-mt.so.3
#33 0xb6f3c01e in KApplication::notify () from /opt/kde/lib/libkdecore.so.4
#34 0xb6eb454d in KAccelEventHandler::x11Event ()
   from /opt/kde/lib/libkdecore.so.4
#35 0xb6f3a51f in KApplication::x11EventFilter ()
   from /opt/kde/lib/libkdecore.so.4
#36 0xb67e4bf5 in qt_set_x11_event_filter () from /opt/qt/lib/libqt-mt.so.3
#37 0xbfea6f44 in ?? ()
#38 0xbfea6e58 in ?? ()
#39 0x00000001 in ?? ()
#40 0xb6cfaac0 in ?? () from /opt/qt/lib/libqt-mt.so.3
#41 0xb6cfaac0 in ?? () from /opt/qt/lib/libqt-mt.so.3
#42 0x0000006b in ?? ()
#43 0xbfea6d58 in ?? ()
#44 0xb67f0a7c in QApplication::x11ProcessEvent ()
   from /opt/qt/lib/libqt-mt.so.3
#45 0xb67f0a7c in QApplication::x11ProcessEvent ()
   from /opt/qt/lib/libqt-mt.so.3
#46 0xb6804d5a in QEventLoop::processEvents () from /opt/qt/lib/libqt-mt.so.3
#47 0xb686d633 in QEventLoop::enterLoop () from /opt/qt/lib/libqt-mt.so.3
#48 0xb686d516 in QEventLoop::exec () from /opt/qt/lib/libqt-mt.so.3
#49 0xb685651f in QApplication::exec () from /opt/qt/lib/libqt-mt.so.3
#50 0x0805108d in ?? ()
#51 0xbfea6f44 in ?? ()
#52 0x00000001 in ?? ()
#53 0x00000001 in ?? ()
#54 0x00000000 in ?? ()
#55 0xb6fee894 in av_ () from /opt/kde/lib/libkdecore.so.4
#56 0x0000001f in ?? ()
#57 0x00000000 in ?? ()
#58 0xbfea6f6c in ?? ()
#59 0x00000020 in ?? ()
#60 0xb6fee894 in av_ () from /opt/kde/lib/libkdecore.so.4
#61 0xbfea6f68 in ?? ()
#62 0xb6f9594c in malloc () from /opt/kde/lib/libkdecore.so.4
#63 0xb62d3df2 in __libc_start_main () from /lib/tls/libc.so.6
#64 0x08050121 in ?? ()
Comment 1 Frank Osterfeld 2005-09-20 10:01:20 UTC
Confirmed. Another backtrace:

Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
`system-supplied DSO at 0xffffe000' has disappeared; keeping its symbols.
[Thread debugging using libthread_db enabled]
[New Thread -1242250592 (LWP 7766)]
[KCrash handler]
#4  0xb7f94160 in Akregator::Article::pubDate (this=0x9) at article.cpp:418
#5  0xb7f93856 in Akregator::Article::operator< (this=0x985f1cc, other=@0x9)
    at article.cpp:242
#6  0xb5c152fc in QMapPrivate<Akregator::Article, Akregator::ArticleListView::ArticleItem*>::find (this=0x8239938, k=@0x9) at qmap.h:503
#7  0xb5c15286 in QMap<Akregator::Article, Akregator::ArticleListView::ArticleItem*>::find (this=0x8239958, k=@0x9) at qmap.h:698
#8  0xb5c14c6c in QMap<Akregator::Article, Akregator::ArticleListView::ArticleItem*>::contains (this=0x8239958, k=@0x9) at qmap.h:703
#9  0xb5c12450 in Akregator::ArticleListView::slotArticlesRemoved (
    this=0x8234440, list=@0x99acc80) at articlelistview.cpp:389
#10 0xb5c14387 in Akregator::ArticleListView::qt_invoke (this=0x8234440, 
    _id=114, _o=0xbfffe890) at articlelistview.moc:226
#11 0xb664cfdd in QObject::activate_signal ()
   from /usr/share/qt3/lib/libqt-mt.so.3
#12 0xb7f9d3d3 in Akregator::TreeNode::signalArticlesRemoved (this=0x99ab6c0, 
    t0=0x99ab6c0, t1=@0x99acc80) at treenode.moc:190
#13 0xb7f9869a in Akregator::Feed::doArticleNotification (this=0x99ab6c0)
    at feed.cpp:767
#14 0xb7f9cccf in Akregator::TreeNode::setNotificationMode (this=0x99ab6c0, 
    doNotify=true, notifyOccurredChanges=true) at treenode.cpp:133
#15 0xb5c5086d in Akregator::View::slotArticleDelete (this=0x8215b28)
    at akregator_view.cpp:1307
#16 0xb5c51c8f in Akregator::View::qt_invoke (this=0x8215b28, _id=80, 
    _o=0xbfffeac0) at akregator_view.moc:400
#17 0xb664d067 in QObject::activate_signal ()
   from /usr/share/qt3/lib/libqt-mt.so.3
#18 0xb664ceae in QObject::activate_signal ()
   from /usr/share/qt3/lib/libqt-mt.so.3
#19 0xb6f30cfb in KAction::activated (this=0x9) at qmetaobject.h:261
#20 0xb6f2fe0a in KAction::slotActivated (this=0x82c0a80) at kaction.cpp:1102
#21 0xb6f30ff3 in KAction::qt_invoke (this=0x82c0a80, _id=15, _o=0xbfffebd0)
    at kaction.moc:218
#22 0xb664d067 in QObject::activate_signal ()
   from /usr/share/qt3/lib/libqt-mt.so.3
#23 0xb664ceae in QObject::activate_signal ()
   from /usr/share/qt3/lib/libqt-mt.so.3
#24 0xb6ca5c8b in KAccelPrivate::menuItemActivated (this=0x9)
    at qmetaobject.h:261
#25 0xb6ca2979 in KAccelPrivate::emitActivatedSignal (this=0x82e7968, 
    pAction=0x8300248) at kaccel.cpp:378
#26 0xb6ca2453 in KAccelPrivate::eventFilter (this=0x82e7968, 
    pEvent=0xbffff1c0) at kaccel.cpp:350
#27 0xb664ab01 in QObject::activate_filters ()
   from /usr/share/qt3/lib/libqt-mt.so.3
#28 0xb664aa5d in QObject::event () from /usr/share/qt3/lib/libqt-mt.so.3
#29 0xb668076f in QWidget::event () from /usr/share/qt3/lib/libqt-mt.so.3
#30 0xb67375f4 in QMainWindow::event () from /usr/share/qt3/lib/libqt-mt.so.3
#31 0xb65f5370 in QApplication::internalNotify ()
   from /usr/share/qt3/lib/libqt-mt.so.3
#32 0xb65f4eb0 in QApplication::notify () from /usr/share/qt3/lib/libqt-mt.so.3
#33 0xb6c0a145 in KApplication::notify (this=0xbffff630, receiver=0x8234440, 
    event=0xbffff1c0) at kapplication.cpp:550
#34 0xb6c9f8fb in KAccelEventHandler::x11Event (this=0x81a2a80, 
    pEvent=0xb6dc49cc) at kaccel.cpp:140
#35 0xb6c1027f in KApplication::x11EventFilter (this=0xbffff630, 
    _event=0xbffff550) at kapplication.cpp:1652
#36 0xb6582128 in qt_set_x11_event_filter ()
   from /usr/share/qt3/lib/libqt-mt.so.3
#37 0xbffff550 in ?? ()
#38 0x00000001 in ?? ()
#39 0xb6a8c670 in ?? () from /usr/share/qt3/lib/libqt-mt.so.3
#40 0xb6a8c670 in ?? () from /usr/share/qt3/lib/libqt-mt.so.3
#41 0x0000006b in ?? ()
#42 0xbffff418 in ?? ()
#43 0xb658bc9a in QApplication::x11ProcessEvent ()
   from /usr/share/qt3/lib/libqt-mt.so.3
#44 0xb61b59e0 in __after_morecore_hook () from /lib/tls/i686/cmov/libc.so.6
#45 0x080ab310 in ?? ()
#46 0x00000000 in ?? ()
#47 0x080ab068 in ?? ()
#48 0x0816a5f8 in ?? ()
#49 0x08165930 in ?? ()
#50 0x081906f8 in ?? ()
#51 0x00000000 in ?? ()
#52 0x00000000 in ?? ()
#53 0x00000001 in ?? ()
#54 0x080660d8 in ?? ()
#55 0x00000000 in ?? ()
#56 0x00000000 in ?? ()
#57 0x08191828 in ?? ()
#58 0x080a84f8 in ?? ()
#59 0x0815a498 in ?? ()
#60 0x08054901 in typeinfo name for QMemArray<char> ()
#61 0x0805452c in vtable for Akregator::Application ()
#62 0x0815beb8 in ?? ()
#63 0x0815bd18 in ?? ()
#64 0x08174960 in ?? ()
#65 0x08056890 in vtable for QCString ()
#66 0x08064be8 in ?? ()
#67 0xbffff720 in ?? ()
#68 0x0815b9f8 in ?? ()
#69 0x08066aa0 in ?? ()
#70 0x00000133 in ?? ()
#71 0x000001ff in ?? ()
#72 0x08063818 in ?? ()
#73 0x0819af58 in ?? ()
#74 0x08059070 in ?? ()
#75 0xbffff601 in ?? ()
#76 0x0819f738 in ?? ()
#77 0x081a0b80 in ?? ()
#78 0xb664012a in QMetaObjectCleanUp::QMetaObjectCleanUp ()
   from /usr/share/qt3/lib/libqt-mt.so.3
Comment 2 Frank Osterfeld 2005-09-20 10:20:28 UTC
This is very severe, it crashes all the time.
Comment 3 Frank Osterfeld 2005-09-24 09:33:16 UTC
SVN commit 463464 by osterfeld:

don't crash when deleting items

Weird things happened in feed.cpp:772:

772: emit signalArticlesRemoved(this, d->removedArticlesNotify);
773: d->removedArticlesNotify.clear();

It seems clear() was called before the signal was finally handled by articlelist. (due to some delayed 
signal forwarding me thinks)
Also, the signal emit doesn't actually copy the list (not even on write), so the clear() breaks the 
refcounting in Article::d somehow, deleting the last Article referencing the Article::Private object of the 
deleted article. 
=> ArticleListView operates on Article objects with invalid d pointers.

BUG: 112932


 M  +3 -0      akregator_view.cpp  
 M  +3 -2      article.cpp  
 M  +10 -4     feed.cpp  


--- branches/KDE/3.5/kdepim/akregator/src/akregator_view.cpp #463463:463464
@@ -1304,7 +1304,10 @@
         }
 
         for (QValueList<Feed*>::Iterator it = feeds.begin(); it != feeds.end(); ++it)
+        {
             (*it)->setNotificationMode(true);
+        }
+
         if (m_listTabWidget->activeView()->selectedNode())
             m_listTabWidget->activeView()->selectedNode()->setNotificationMode(true);
     }
--- branches/KDE/3.5/kdepim/akregator/src/article.cpp #463463:463464
@@ -197,13 +197,14 @@
 {
     if (isDeleted())
         return;
-    if (d->feed)
-        d->feed->setArticleDeleted(*this);
+  
     setStatus(Read);
     d->status = Private::Deleted | Private::Read;
     d->archive->setStatus(d->guid, d->status);
     d->archive->setDeleted(d->guid);
 
+    if (d->feed)
+        d->feed->setArticleDeleted(*this);
 }
 
 bool Article::isDeleted() const
--- branches/KDE/3.5/kdepim/akregator/src/feed.cpp #463463:463464
@@ -711,7 +711,10 @@
 {
     if (!d->deletedArticles.contains(a))
         d->deletedArticles.append(a);
-    d->removedArticlesNotify.append(a);
+
+    if (!d->removedArticlesNotify.contains(a))
+        d->removedArticlesNotify.append(a);
+
     articlesModified();
 }
 
@@ -754,17 +757,20 @@
 {
     if (!d->addedArticlesNotify.isEmpty())
     {
-        emit signalArticlesAdded(this, d->addedArticlesNotify);
+        QValueList<Article> l = d->addedArticlesNotify;
+        emit signalArticlesAdded(this, l);
         d->addedArticlesNotify.clear();
     }
     if (!d->updatedArticlesNotify.isEmpty())
     {
-        emit signalArticlesUpdated(this, d->updatedArticlesNotify);
+        QValueList<Article> l = d->updatedArticlesNotify;
+        emit signalArticlesUpdated(this, l);
         d->updatedArticlesNotify.clear();
     }
     if (!d->removedArticlesNotify.isEmpty())
     {
-        emit signalArticlesRemoved(this, d->removedArticlesNotify);
+        QValueList<Article> l = d->removedArticlesNotify;
+        emit signalArticlesRemoved(this, l);
         d->removedArticlesNotify.clear();
     }
     TreeNode::doArticleNotification();
Comment 4 Frank Osterfeld 2005-09-24 09:42:38 UTC
SVN commit 463465 by osterfeld:

forwardport of 112932 (don't crash when deleting articles)
CCBUG: 112932


 M  +3 -0      akregator_view.cpp  
 M  +3 -2      article.cpp  
 M  +10 -4     feed.cpp  


--- trunk/KDE/kdepim/akregator/src/akregator_view.cpp #463464:463465
@@ -1290,7 +1290,10 @@
         }
 
         for (QList<Feed*>::Iterator it = feeds.begin(); it != feeds.end(); ++it)
+        {
             (*it)->setNotificationMode(true);
+        }
+
         if (m_listTabWidget->activeView()->selectedNode())
             m_listTabWidget->activeView()->selectedNode()->setNotificationMode(true);
     }
--- trunk/KDE/kdepim/akregator/src/article.cpp #463464:463465
@@ -197,13 +197,14 @@
 {
     if (isDeleted())
         return;
-    if (d->feed)
-        d->feed->setArticleDeleted(*this);
+  
     setStatus(Read);
     d->status = Private::Deleted | Private::Read;
     d->archive->setStatus(d->guid, d->status);
     d->archive->setDeleted(d->guid);
 
+    if (d->feed)
+        d->feed->setArticleDeleted(*this);
 }
 
 bool Article::isDeleted() const
--- trunk/KDE/kdepim/akregator/src/feed.cpp #463464:463465
@@ -712,7 +712,10 @@
 {
     if (!d->deletedArticles.contains(a))
         d->deletedArticles.append(a);
-    d->removedArticlesNotify.append(a);
+
+    if (!d->removedArticlesNotify.contains(a))
+        d->removedArticlesNotify.append(a);
+
     articlesModified();
 }
 
@@ -755,17 +758,20 @@
 {
     if (!d->addedArticlesNotify.isEmpty())
     {
-        emit signalArticlesAdded(this, d->addedArticlesNotify);
+        QList<Article> l = d->addedArticlesNotify;
+        emit signalArticlesAdded(this, l);
         d->addedArticlesNotify.clear();
     }
     if (!d->updatedArticlesNotify.isEmpty())
     {
-        emit signalArticlesUpdated(this, d->updatedArticlesNotify);
+        QList<Article> l = d->updatedArticlesNotify;
+        emit signalArticlesUpdated(this, l);
         d->updatedArticlesNotify.clear();
     }
     if (!d->removedArticlesNotify.isEmpty())
     {
-        emit signalArticlesRemoved(this, d->removedArticlesNotify);
+        QList<Article> l = d->removedArticlesNotify;
+        emit signalArticlesRemoved(this, l);
         d->removedArticlesNotify.clear();
     }
     TreeNode::doArticleNotification();
Comment 5 Thiago Macieira 2005-10-05 05:26:36 UTC
*** Bug 113845 has been marked as a duplicate of this bug. ***