Bug 178416 - Dolphin crashes browsing on some (not real files) kioslaves when Folders panel is enabled (ASSERT "result" in kdirmodel.cpp:377)
Summary: Dolphin crashes browsing on some (not real files) kioslaves when Folders pane...
Status: RESOLVED WAITINGFORINFO
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
: 161218 177539 178944 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-12-22 01:07 UTC by Dario Andres
Modified: 2013-06-23 14:03 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Fix crash cause (510 bytes, patch)
2009-01-23 12:06 UTC, Marcel Partap
Details
fix + nano speedup (787 bytes, patch)
2009-01-23 12:54 UTC, Marcel Partap
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dario Andres 2008-12-22 01:07:38 UTC
Version:           KDE: 4.1.85 (KDE 4.1.85 (KDE 4.2 Beta2))  (kdelibs svn rev. 899634 / kdebase svn rev. 899635) (using Devel)
Compiler:          gcc 
OS:                Linux
Installed from:    Compiled sources

Dolphin crashes browsing on some (not real files) kioslaves when Folders panel is enabled (ASSERT "result" in kdirmodel.cpp:377)

---------

Here using:

Qt: 4.4.3
KDE: 4.1.85 (KDE 4.1.85 (KDE 4.2 Beta2))
kdelibs svn rev. 899634 / kdebase svn rev. 899635
on ArchLinux x86_64 - Kernel 2.6.27.8

---------

Some of the affected kioslaves : trash:/ remote:/ applications:/ programs:/ desktop:/  (where non-real files are listed)

Steps to reproduce (at least here):

- Start Dolphin 
- Disable all the Panels 
- Close Dolphin (to clean-up things) ((you can also remove your ~./kde4/share/config/dolphinrc))

- Start Dolphin again 
- Browse to some of the affected kioslaves 
Dolphin doesn't crash. 
- Add the "Folders" panel 

Dolphin crashes.

(If you have the Folders enabled panel you can also reproduce the crash launching "dolphin kioslave" (ex "dolphin remote:/" ) )

Here is the backtrace:

ASSERT: "result" in file /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/kdirmodel.cpp, line 377

Application: Dolphin (dolphin), signal SIGABRT
0x00007fb5f3f42fd0 in __nanosleep_nocancel () from /lib/libc.so.6

Thread 1 (Thread 0x7fb5f83ba750 (LWP 6554)):
[KCrash Handler]
#5  0x00007fb5f3ed60c5 in raise () from /lib/libc.so.6
#6  0x00007fb5f3ed75e3 in abort () from /lib/libc.so.6
#7  0x00007fb5f4c0fa25 in qt_message_output (msgType=QtFatalMsg, buf=<value optimized out>) at global/qglobal.cpp:2102
#8  0x00007fb5f4c0fb47 in qFatal (msg=<value optimized out>) at global/qglobal.cpp:2303
#9  0x00007fb5f7f38bbb in KDirModelPrivate::_k_slotNewItems (this=0x10c9040, directoryUrl=<value optimized out>, items=@0x18c3ce0) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/kdirmodel.cpp:377
#10 0x00007fb5f7f38c89 in KDirModel::qt_metacall (this=0x10b6d00, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff004f7d00)
    at /home/kde-devel/kde/build/KDE/kdelibs/kio/kdirmodel.moc:76
#11 0x00007fb5f4d0aac0 in QMetaObject::activate (sender=0x148e740, from_signal_index=<value optimized out>, to_signal_index=14, argv=0xffffffffffffffff) at kernel/qobject.cpp:3028
#12 0x00007fb5f7f1a42a in KDirLister::itemsAdded (this=0x199a, _t1=<value optimized out>, _t2=<value optimized out>) at /home/kde-devel/kde/build/KDE/kdelibs/kio/kdirlister.moc:266
#13 0x00007fb5f7f1b2db in KDirLister::Private::emitItems (this=0x147fb30) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/kdirlister.cpp:2234
#14 0x00007fb5f7f1de8e in KDirListerCache::slotEntries (this=0x140ad70, job=<value optimized out>, entries=@0x1834108) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/kdirlister.cpp:1052
#15 0x00007fb5f7f2d38b in KDirListerCache::qt_metacall (this=0x140ad70, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff004f8080)
    at /home/kde-devel/kde/build/KDE/kdelibs/kio/kdirlister_p.moc:97
