Bug 219547

Summary: [steps] Dolphin crashes after expanding a linked directory
Product: [Frameworks and Libraries] kio Reporter: Martin Kho <kde-bugs>
Component: generalAssignee: David Faure <faure>
Status: RESOLVED FIXED    
Severity: crash CC: andresbajotierra, jvoege1091, peter.penz19
Priority: NOR Keywords: reproducible, testcase
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Martin Kho 2009-12-21 13:53:55 UTC
Version:           4.3.85 (KDE 4.3.85 (KDE 4.4 Beta2), dolphin (1.3.80)) (using Devel)
OS:                Linux
Installed from:    Compiled sources

Application: dolphin (1.3.80)
KDE Platform Version: 4.3.85 (KDE 4.3.85 (KDE 4.4 Beta2))
Qt Version: 4.6.0
Operating System: Linux 2.6.32.2-14.fc13.x86_64 x86_64
Distribution: "Fedora release 13 (Rawhide)"

-- Information about the crash:
In "Details view" and "Expandable Folders" enabled (Settings -> Configure Dolphin -> View Modes -> Details) clicking on "+" of a linked directory (e.g. ~/.kde/tmp-<computername>.<domain>) crashes Dolphin.

The crash can be reproduced everytime.

 -- Backtrace:
Application: Dolphin (dolphin), signal: Segmentation fault
82	T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
The current source language is "auto; currently asm".
[KCrash Handler]
#5  KDirModelNode::rowNumber (this=0x0) at /usr/src/debug/kdelibs-4.3.85/kio/kio/kdirmodel.cpp:120
#6  0x00007ffff68f72b1 in KDirModelPrivate::indexForNode (this=<value optimized out>, node=0x0, rowNumber=<value optimized out>) at /usr/src/debug/kdelibs-4.3.85/kio/kio/kdirmodel.cpp:284
#7  0x00007ffff68fa3b6 in KDirModelPrivate::_k_slotNewItems (this=0x8fba90, directoryUrl=<value optimized out>, items=...) at /usr/src/debug/kdelibs-4.3.85/kio/kio/kdirmodel.cpp:380
#8  0x00007ffff68fd3e6 in KDirModel::qt_metacall (this=0x8fdaf0, _c=InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffffffc4b0)
    at /usr/src/debug/kdelibs-4.3.85/x86_64-redhat-linux-gnu/kio/kdirmodel.moc:88
#9  0x00007ffff7644b70 in DolphinModel::qt_metacall (this=0x8fdaf0, _c=InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffffffc4b0)
    at /usr/src/debug/kdebase-4.3.85/x86_64-redhat-linux-gnu/apps/dolphin/src/moc_dolphinmodel.cpp:68
#10 0x0000003940d78853 in QMetaObject::activate (sender=0x901cf0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x7fffffffc4b0) at kernel/qobject.cpp:3294
#11 0x00007ffff68e056a in KDirLister::itemsAdded (this=<value optimized out>, _t1=<value optimized out>, _t2=) at /usr/src/debug/kdelibs-4.3.85/x86_64-redhat-linux-gnu/kio/kdirlister.moc:274
#12 0x00007ffff68e12c7 in KDirLister::Private::emitItems (this=0x902110) at /usr/src/debug/kdelibs-4.3.85/kio/kio/kdirlister.cpp:2307
#13 0x00007ffff68e47f6 in KDirListerCache::slotEntries (this=<value optimized out>, job=<value optimized out>, entries=<value optimized out>)
    at /usr/src/debug/kdelibs-4.3.85/kio/kio/kdirlister.cpp:1105
#14 0x00007ffff68f4707 in KDirListerCache::qt_metacall (this=0x8aae60, _c=InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffffffc910)
    at /usr/src/debug/kdelibs-4.3.85/x86_64-redhat-linux-gnu/kio/kdirlister_p.moc:104
