Bug 118659 - Crash after removing a feed
Summary: Crash after removing a feed
Status: RESOLVED FIXED
Alias: None
Product: akregator
Classification: Applications
Component: general (show other bugs)
Version: 1.2
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-19 20:26 UTC by Malte S. Stretz
Modified: 2006-01-10 10:47 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Malte S. Stretz 2005-12-19 20:26:39 UTC
Version:           1.2 (using KDE 3.5.0, Gentoo)
Compiler:          gcc version 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)
OS:                Linux (i686) release 2.6.10-gentoo-r4

I moved, added and removed a few feeds and finally akregator crashed with the following backtrace:

(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(no debugging symbols found)
`system-supplied DSO at 0xffffe000' has disappeared; keeping its symbols.
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 3043)]
[KCrash handler]
#5  0x0806abb1 in ?? ()
#6  0xb5174bce in Akregator::NodeListView::slotNodeDestroyed ()
   from /usr/kde/3.5/lib/kde3/libakregatorpart.so
#7  0xb5175ca7 in Akregator::NodeListView::qt_invoke ()
   from /usr/kde/3.5/lib/kde3/libakregatorpart.so
#8  0xb5cbfd8a in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#9  0xb7f59346 in Akregator::TreeNode::signalDestroyed ()
   from /usr/kde/3.5/lib/libakregatorprivate.so
#10 0xb7f593cc in Akregator::TreeNode::emitSignalDestroyed ()
   from /usr/kde/3.5/lib/libakregatorprivate.so
#11 0xb7f50786 in Akregator::Feed::~Feed ()
   from /usr/kde/3.5/lib/libakregatorprivate.so
#12 0xb519c9d3 in Akregator::View::DeleteNodeVisitor::visitFeed ()
   from /usr/kde/3.5/lib/kde3/libakregatorpart.so
#13 0xb7f4de07 in Akregator::Feed::accept ()
   from /usr/kde/3.5/lib/libakregatorprivate.so
#14 0xb7f5aa94 in Akregator::TreeNodeVisitor::visit ()
   from /usr/kde/3.5/lib/libakregatorprivate.so
#15 0xb5194aa4 in Akregator::View::slotFeedRemove ()
   from /usr/kde/3.5/lib/kde3/libakregatorpart.so
#16 0xb519b73f in Akregator::View::qt_invoke ()
   from /usr/kde/3.5/lib/kde3/libakregatorpart.so
#17 0xb5cbfe32 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#18 0xb5cbfc1b in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#19 0xb690da71 in KAction::activated () from /usr/kde/3.5/lib/libkdeui.so.4
#20 0xb690e6f1 in KAction::slotActivated ()
   from /usr/kde/3.5/lib/libkdeui.so.4
#21 0xb6912205 in KAction::slotPopupActivated ()
   from /usr/kde/3.5/lib/libkdeui.so.4
#22 0xb69123f8 in KAction::qt_invoke () from /usr/kde/3.5/lib/libkdeui.so.4
#23 0xb5cbfe32 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#24 0xb609ee6a in QSignal::signal () from /usr/qt/3/lib/libqt-mt.so.3
#25 0xb5ce038a in QSignal::activate () from /usr/qt/3/lib/libqt-mt.so.3
#26 0xb5df61e7 in QPopupMenu::mouseReleaseEvent ()
   from /usr/qt/3/lib/libqt-mt.so.3
#27 0xb68f5ef4 in KPopupMenu::mouseReleaseEvent ()
   from /usr/kde/3.5/lib/libkdeui.so.4
#28 0xb5d025d7 in QWidget::event () from /usr/qt/3/lib/libqt-mt.so.3
#29 0xb5c504be in QApplication::internalNotify ()
   from /usr/qt/3/lib/libqt-mt.so.3
#30 0xb5c4f845 in QApplication::notify () from /usr/qt/3/lib/libqt-mt.so.3
#31 0xb64cd24b in KApplication::notify ()
   from /usr/kde/3.5/lib/libkdecore.so.4
#32 0xb5bd3694 in QETWidget::translateMouseEvent ()
   from /usr/qt/3/lib/libqt-mt.so.3
#33 0xb5bd1437 in QApplication::x11ProcessEvent ()
   from /usr/qt/3/lib/libqt-mt.so.3
#34 0xb5bee301 in QEventLoop::processEvents ()
   from /usr/qt/3/lib/libqt-mt.so.3
#35 0xb5c67068 in QEventLoop::enterLoop () from /usr/qt/3/lib/libqt-mt.so.3
#36 0xb5c508df in QApplication::enter_loop () from /usr/qt/3/lib/libqt-mt.so.3
#37 0xb5df9212 in QPopupMenu::exec () from /usr/qt/3/lib/libqt-mt.so.3
#38 0xb517b182 in Akregator::FeedItem::showContextMenu ()
   from /usr/kde/3.5/lib/kde3/libakregatorpart.so
#39 0xb5173ed6 in Akregator::NodeListView::slotContextMenu ()
   from /usr/kde/3.5/lib/kde3/libakregatorpart.so
#40 0xb5175eea in Akregator::NodeListView::qt_invoke ()
   from /usr/kde/3.5/lib/kde3/libakregatorpart.so
#41 0xb5cbfe32 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#42 0xb695f394 in KListView::contextMenu ()
   from /usr/kde/3.5/lib/libkdeui.so.4
#43 0xb695f3ef in KListView::emitContextMenu ()
   from /usr/kde/3.5/lib/libkdeui.so.4
#44 0xb6962640 in KListView::qt_invoke () from /usr/kde/3.5/lib/libkdeui.so.4
#45 0xb5175be5 in Akregator::NodeListView::qt_invoke ()
   from /usr/kde/3.5/lib/kde3/libakregatorpart.so
#46 0xb5cbfe32 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#47 0xb60b9085 in QListView::rightButtonPressed ()
   from /usr/qt/3/lib/libqt-mt.so.3
#48 0xb5dcbd92 in QListView::contentsMousePressEventEx ()
   from /usr/qt/3/lib/libqt-mt.so.3
#49 0xb5dcb6e4 in QListView::contentsMousePressEvent ()
   from /usr/qt/3/lib/libqt-mt.so.3
#50 0xb6958339 in KListView::contentsMousePressEvent ()
   from /usr/kde/3.5/lib/libkdeui.so.4
#51 0xb5e07523 in QScrollView::viewportMousePressEvent ()
   from /usr/qt/3/lib/libqt-mt.so.3
#52 0xb5e06bf8 in QScrollView::eventFilter () from /usr/qt/3/lib/libqt-mt.so.3
#53 0xb5dcafcc in QListView::eventFilter () from /usr/qt/3/lib/libqt-mt.so.3
#54 0xb5cbd10e in QObject::activate_filters ()
   from /usr/qt/3/lib/libqt-mt.so.3
#55 0xb5cbcf35 in QObject::event () from /usr/qt/3/lib/libqt-mt.so.3
#56 0xb5d0253a in QWidget::event () from /usr/qt/3/lib/libqt-mt.so.3
#57 0xb5c504be in QApplication::internalNotify ()
   from /usr/qt/3/lib/libqt-mt.so.3
#58 0xb5c4f845 in QApplication::notify () from /usr/qt/3/lib/libqt-mt.so.3
#59 0xb64cd24b in KApplication::notify ()
   from /usr/kde/3.5/lib/libkdecore.so.4
#60 0xb5bd3a9d in QETWidget::translateMouseEvent ()
   from /usr/qt/3/lib/libqt-mt.so.3
#61 0xb5bd1437 in QApplication::x11ProcessEvent ()
   from /usr/qt/3/lib/libqt-mt.so.3
#62 0xb5bee301 in QEventLoop::processEvents ()
   from /usr/qt/3/lib/libqt-mt.so.3
#63 0xb5c67068 in QEventLoop::enterLoop () from /usr/qt/3/lib/libqt-mt.so.3
#64 0xb5c66e84 in QEventLoop::exec () from /usr/qt/3/lib/libqt-mt.so.3
#65 0xb5c5081f in QApplication::exec () from /usr/qt/3/lib/libqt-mt.so.3
#66 0x080517a1 in ?? ()
#67 0xbffff140 in ?? ()
#68 0x00000000 in ?? ()
Comment 1 Avuton Olrich 2006-01-09 09:43:28 UTC
I got the same with:

Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 46912598508928 (LWP 6150)]
[KCrash handler]
#3  0x000000670072006f in ?? ()
#4  0x00002aaab12745bd in Akregator::NodeListView::slotNodeChanged (
    this=0x6e9660, node=0xc20bb0) at feedlistview.cpp:989
#5  0x00002aaab12756cf in Akregator::NodeListView::qt_invoke (this=0x6e9660, 
    _id=128, _o=0x7fffffcfa2a0) at feedlistview.moc:288
#6  0x00002aaaae5f50bd in QObject::activate_signal (this=0xc20bb0, 
    clist=0xbfdc00, o=0x7fffffcfa2a0) at qobject.cpp:2380
#7  0x00002aaaaac2ee20 in Akregator::TreeNode::signalChanged (this=0xc20bb0, 
    t0=0xc20bb0) at treenode.moc:148
#8  0x00002aaaaac3b820 in Akregator::FeedIconManager::slotIconChanged (
    this=0x8e2810, hostOrURL=@0x7fffffcfa550, iconName=@0xc20bb0)
    at feediconmanager.cpp:151
#9  0x00002aaaaac3ba20 in Akregator::FeedIconManager::loadIcon (this=0x8e2810, 
    url=@0x7fffffcfa550) at feediconmanager.cpp:102
#10 0x00002aaaaac3c008 in Akregator::FeedIconManager::fetchIcon (
    this=0x8e2810, feed=0xc20bb0) at feediconmanager.cpp:69
#11 0x00002aaab1277e10 in Akregator::FeedItem::initialize (this=0xb55190, 
    node=0xc20bb0) at feeditem.cpp:106
#12 0x00002aaab1277e82 in FeedItem (this=0xb55190, parent=0xc20bb0, 
    after=0xec2530, node=0xc20bb0) at feeditem.cpp:55
#13 0x00002aaab12762dd in Akregator::NodeListView::CreateItemVisitor::visitFeed
    (this=0x6f6270, node=0xc20bb0) at feedlistview.cpp:304
#14 0x00002aaaaac28850 in Akregator::Feed::accept (this=0xc20bb0, 
    visitor=0x6f6270) at feed.cpp:168
#15 0x00002aaaaac2fd16 in Akregator::TreeNodeVisitor::visit (this=0xec2560, 
    node=0xec2530) at treenodevisitor.cpp:32
#16 0x00002aaab1276e74 in Akregator::NodeListView::CreateItemVisitor::visitFolder (this=0x6f6270, node=0xbcc950) at feedlistview.cpp:288
#17 0x00002aaaaac31060 in Akregator::Folder::accept (this=0xbcc950, 
    visitor=0x6f6270) at folder.cpp:57
#18 0x00002aaaaac2fd16 in Akregator::TreeNodeVisitor::visit (this=0xec2560, 
    node=0xec2530) at treenodevisitor.cpp:32
#19 0x00002aaab127395d in Akregator::NodeListView::slotNodeAdded (
    this=0xec2530, node=0xbcc950) at feedlistview.cpp:907
#20 0x00002aaab127575d in Akregator::NodeListView::qt_invoke (this=0x6e9660, 
    _id=125, _o=0x7fffffcfa800) at feedlistview.moc:285
#21 0x00002aaaae5f50bd in QObject::activate_signal (this=0x8a9470, 
    clist=0x8a96d0, o=0x7fffffcfa800) at qobject.cpp:2380
#22 0x00002aaaaac3156f in Akregator::Folder::signalChildAdded (this=0x8a9470, 
    t0=0xbcc950) at folder.moc:133
#23 0x00002aaaaac32770 in Akregator::Folder::prependChild (this=0x8a9470, 
    node=0xbcc950) at folder.cpp:194
#24 0x00002aaaaac3188f in Akregator::Folder::insertChild (this=0x8a9470, 
    node=0xbcc950, after=0x0) at folder.cpp:143
#25 0x00002aaab1272c79 in Akregator::NodeListView::movableDropEvent (
    this=0x6e9660) at feedlistview.cpp:531
#26 0x00002aaaad0fc519 in KListView::contentsDropEvent (this=0x6e9660, 
    e=0x7fffffcfaf50) at klistview.cpp:910
#27 0x00002aaaae734dfc in QScrollView::viewportDropEvent (this=0x6e9660, 
    e=0x7fffffcfaf50) at qscrollview.cpp:1841
#28 0x00002aaaae734310 in QScrollView::eventFilter (this=0x6e9660, 
    obj=0x6ea3e0, e=0x7fffffcfaf50) at qscrollview.cpp:1538
#29 0x00002aaaae6fa954 in QListView::eventFilter (this=0x6e9660, o=0x6ea3e0, 
    e=0x7fffffcfaf50) at qlistview.cpp:3863
#30 0x00002aaaae5f2586 in QObject::activate_filters (this=0x6ea3e0, 
    e=0x7fffffcfaf50) at qobject.cpp:903
#31 0x00002aaaae5f23f0 in QObject::event (this=0x6ea3e0, e=0x7fffffcfaf50)
    at qobject.cpp:735
#32 0x00002aaaae634e6e in QWidget::event (this=0x6ea3e0, e=0x7fffffcfaf50)
    at qwidget.cpp:4659
#33 0x00002aaaae5887fb in QApplication::internalNotify (this=0x7fffffcfcc80, 
    receiver=0x6ea3e0, e=0x7fffffcfaf50) at qapplication.cpp:2635
#34 0x00002aaaae5884a5 in QApplication::notify (this=0x7fffffcfcc80, 
    receiver=0x6ea3e0, e=0x7fffffcfaf50) at qapplication.cpp:2523
#35 0x00002aaaad8393cc in KApplication::notify (this=0x7fffffcfcc80, 
    receiver=0x6ea3e0, event=0x7fffffcfaf50) at kapplication.cpp:550
#36 0x00002aaaabd1b3a5 in QApplication::sendEvent (receiver=0x6f63f0, 
    event=0xc20bb0) at qapplication.h:496
#37 0x00002aaaae51eab6 in qt_handle_xdnd_drop (xe=0x7fffffcfaff0, 
    passive=false) at qdnd_x11.cpp:850
#38 0x00002aaaae5204d1 in QDragManager::drop (this=0xedba70)
    at qdnd_x11.cpp:1429
#39 0x00002aaaae51f033 in QDragManager::eventFilter (this=0xedba70, 
    o=0xb30f70, e=0x7fffffcfb5a0) at qdnd_x11.cpp:980
#40 0x00002aaaae588642 in QApplication::internalNotify (this=0x7fffffcfcc80, 
    receiver=0xb30f70, e=0x7fffffcfb5a0) at qapplication.cpp:2568
#41 0x00002aaaae587e06 in QApplication::notify (this=0x7fffffcfcc80, 
    receiver=0xb30f70, e=0x7fffffcfb5a0) at qapplication.cpp:2421
#42 0x00002aaaad8393cc in KApplication::notify (this=0x7fffffcfcc80, 
    receiver=0xb30f70, event=0x7fffffcfb5a0) at kapplication.cpp:550
#43 0x00002aaaae5103b6 in QApplication::sendSpontaneousEvent (
    receiver=0xb30f70, event=0x7fffffcfb5a0) at qapplication.h:499
#44 0x00002aaaae509e2c in QETWidget::translateMouseEvent (this=0xb30f70, 
    event=0x7fffffcfbae0) at qapplication_x11.cpp:4296
#45 0x00002aaaae507897 in QApplication::x11ProcessEvent (this=0x7fffffcfcc80, 
    event=0x7fffffcfbae0) at qapplication_x11.cpp:3447
#46 0x00002aaaae524b3c in QEventLoop::processEvents (this=0x5a1b60, flags=4)
    at qeventloop_x11.cpp:192
#47 0x00002aaaae59f868 in QEventLoop::enterLoop (this=0x5a1b60)
    at qeventloop.cpp:198
#48 0x00002aaaae588992 in QApplication::enter_loop (this=0x7fffffcfcc80)
    at qapplication.cpp:2793
#49 0x00002aaaae521250 in QDragManager::drag (this=0xedba70, o=0xb2f670, 
    mode=QDragObject::DragDefault) at qdnd_x11.cpp:1788
#50 0x00002aaaae595fbc in QDragObject::drag (this=0xb2f670, 
    mode=QDragObject::DragDefault) at qdragobject.cpp:547
#51 0x00002aaaae595f05 in QDragObject::drag (this=0xb2f670)
    at qdragobject.cpp:469
#52 0x00002aaaad0fcf47 in KListView::startDrag (this=0x6e9660)
    at klistview.cpp:1144
#53 0x00002aaaad0f7a5b in KListView::contentsMouseMoveEvent (this=0x6e9660, 
    e=0x7fffffcfbe50) at klistview.cpp:828
#54 0x00002aaaae734c44 in QScrollView::viewportMouseMoveEvent (this=0x6e9660, 
    e=0x7fffffcfc5e0) at qscrollview.cpp:1780
#55 0x00002aaaae7341ca in QScrollView::eventFilter (this=0x6e9660, 
    obj=0x6ea3e0, e=0x7fffffcfc5e0) at qscrollview.cpp:1510
#56 0x00002aaaae6fa954 in QListView::eventFilter (this=0x6e9660, o=0x6ea3e0, 
    e=0x7fffffcfc5e0) at qlistview.cpp:3863
#57 0x00002aaaae5f2586 in QObject::activate_filters (this=0x6ea3e0, 
    e=0x7fffffcfc5e0) at qobject.cpp:903
#58 0x00002aaaae5f23f0 in QObject::event (this=0x6ea3e0, e=0x7fffffcfc5e0)
    at qobject.cpp:735
#59 0x00002aaaae634e6e in QWidget::event (this=0x6ea3e0, e=0x7fffffcfc5e0)
    at qwidget.cpp:4659
#60 0x00002aaaae5887fb in QApplication::internalNotify (this=0x7fffffcfcc80, 
    receiver=0x6ea3e0, e=0x7fffffcfc5e0) at qapplication.cpp:2635
#61 0x00002aaaae587e06 in QApplication::notify (this=0x7fffffcfcc80, 
    receiver=0x6ea3e0, e=0x7fffffcfc5e0) at qapplication.cpp:2421
#62 0x00002aaaad8393cc in KApplication::notify (this=0x7fffffcfcc80, 
    receiver=0x6ea3e0, event=0x7fffffcfc5e0) at kapplication.cpp:550
#63 0x00002aaaae5103b6 in QApplication::sendSpontaneousEvent (
    receiver=0x6ea3e0, event=0x7fffffcfc5e0) at qapplication.h:499
#64 0x00002aaaae509e2c in QETWidget::translateMouseEvent (this=0x6ea3e0, 
    event=0x7fffffcfcb20) at qapplication_x11.cpp:4296
#65 0x00002aaaae507897 in QApplication::x11ProcessEvent (this=0x7fffffcfcc80, 
    event=0x7fffffcfcb20) at qapplication_x11.cpp:3447
#66 0x00002aaaae524b3c in QEventLoop::processEvents (this=0x5a1b60, flags=4)
    at qeventloop_x11.cpp:192
#67 0x00002aaaae59f868 in QEventLoop::enterLoop (this=0x5a1b60)
    at qeventloop.cpp:198
#68 0x00002aaaae59f765 in QEventLoop::exec (this=0x5a1b60)
    at qeventloop.cpp:145
#69 0x00002aaaae588948 in QApplication::exec (this=0x7fffffcfcc80)
    at qapplication.cpp:2758
#70 0x000000000040bd42 in main (argc=1, argv=0x7fffffcfcfa8) at main.cpp:110
Comment 2 Frank Osterfeld 2006-01-09 09:59:07 UTC
The first bt is caused by removing, the second by adding a feed. Can you reproduce this crash or does it just happen occasionally?
Comment 3 Avuton Olrich 2006-01-09 10:05:42 UTC
I had one crash that was removing (unfortunately I closed the window on the bt, hopefully the one above). I have used akregator on another computer (32 bit) with no issue before this, when I moved my feed to this computer and I was moving stuff around after the import it happened then. It happens at random times, and it not reliably reproducable.
Comment 4 Avuton Olrich 2006-01-09 10:08:56 UTC
Please excuse me, I'm having a brainfart (I had it crash 3 times on me while I was moving around and deleting). It only crashed the one time on the feed deletion.
Comment 5 Malte S. Stretz 2006-01-09 10:16:15 UTC
I don't know any way to reproduce it reliably, it just happens now and then (more now than then I think).  IIRC have I seen this behavior since quite some time, I didn't use akregator for a while becase it was just too unstable.
Comment 6 Frank Osterfeld 2006-01-09 10:55:04 UTC
I correct, the second is caused by moving a folder.

A way to make it crash on delete: move a folder with subitems, delete a subitem.

#0  0x08064d19 in ?? ()
#1  0xb5b37dd9 in Akregator::NodeListView::slotNodeDestroyed (this=0x8256bd0, node=0x8b38500) at feedlistview.cpp:977
#2  0xb5b384fe in Akregator::NodeListView::qt_invoke (this=0x8256bd0, _id=127, _o=0xbf925014) at feedlistview.moc:280
#3  0xb65f8a56 in QObject::activate_signal () from /usr/share/qt3/lib/libqt-mt.so.3
#4  0xb7ecabea in Akregator::TreeNode::signalDestroyed (this=0x8b38500, t0=0x8b38500) at treenode.moc:135
#5  0xb7ecac37 in Akregator::TreeNode::emitSignalDestroyed (this=0x8b38500) at treenode.cpp:65
#6  0xb7ec5911 in ~Feed (this=0x8b38500) at feed.cpp:286
#7  0xb5b51de7 in Akregator::View::DeleteNodeVisitor::visitFeed (this=0x8065880, node=0x8b38500) at akregator_view.cpp:188
#8  0xb7ec3c05 in Akregator::Feed::accept (this=0x8b38500, visitor=0x8247a20) at feed.cpp:173
#9  0xb7ecba23 in Akregator::TreeNodeVisitor::visit (this=0x8247a20, node=0x8065880) at treenodevisitor.cpp:32
#10 0xb5b4c237 in Akregator::View::slotFeedRemove (this=0x8245a98) at akregator_view.cpp:972
#11 0xb5b51047 in Akregator::View::qt_invoke (this=0x8245a98, _id=72, _o=0xbf92525c) at akregator_view.moc:407
#12 0xb65f8929 in QObject::activate_signal () from /usr/share/qt3/lib/libqt-mt.so.3
#13 0xb65f93c4 in QObject::activate_signal () from /usr/share/qt3/lib/libqt-mt.so.3
#14 0xb6efad16 in KAction::activated (this=0x82b4930) at kaction.moc:176
#15 0xb6efae4b in KAction::slotActivated (this=0x82b4930) at kaction.cpp:1102
#16 0xb6f00c8c in KAction::qt_invoke (this=0x82b4930, _id=15, _o=0xbf92537c) at kaction.moc:218
#17 0xb65f8929 in QObject::activate_signal () from /usr/share/qt3/lib/libqt-mt.so.3
#18 0xb65f93c4 in QObject::activate_signal () from /usr/share/qt3/lib/libqt-mt.so.3
#19 0xb6c9e206 in KAccelPrivate::menuItemActivated (this=0x81ea778) at kaccelprivate.moc:110
#20 0xb6c9ea4b in KAccelPrivate::emitActivatedSignal (this=0x81ea778, pAction=0x8329110) at kaccel.cpp:400
#21 0xb6ca133a in KAccelPrivate::eventFilter (this=0x81ea778, pEvent=0xbf92585c) at kaccel.cpp:370
#22 0xb65f5a72 in QObject::activate_filters () from /usr/share/qt3/lib/libqt-mt.so.3
#23 0xb65f5af0 in QObject::event () from /usr/share/qt3/lib/libqt-mt.so.3
#24 0xb6633268 in QWidget::event () from /usr/share/qt3/lib/libqt-mt.so.3
#25 0xb670327a in QMainWindow::event () from /usr/share/qt3/lib/libqt-mt.so.3
#26 0xb658ff80 in QApplication::internalNotify () from /usr/share/qt3/lib/libqt-mt.so.3
#27 0xb659030e in QApplication::notify () from /usr/share/qt3/lib/libqt-mt.so.3
#28 0xb6c0f80c in KApplication::notify (this=0xbf925d44, receiver=0x8256bd0, event=0xbf92585c) at kapplication.cpp:550
#29 0xb6c9e827 in KAccelEventHandler::x11Event (this=0x8190928, pEvent=0xbf925ba8) at qapplication.h:491
#30 0xb6c139ed in KApplication::x11EventFilter (this=0xbf925d44, _event=0xbf925ba8) at kapplication.cpp:1652
#31 0xb650cdb3 in qt_set_x11_event_filter () from /usr/share/qt3/lib/libqt-mt.so.3
#32 0xb6519fe4 in QApplication::x11ProcessEvent () from /usr/share/qt3/lib/libqt-mt.so.3
#33 0xb6533fff in QEventLoop::processEvents () from /usr/share/qt3/lib/libqt-mt.so.3
#34 0xb65a7cfb in QEventLoop::enterLoop () from /usr/share/qt3/lib/libqt-mt.so.3
#35 0xb65a7c1e in QEventLoop::exec () from /usr/share/qt3/lib/libqt-mt.so.3
#36 0xb658ec13 in QApplication::exec () from /usr/share/qt3/lib/libqt-mt.so.3
#37 0x08051400 in main (argc=1, argv=0xbf925ef4) at main.cpp:110
Comment 7 Frank Osterfeld 2006-01-10 10:47:23 UTC
SVN commit 496291 by osterfeld:

Properly remove subitems recursively from the item dict when deleting the parent items. This should fix several crashes 
like: "Move a folder, delete a subitem, Crash".
BUG: 118659


 M  +72 -32    feedlistview.cpp  
 M  +3 -0      feedlistview.h  


--- branches/KDE/3.5/kdepim/akregator/src/feedlistview.cpp #496290:496291
@@ -71,6 +71,7 @@
     ConnectNodeVisitor* connectNodeVisitor;
     DisconnectNodeVisitor* disconnectNodeVisitor;
     CreateItemVisitor* createItemVisitor;
+    DeleteItemVisitor* deleteItemVisitor;
     DragAndDropVisitor* dragAndDropVisitor;
 };
 
@@ -186,6 +187,57 @@
         NodeListView* m_view;
 };
 
+class NodeListView::DeleteItemVisitor : public TreeNodeVisitor
+{
+    public:
+        
+        DeleteItemVisitor(NodeListView* view) : m_view(view) {}
+        
+        virtual bool visitTreeNode(TreeNode* node)
+        {
+            TreeNodeItem* item = m_view->d->itemDict.take(node);
+    
+            if (!item)
+                return true;
+    
+            if ( m_selectNeighbour && item->isSelected() )
+            {
+                if (item->itemBelow())
+                    m_view->setSelected(item->itemBelow(), true);
+                else if (item->itemAbove())
+                    m_view->setSelected(item->itemAbove(), true);
+                else
+                    m_view->setSelected(item, false);
+            }
+            
+            delete item;
+            return true;
+        
+        }
+        
+        virtual bool visitFolder(Folder* node)
+        {
+            // delete child items recursively before deleting parent
+            QValueList<TreeNode*> children = node->children();
+            for (QValueList<TreeNode*>::ConstIterator it =  children.begin(); it != children.end(); ++it )
+                visit(*it);
+            
+            visitTreeNode(node);
+            
+            return true;
+        }
+        
+        void deleteItem(TreeNode* node, bool selectNeighbour)
+        {
+            m_selectNeighbour = selectNeighbour;
+            visit(node);
+        }
+        
+    private:
+        NodeListView* m_view;
+        bool m_selectNeighbour;
+};
+
 class NodeListView::CreateItemVisitor : public TreeNodeVisitor
 {
     public:
@@ -193,7 +245,6 @@
 
         virtual bool visitTagNode(TagNode* node)
         {
-            kdDebug() << "create item for " << node->title() << endl;
             TagNodeItem* item = 0;
             TreeNode* prev = node->prevSibling();
             FolderItem* parentItem = static_cast<FolderItem*>(m_view->findNodeItem(node->parent()));
@@ -281,9 +332,9 @@
                     item = new FolderItem(m_view, node);
             }
             m_view->d->itemDict.insert(node, item);
+            
+            // add children recursively
             QValueList<TreeNode*> children = node->children();
-
-            // add children recursively
             for (QValueList<TreeNode*>::ConstIterator it =  children.begin(); it != children.end(); ++it )
                 visit(*it);
 
@@ -333,6 +384,7 @@
     d->connectNodeVisitor = new ConnectNodeVisitor(this),
     d->disconnectNodeVisitor = new DisconnectNodeVisitor(this);
     d->createItemVisitor = new CreateItemVisitor(this);
+    d->deleteItemVisitor = new DeleteItemVisitor(this);
     d->dragAndDropVisitor = new DragAndDropVisitor(this);
 
     setMinimumSize(150, 150);
@@ -372,6 +424,7 @@
     delete d->connectNodeVisitor;
     delete d->disconnectNodeVisitor;
     delete d->createItemVisitor;
+    delete d->deleteItemVisitor;
     delete d->dragAndDropVisitor;
     delete d;
     d = 0;
@@ -841,9 +894,12 @@
 
 void NodeListView::slotSelectionChanged(QListViewItem* item)
 {
- TreeNodeItem* ni = dynamic_cast<TreeNodeItem*> (item);
+    TreeNodeItem* ni = dynamic_cast<TreeNodeItem*> (item);
+    
     if (ni)
+    {
         emit signalNodeSelected(ni->node());
+    }
 }
 
 void NodeListView::slotItemRenamed(QListViewItem* item, int col, const QString& text)
@@ -855,7 +911,6 @@
     {
         if (text != ni->node()->title())
         {
-            kdDebug() << "renamed item to \"" << text << "\"" << endl;
             ni->node()->setTitle(text);
         }
     }
@@ -874,9 +929,12 @@
     if (!feed->favicon().isNull())
     {
         TreeNodeItem* item = findNodeItem(feed);
-        KIconEffect iconEffect;
-        QPixmap tempIcon = iconEffect.apply(feed->favicon(), KIcon::Small, KIcon::DisabledState);
-        item->setPixmap(0, tempIcon);
+        if (item)
+        {
+            KIconEffect iconEffect;
+            QPixmap tempIcon = iconEffect.apply(feed->favicon(), KIcon::Small, KIcon::DisabledState);
+            item->setPixmap(0, tempIcon);
+        }
     }
 
 }
@@ -904,17 +962,14 @@
       
 void NodeListView::slotNodeAdded(TreeNode* node)
 {
-    d->createItemVisitor->visit(node);
-    kdDebug() << "NodeListView::slotNodeAdded: " << node->title() << endl;
+    if (node)
+        d->createItemVisitor->visit(node);
 }
 
 void NodeListView::slotNodeRemoved(Folder* /*parent*/, TreeNode* node)
 {
-    if (!node)
-        return;
-    kdDebug() << "NodeListView::slotNodeRemoved: " << node->title() << endl; 
-    disconnectFromNode(node);
-    delete d->itemDict.take(node);
+    if (node)
+        d->deleteItemVisitor->deleteItem(node, false);
 }
 
 void NodeListView::connectToNode(TreeNode* node)
@@ -957,23 +1012,8 @@
 
 void NodeListView::slotNodeDestroyed(TreeNode* node)
 {
-    TreeNodeItem* item = findNodeItem(node);
-    
-    d->itemDict.remove(node);
-
-    if (!item)
-        return;
-    
-    if ( item->isSelected() )
-    {
-        if (item->itemBelow())
-            setSelected(item->itemBelow(), true);
-        else if (item->itemAbove())
-            setSelected(item->itemAbove(), true);
-        else
-            setSelected(item, false);
-    }
-    delete item;
+    if (node)
+        d->deleteItemVisitor->deleteItem(node, true);
 }
 
 void NodeListView::slotRootNodeChanged(TreeNode* rootNode)
--- branches/KDE/3.5/kdepim/akregator/src/feedlistview.h #496290:496291
@@ -178,6 +178,9 @@
     friend class CreateItemVisitor;
     class CreateItemVisitor;
 
+    friend class DeleteItemVisitor;
+    class DeleteItemVisitor;
+    
     friend class DragAndDropVisitor;
     class DragAndDropVisitor;