#16 0x00007fb5f4d0aac0 in QMetaObject::activate (sender=0x1834840, from_signal_index=<value optimized out>, to_signal_index=40, argv=0xffffffffffffffff) at kernel/qobject.cpp:3028
#17 0x00007fb5f7ef43a4 in KIO::ListJob::entries (this=0x199a, _t1=0x1834840, _t2=<value optimized out>) at /home/kde-devel/kde/build/KDE/kdelibs/kio/jobclasses.moc:763
#18 0x00007fb5f7f01a66 in KIO::ListJobPrivate::slotListEntries (this=0x1834ac0, list=@0x7fff004f8610) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/job.cpp:2341
#19 0x00007fb5f7f01bd6 in KIO::ListJob::qt_metacall (this=0x1834840, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff004f83f0)
    at /home/kde-devel/kde/build/KDE/kdelibs/kio/jobclasses.moc:750
#20 0x00007fb5f4d0aac0 in QMetaObject::activate (sender=0x1843380, from_signal_index=<value optimized out>, to_signal_index=10, argv=0xffffffffffffffff) at kernel/qobject.cpp:3028
#21 0x00007fb5f7fba075 in KIO::SlaveInterface::listEntries (this=0x199a, _t1=<value optimized out>) at /home/kde-devel/kde/build/KDE/kdelibs/kio/slaveinterface.moc:177
#22 0x00007fb5f7fbd8cf in KIO::SlaveInterface::dispatch (this=0x1843380, _cmd=<value optimized out>, rawdata=@0x3) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/slaveinterface.cpp:193
#23 0x00007fb5f7fba448 in KIO::SlaveInterface::dispatch (this=0x1843380) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/slaveinterface.cpp:91
#24 0x00007fb5f7fac613 in KIO::Slave::gotInput (this=0x1843380) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/slave.cpp:322
#25 0x00007fb5f7fad648 in KIO::Slave::qt_metacall (this=0x1843380, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fff004f87e0) at /home/kde-devel/kde/build/KDE/kdelibs/kio/slave.moc:75
#26 0x00007fb5f4d0aac0 in QMetaObject::activate (sender=0x16a0e70, from_signal_index=<value optimized out>, to_signal_index=4, argv=0xffffffffffffffff) at kernel/qobject.cpp:3028
#27 0x00007fb5f7ec8370 in KIO::ConnectionPrivate::dequeue (this=0x16a5bc0) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/connection.cpp:82
#28 0x00007fb5f7ec84aa in KIO::Connection::qt_metacall (this=0x16a0e70, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x1724c10) at /home/kde-devel/kde/build/KDE/kdelibs/kio/connection.moc:72
#29 0x00007fb5f4d04c6e in QObject::event (this=0x16a0e70, e=0x1842140) at kernel/qobject.cpp:1152
#30 0x00007fb5f515c0ad in QApplicationPrivate::notify_helper (this=0x10b9420, receiver=0x16a0e70, e=0x1842140) at kernel/qapplication.cpp:3803
#31 0x00007fb5f516340e in QApplication::notify (this=0x7fff004f9220, receiver=0x16a0e70, e=0x1842140) at kernel/qapplication.cpp:3768
#32 0x00007fb5f659e22b in KApplication::notify (this=0x7fff004f9220, receiver=0x16a0e70, event=0x1842140) at /home/kde-devel/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:307
#33 0x00007fb5f4cf5d90 in QCoreApplication::notifyInternal (this=0x7fff004f9220, receiver=0x16a0e70, event=0x1842140) at kernel/qcoreapplication.cpp:583
#34 0x00007fb5f4cf9643 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x1074a60) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:209
#35 0x00007fb5f4d1cfa3 in postEventSourceDispatch (s=<value optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:214
#36 0x00007fb5f0ef4aa2 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#37 0x00007fb5f0ef821d in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#38 0x00007fb5f0ef83db in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#39 0x00007fb5f4d1ccdf in QEventDispatcherGlib::processEvents (this=0x1083970, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:319
#40 0x00007fb5f51e3f7f in QGuiEventDispatcherGlib::processEvents (this=0x199a, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:198
#41 0x00007fb5f4cf49c2 in QEventLoop::processEvents (this=<value optimized out>, flags={i = 5214544}) at kernel/qeventloop.cpp:143
#42 0x00007fb5f4cf4b55 in QEventLoop::exec (this=0x7fff004f9190, flags={i = 5214624}) at kernel/qeventloop.cpp:190
#43 0x00007fb5f4cf98f7 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:845
#44 0x000000000044378d in main (argc=2, argv=0x7fff004f9708) at /home/kde-devel/kde/src/KDE/kdebase/apps/dolphin/src/main.cpp:94