#15 0x0000003940d78853 in QMetaObject::activate (sender=0xc03060, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x7fffffffc910) at kernel/qobject.cpp:3294
#16 0x00007ffff68bbcd4 in KIO::ListJob::entries (this=<value optimized out>, _t1=0xc03060, _t2=<value optimized out>) at /usr/src/debug/kdelibs-4.3.85/x86_64-redhat-linux-gnu/kio/jobclasses.moc:835
#17 0x00007ffff68c9df9 in KIO::ListJobPrivate::slotListEntries (this=<value optimized out>, list=<value optimized out>) at /usr/src/debug/kdelibs-4.3.85/kio/kio/job.cpp:2376
#18 0x00007ffff68ca51a in KIO::ListJob::qt_metacall (this=0xc03060, _c=InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffffffcc90)
    at /usr/src/debug/kdelibs-4.3.85/x86_64-redhat-linux-gnu/kio/jobclasses.moc:821
#19 0x0000003940d78853 in QMetaObject::activate (sender=0x9fa0a0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x7fffffffcc90) at kernel/qobject.cpp:3294
#20 0x00007ffff697f795 in KIO::SlaveInterface::listEntries (this=<value optimized out>, _t1=<value optimized out>) at /usr/src/debug/kdelibs-4.3.85/x86_64-redhat-linux-gnu/kio/slaveinterface.moc:185
#21 0x00007ffff6982765 in KIO::SlaveInterface::dispatch (this=0x9fa0a0, _cmd=<value optimized out>, rawdata=...) at /usr/src/debug/kdelibs-4.3.85/kio/kio/slaveinterface.cpp:193
#22 0x00007ffff697fb63 in KIO::SlaveInterface::dispatch (this=0x9fa0a0) at /usr/src/debug/kdelibs-4.3.85/kio/kio/slaveinterface.cpp:91
#23 0x00007ffff6973edd in KIO::Slave::gotInput (this=0x9fa0a0) at /usr/src/debug/kdelibs-4.3.85/kio/kio/slave.cpp:322
#24 0x00007ffff69740dc in KIO::Slave::qt_metacall (this=0x9fa0a0, _c=InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffffffd080)
    at /usr/src/debug/kdelibs-4.3.85/x86_64-redhat-linux-gnu/kio/slave.moc:82
#25 0x0000003940d78853 in QMetaObject::activate (sender=0xab9820, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x0) at kernel/qobject.cpp:3294
#26 0x00007ffff6892d67 in KIO::ConnectionPrivate::dequeue (this=0xb0c580) at /usr/src/debug/kdelibs-4.3.85/kio/kio/connection.cpp:82
#27 0x00007ffff6892e7d in KIO::Connection::qt_metacall (this=0xab9820, _c=InvokeMetaMethod, _id=<value optimized out>, _a=0x9abd60)
    at /usr/src/debug/kdelibs-4.3.85/x86_64-redhat-linux-gnu/kio/connection.moc:79
#28 0x0000003940d757b1 in QObject::event (this=0xab9820, e=0xc03010) at kernel/qobject.cpp:1260
#29 0x0000003943fab9cc in QApplicationPrivate::notify_helper (this=0x6c2520, receiver=0xab9820, e=0xc03010) at kernel/qapplication.cpp:4242
#30 0x0000003943fb1f65 in QApplication::notify (this=<value optimized out>, receiver=0xab9820, e=0xc03010) at kernel/qapplication.cpp:4125
#31 0x00007ffff63af376 in KApplication::notify (this=0x7fffffffdaf0, receiver=0xab9820, event=0xc03010) at /usr/src/debug/kdelibs-4.3.85/kdeui/kernel/kapplication.cpp:302
#32 0x0000003940d65a2c in QCoreApplication::notifyInternal (this=0x7fffffffdaf0, receiver=0xab9820, event=0xc03010) at kernel/qcoreapplication.cpp:704
#33 0x0000003940d668a7 in sendEvent (event=<value optimized out>, receiver=<value optimized out>) at kernel/qcoreapplication.h:215
#34 QCoreApplicationPrivate::sendPostedEvents (event=<value optimized out>, receiver=<value optimized out>) at kernel/qcoreapplication.cpp:1345
#35 0x0000003940d8f2a3 in sendPostedEvents () at kernel/qcoreapplication.h:220
#36 postEventSourceDispatch () at kernel/qeventdispatcher_glib.cpp:276
#37 0x0000003937c3938e in g_main_dispatch (context=<value optimized out>) at gmain.c:1960
#38 IA__g_main_context_dispatch (context=<value optimized out>) at gmain.c:2513
#39 0x0000003937c3cd78 in g_main_context_iterate (context=0x6c6120, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at gmain.c:2591
#40 0x0000003937c3ce9a in IA__g_main_context_iteration (context=0x6c6120, may_block=1) at gmain.c:2654
#41 0x0000003940d8ede3 in QEventDispatcherGlib::processEvents (this=0x6992b0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:407
#42 0x0000003944057ece in QGuiEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:202
#43 0x0000003940d64362 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#44 0x0000003940d6473c in QEventLoop::exec (this=0x7fffffffda40, flags=...) at kernel/qeventloop.cpp:201
#45 0x0000003940d66b59 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#46 0x0000000000437865 in main (argc=<value optimized out>, argv=<value optimized out>) at /usr/src/debug/kdebase-4.3.85/apps/dolphin/src/main.cpp:94