--------

Also some lines of the shell output before the crash:

dolphin(6554)/kio (KDirModel): Items emitted in directory KUrl("remote:") but that directory isn't in KDirModel! Root directory: KUrl("remote:/")
dolphin(6554) KDirModelPrivate::dump: Dumping contents of KDirModel KDirModel(0x10b6d00) dirLister url: KUrl("remote:")

--------

See bug 177539 and bug 161218 for more information.
Comment 1 Dario Andres 2008-12-22 01:08:13 UTC
*** Bug 177539 has been marked as a duplicate of this bug. ***
Comment 2 Dario Andres 2008-12-22 01:08:19 UTC
*** Bug 161218 has been marked as a duplicate of this bug. ***
Comment 3 Dario Andres 2008-12-23 01:59:28 UTC
I forgot something important:

As I stated in bug 177539 , to reproduce the crash in the trash:/ kioslave you need to have a folder inside the Trash Can, so I suppose this only happens when having folders (or "fake-folders" like in applications:/) inside the kioslave URL.
Comment 4 David Faure 2008-12-24 12:13:23 UTC
Ooops indeed, F7, applications:/, F7, crash.
Due to applications: vs applications:/, says KDirModel.
Comment 5 David Faure 2008-12-24 12:45:11 UTC
SVN commit 901012 by dfaure:

Open the sidebar on applications:/, not on applications:, that URL makes no sense [and crashes kdirmodel...].
BUG: 178416


 M  +3 -3      treeviewsidebarpage.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=901012
Comment 6 FiNeX 2008-12-30 14:43:34 UTC
Just reproduced on trunk r903258 trying to open remote://IP_ADDRESS.
(I've the places panel opened)

Maybe this bug is related: bug #164149



This is the backtrace:

Application: Dolphin (dolphin), signal SIGABRT
0x00007f2a41b54001 in nanosleep () from /lib/libc.so.6
[Current thread is 0 (LWP 29929)]

Thread 2 (Thread 0x7f2a36fa7950 (LWP 30016)):
#0  0x00007f2a41b7dd02 in select () from /lib/libc.so.6
#1  0x00007f2a428dcee6 in ?? () from /usr/lib/libQtCore.so.4
#2  0x00007f2a42826d79 in ?? () from /usr/lib/libQtCore.so.4
#3  0x00007f2a425b5fc7 in start_thread () from /lib/libpthread.so.0
#4  0x00007f2a41b845dd in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f2a45ef7750 (LWP 29929)):
[KCrash Handler]
#5  0x00007f2a41ae70c5 in raise () from /lib/libc.so.6
#6  0x00007f2a41ae85e3 in abort () from /lib/libc.so.6
#7  0x00007f2a428200a5 in qt_message_output () from /usr/lib/libQtCore.so.4
#8  0x00007f2a428201c7 in qFatal () from /usr/lib/libQtCore.so.4
#9  0x00007f2a45a7259b in KDirModelPrivate::_k_slotNewItems (this=0x1fe91b0,
directoryUrl=<value optimized out>, items=@0x20212b0) at
/home/test/KDE4/src/kdelibs/kio/kio/kdirmodel.cpp:379
#10 0x00007f2a45a7268a in KDirModel::qt_metacall (this=0x21e8ec0,
_c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff4e034960)
    at /home/test/KDE4/src/build/kdelibs/kio/kdirmodel.moc:77
#11 0x00007f2a42909d00 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#12 0x00007f2a45a5367a in KDirLister::itemsAdded (this=0x74e9, _t1=<value
optimized out>, _t2=<value optimized out>) at
/home/test/KDE4/src/build/kdelibs/kio/kdirlister.moc:266
#13 0x00007f2a45a5452b in KDirLister::Private::emitItems (this=0x21e8d40) at
/home/test/KDE4/src/kdelibs/kio/kio/kdirlister.cpp:2239
#14 0x00007f2a45a5735e in KDirListerCache::slotEntries (this=0x1d3a2f0,
job=<value optimized out>, entries=@0x225fa28) at
/home/test/KDE4/src/kdelibs/kio/kio/kdirlister.cpp:1048
#15 0x00007f2a45a666fb in KDirListerCache::qt_metacall (this=0x1d3a2f0,
_c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff4e034ce0)
    at /home/test/KDE4/src/build/kdelibs/kio/kdirlister_p.moc:97
#16 0x00007f2a42909d00 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#17 0x00007f2a45a2d5f4 in KIO::ListJob::entries (this=0x74e9, _t1=0x21cfde0,
_t2=<value optimized out>) at
/home/test/KDE4/src/build/kdelibs/kio/jobclasses.moc:763
#18 0x00007f2a45a3acb6 in KIO::ListJobPrivate::slotListEntries (this=0x1f8cd70,
list=@0x7fff4e035270) at /home/test/KDE4/src/kdelibs/kio/kio/job.cpp:2341
#19 0x00007f2a45a3ae26 in KIO::ListJob::qt_metacall (this=0x21cfde0,
_c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff4e035050)
    at /home/test/KDE4/src/build/kdelibs/kio/jobclasses.moc:750
#20 0x00007f2a42909d00 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#21 0x00007f2a45af5385 in KIO::SlaveInterface::listEntries (this=0x74e9,
_t1=<value optimized out>) at
/home/test/KDE4/src/build/kdelibs/kio/slaveinterface.moc:177
#22 0x00007f2a45af8bdf in KIO::SlaveInterface::dispatch (this=0x1ef54b0,
_cmd=<value optimized out>, rawdata=@0x4) at
/home/test/KDE4/src/kdelibs/kio/kio/slaveinterface.cpp:193
#23 0x00007f2a45af5758 in KIO::SlaveInterface::dispatch (this=0x1ef54b0) at
/home/test/KDE4/src/kdelibs/kio/kio/slaveinterface.cpp:91
#24 0x00007f2a45ae7923 in KIO::Slave::gotInput (this=0x1ef54b0) at
/home/test/KDE4/src/kdelibs/kio/kio/slave.cpp:322
#25 0x00007f2a45ae8958 in KIO::Slave::qt_metacall (this=0x1ef54b0,
_c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fff4e035440) at
/home/test/KDE4/src/build/kdelibs/kio/slave.moc:75
#26 0x00007f2a42909d00 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#27 0x00007f2a45a015c0 in KIO::ConnectionPrivate::dequeue (this=0x2105100) at
/home/test/KDE4/src/kdelibs/kio/kio/connection.cpp:82
#28 0x00007f2a45a016fa in KIO::Connection::qt_metacall (this=0x20a04e0,
_c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x20b5170) at
/home/test/KDE4/src/build/kdelibs/kio/connection.moc:72
#29 0x00007f2a42905f9e in QObject::event () from /usr/lib/libQtCore.so.4
#30 0x00007f2a42d564dd in QApplicationPrivate::notify_helper () from
/usr/lib/libQtGui.so.4
#31 0x00007f2a42d5c86a in QApplication::notify () from /usr/lib/libQtGui.so.4
#32 0x00007f2a4413750b in KApplication::notify (this=0x7fff4e035e80,
receiver=0x20a04e0, event=0x21f9880) at
/home/test/KDE4/src/kdelibs/kdeui/kernel/kapplication.cpp:307
#33 0x00007f2a428f83d1 in QCoreApplication::notifyInternal () from
/usr/lib/libQtCore.so.4
#34 0x00007f2a428f8db8 in QCoreApplicationPrivate::sendPostedEvents () from
/usr/lib/libQtCore.so.4
#35 0x00007f2a4291cc03 in ?? () from /usr/lib/libQtCore.so.4
#36 0x00007f2a3e915aa2 in g_main_context_dispatch () from
/usr/lib/libglib-2.0.so.0
#37 0x00007f2a3e91921d in g_main_context_iterate () from
/usr/lib/libglib-2.0.so.0
#38 0x00007f2a3e9193db in g_main_context_iteration () from
/usr/lib/libglib-2.0.so.0
#39 0x00007f2a4291c89f in QEventDispatcherGlib::processEvents () from
/usr/lib/libQtCore.so.4
#40 0x00007f2a42dd6fff in ?? () from /usr/lib/libQtGui.so.4
#41 0x00007f2a428f6d42 in QEventLoop::processEvents () from
/usr/lib/libQtCore.so.4
#42 0x00007f2a428f6ed5 in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#43 0x00007f2a428f9025 in QCoreApplication::exec () from
/usr/lib/libQtCore.so.4
#44 0x000000000044380d in main (argc=6, argv=0x7fff4e036368) at
/home/test/KDE4/src/kdebase/apps/dolphin/src/main.cpp:94