Possible duplicates by query: bug 218704, bug 218311, bug 217924, bug 217645, bug 216705.

Report to https://bugs.kde.org failed with an unknown error, so I reported by hand :-)
Comment 1 Dario Andres 2009-12-21 15:25:31 UTC
I can reproduce the crash with the described steps, here using:

Qt: 4.6.0 (kde-qt master commit 747ff8e6ef6f5a1163dfa75bc9ac4755ce7083d1
        Date:   Tue Dec 15 11:58:13 2009 +0100)
KDE Development Platform: 4.3.82 (KDE 4.3.82 (KDE 4.4 >= 20091211))
kdelibs svn rev. 1063229 / kdebase svn rev. 1063229
on ArchLinux i686 - Kernel 2.6.31.6

Backtrace:
---

Application: Dolphin (dolphin), signal: Segmentation fault
[KCrash Handler]
#6  KDirModelNode::rowNumber (this=0x0) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/kdirmodel.cpp:120
#7  0xb7277a23 in KDirModelPrivate::indexForNode (this=0x9c6aed0, node=0x0, rowNumber=0) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/kdirmodel.cpp:284
#8  0xb727aeab in KDirModelPrivate::_k_slotNewItems (this=0x9c6aed0, directoryUrl=..., items=...) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/kdirmodel.cpp:380
#9  0xb727e2c7 in KDirModel::qt_metacall (this=0x9c4cc08, _c=QMetaObject::InvokeMetaMethod, _id=26, _a=0xbf8786a4) at /home/kde-devel/kde/build/KDE/kdelibs/kio/kdirmodel.moc:88
#10 0xb773beba in DolphinModel::qt_metacall (this=0x9c4cc08, _c=QMetaObject::InvokeMetaMethod, _id=26, _a=0xbf8786a4) at /home/kde-devel/kde/build/KDE/kdebase/apps/dolphin/src/moc_dolphinmodel.cpp:68
#11 0xb687f9c4 in QMetaObject::metacall (object=0x9c4cc08, cl=QMetaObject::InvokeMetaMethod, idx=26, argv=0xbf8786a4) at kernel/qmetaobject.cpp:237
#12 0xb6893a85 in QMetaObject::activate (sender=0x9c82328, m=0x80d4a20, local_signal_index=10, argv=0xbf8786a4) at kernel/qobject.cpp:3294
#13 0xb725f969 in KDirLister::itemsAdded (this=0x9c82328, _t1=..., _t2=...) at /home/kde-devel/kde/build/KDE/kdelibs/kio/kdirlister.moc:274
#14 0xb72609b6 in KDirLister::Private::emitItems (this=0x9c2d690) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/kdirlister.cpp:2307
#15 0xb7264185 in KDirListerCache::slotEntries (this=0x9c609d8, job=0x9f3c6d8, entries=...) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/kdirlister.cpp:1105
#16 0xb7274cc6 in KDirListerCache::qt_metacall (this=0x9c609d8, _c=QMetaObject::InvokeMetaMethod, _id=11, _a=0xbf878954) at /home/kde-devel/kde/build/KDE/kdelibs/kio/kdirlister_p.moc:104
#17 0xb687f9c4 in QMetaObject::metacall (object=0x9c609d8, cl=QMetaObject::InvokeMetaMethod, idx=11, argv=0xbf878954) at kernel/qmetaobject.cpp:237
#18 0xb6893a85 in QMetaObject::activate (sender=0x9f3c6d8, m=0xb741b040, local_signal_index=0, argv=0xbf878954) at kernel/qobject.cpp:3294
#19 0xb72388d9 in KIO::ListJob::entries (this=0x9f3c6d8, _t1=0x9f3c6d8, _t2=...) at /home/kde-devel/kde/build/KDE/kdelibs/kio/jobclasses.moc:835
#20 0xb72479c3 in KIO::ListJobPrivate::slotListEntries (this=0x9ed9248, list=...) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/job.cpp:2376
#21 0xb7247d78 in KIO::ListJob::qt_metacall (this=0x9f3c6d8, _c=QMetaObject::InvokeMetaMethod, _id=46, _a=0xbf878b68) at /home/kde-devel/kde/build/KDE/kdelibs/kio/jobclasses.moc:821
#22 0xb687f9c4 in QMetaObject::metacall (object=0x9f3c6d8, cl=QMetaObject::InvokeMetaMethod, idx=46, argv=0xbf878b68) at kernel/qmetaobject.cpp:237
#23 0xb6893a85 in QMetaObject::activate (sender=0x9ba9638, m=0xb741dc64, local_signal_index=6, argv=0xbf878b68) at kernel/qobject.cpp:3294
#24 0xb730adf3 in KIO::SlaveInterface::listEntries (this=0x9ba9638, _t1=...) at /home/kde-devel/kde/build/KDE/kdelibs/kio/slaveinterface.moc:185
#25 0xb730e117 in KIO::SlaveInterface::dispatch (this=0x9ba9638, _cmd=106, rawdata=...) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/slaveinterface.cpp:193
#26 0xb730b363 in KIO::SlaveInterface::dispatch (this=0x9ba9638) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/slaveinterface.cpp:91
#27 0xb72fe6f0 in KIO::Slave::gotInput (this=0x9ba9638) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/slave.cpp:322
#28 0xb72fe923 in KIO::Slave::qt_metacall (this=0x9ba9638, _c=QMetaObject::InvokeMetaMethod, _id=30, _a=0xbf878e18) at /home/kde-devel/kde/build/KDE/kdelibs/kio/slave.moc:82
#29 0xb687f9c4 in QMetaObject::metacall (object=0x9ba9638, cl=QMetaObject::InvokeMetaMethod, idx=30, argv=0xbf878e18) at kernel/qmetaobject.cpp:237
#30 0xb6893a85 in QMetaObject::activate (sender=0x9c0ccf8, m=0xb741a540, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3294
#31 0xb7209fc7 in KIO::Connection::readyRead (this=0x9c0ccf8) at /home/kde-devel/kde/build/KDE/kdelibs/kio/connection.moc:92
#32 0xb720c35e in KIO::ConnectionPrivate::dequeue (this=0x9df98e8) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/connection.cpp:82
#33 0xb720c48e in KIO::Connection::qt_metacall (this=0x9c0ccf8, _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0x9d511b0) at /home/kde-devel/kde/build/KDE/kdelibs/kio/connection.moc:79
#34 0xb687f9c4 in QMetaObject::metacall (object=0x9c0ccf8, cl=QMetaObject::InvokeMetaMethod, idx=5, argv=0x9d511b0) at kernel/qmetaobject.cpp:237
#35 0xb688d93b in QMetaCallEvent::placeMetaCall (this=0x9f423e0, object=0x9c0ccf8) at kernel/qobject.cpp:574
#36 0xb688fb89 in QObject::event (this=0x9c0ccf8, e=0x9f423e0) at kernel/qobject.cpp:1260
#37 0xb5a2a834 in QApplicationPrivate::notify_helper (this=0x9aecf78, receiver=0x9c0ccf8, e=0x9f423e0) at kernel/qapplication.cpp:4242
#38 0xb5a28231 in QApplication::notify (this=0xbf87988c, receiver=0x9c0ccf8, e=0x9f423e0) at kernel/qapplication.cpp:3661
#39 0xb6f5212a in KApplication::notify (this=0xbf87988c, receiver=0x9c0ccf8, event=0x9f423e0) at /home/kde-devel/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:302
#40 0xb6878411 in QCoreApplication::notifyInternal (this=0xbf87988c, receiver=0x9c0ccf8, event=0x9f423e0) at kernel/qcoreapplication.cpp:704
#41 0xb687bee9 in QCoreApplication::sendEvent (receiver=0x9c0ccf8, event=0x9f423e0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#42 0xb68794c5 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x9ab59f0) at kernel/qcoreapplication.cpp:1345
#43 0xb687917d in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1238
#44 0xb68b055e in QCoreApplication::sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#45 0xb68aee4c in postEventSourceDispatch (s=0x9af7918) at kernel/qeventdispatcher_glib.cpp:276
#46 0xb515d378 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#47 0xb5160bf0 in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#48 0xb5160d23 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#49 0xb68afe48 in QEventDispatcherGlib::processEvents (this=0x9ab5470, flags=...) at kernel/qeventdispatcher_glib.cpp:407
#50 0xb5afed50 in QGuiEventDispatcherGlib::processEvents (this=0x9ab5470, flags=...) at kernel/qguieventdispatcher_glib.cpp:202
#51 0xb687581b in QEventLoop::processEvents (this=0xbf8797dc, flags=...) at kernel/qeventloop.cpp:149
#52 0xb6875960 in QEventLoop::exec (this=0xbf8797dc, flags=...) at kernel/qeventloop.cpp:201
#53 0xb6878aed in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#54 0xb5a27e54 in QApplication::exec () at kernel/qapplication.cpp:3570
#55 0x0807ab85 in main (argc=5, argv=0xbf879a64) at /home/kde-devel/kde/src/KDE/kdebase/apps/dolphin/src/main.cpp:94