Comment 7 Dario Andres 2008-12-31 03:03:44 UTC
*** Bug 178944 has been marked as a duplicate of this bug. ***
Comment 8 Dario Andres 2009-01-04 20:36:43 UTC
Here using:

Qt: 4.4.3 + qt-copy-patches-889120
KDE: 4.1.87 (KDE 4.1.87 (KDE 4.2 >= 20090101))
kdelibs svn rev. 905636 / kdebase svn rev. 905636
on ArchLinux x86_64 - Kernel 2.6.27.10

I can still reproduce the crash when going to "remote://192.168.1.2" (it seems that it doesn't matter if the Folders panel is enabled or not)

The same assert is hitted

#8  0x00007fb8b7cc2b47 in qFatal (msg=<value optimized out>) at global/qglobal.cpp:2303
#9  0x00007fb8bafec5fb in KDirModelPrivate::_k_slotNewItems (this=0xfad670, directoryUrl=<value optimized out>, items=@0x111c600) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/kdirmodel.cpp:379

----

I don't know if the reasons are the same as the original bug, and if this new crash must be posted in a new report.
Comment 9 David Faure 2009-01-12 22:02:50 UTC
Actually it's more like bug 160057 (a hostname that the kioslave ignores), but you had no way to know that :-)
I'll try to fix it.
Comment 10 David Faure 2009-01-12 22:25:45 UTC
SVN commit 910246 by dfaure:

Backport r910243: Fix kdirmodel assert on remote://hostname (where the hostname is ignored by kio_remote, as expected)
the initial logic for "no path means '/'" isn't needed after all, sftp://host works without it.
BUG: 178416


 M  +0 -9      kio/kdirmodel.cpp  
 M  +15 -1     tests/kdirmodeltest.cpp  
 M  +2 -1      tests/kdirmodeltest.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=910246
Comment 11 Marcel Partap 2009-01-23 12:06:42 UTC
Created attachment 30526 [details]
Fix crash cause

David the patch you applied fixes the symptom for this case, but an Open-file dialog did still crash on f.e. fish://foo .. but fix turned out to be amazingly simpel ;)
Comment 12 Marcel Partap 2009-01-23 12:54:57 UTC
Created attachment 30528 [details]
fix + nano speedup

seeing as how nodeForUrl is propably called *a lot* for huge directory listings, this patch saves a call to cleanupUrl or two.. not sure if there are any circumstances under which dropping an url lexically different from the rootnode url but identifying same location could end up here.. ? Seems to work fine though.
Comment 13 Christoph Feck 2009-06-01 03:50:39 UTC
David, the patch from comment #12 to fix the issue mentioned in comment #11 has not been applied. Can you review it?
Comment 14 David Faure 2010-01-26 19:53:59 UTC
Marcel: how do you make the file dialog crash? I can't reproduce it.

About the patch, maybe urlForNode should use cleanupUrl too...
Comment 15 Dawit Alemayehu 2011-05-09 01:53:06 UTC
Was the patch in comment #12 ignored on purpose ? It is not in the current trunk version and I guess there must be some issue for it to be ignored. If that is the case, can this bug report get closed as FIXED ?