Thanks for the information
Comment 2 Martin Kho 2009-12-21 16:56:58 UTC
Hi,

Just before the crash I see in .xsession-errors I the following message:

dolphin(2047)/kio (KDirModel): Items emitted in directory KUrl("file:///var/tmp/kdecache-martin") but that directory isn't in KDirModel! Root directory: KUrl("file:///home/martin") 

Maybe it's relevant or helpful.

Martin Kho
Comment 3 David Faure 2009-12-21 22:17:49 UTC
SVN commit 1064817 by dfaure:

Fix 213799 again (kio doesn't notice changes in a symlink-to-a-directory) without
introducing the 219547 crash in treeviews (due to KDirModel seeing unexpected resolved urls).

The new strategy is: rather than resolve the url right away (and emit wrong items),
we just store the "resolved_path -> known_path(s)" association in a QHash, and look that up
when we are notified of changes.

Fixed for: 4.4 RC1
BUG: 219547
CCBUG: 213799


 M  +52 -14    kio/kdirlister.cpp  
 M  +14 -0     kio/kdirlister_p.h  
 M  +3 -0      tests/kdirlistertest.cpp  
 M  +8 -0      tests/kdirmodeltest.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1064817
Comment 4 Nicolas L. 2010-01-05 12:23:37 UTC
*** Bug 221353 has been marked as a duplicate of this bug. ***
Comment 5 David Faure 2010-01-21 18:40:40 UTC
Fix backported for 4.3.5.
Comment 6 Martin Kho 2010-01-24 22:03:11 UTC
Hi,

Updated to KDE 4.3.95 (aka 4.4 rc2) and I can confirm that the issue is solved.

Thanks for the good work!

Martin Kho