Bug 180156 - Crash when renaming a folder which contains other elements shown
Summary: Crash when renaming a folder which contains other elements shown
Status: RESOLVED FIXED
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:
: 173054 180804 181128 181905 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-01-09 18:03 UTC by Matteo Nardi
Modified: 2009-02-23 11:54 UTC (History)
6 users (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 Matteo Nardi 2009-01-09 18:03:52 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

I can reproduce this. archlinux, svn rev 906063 (kdebase) and rev 906028 (kdelibs)    (5/1/09)

Steps to reproduce:
-Open Dolphin
-Change to columns view
-Create a folder named 'a'
-Click on that folder so that the next column shows folder 'a'
-Create a new folder inside folder 'a' and name it 'b'
-Rename folder 'a' to 'c'
--->Crash

It happens even if it's not in columns view, but the the folder renamed is being shown somewhere (an other istance of dolphin for example).
The folder is renamed succesfully, after restart of dolphin it's ok.



Application: Dolphin (dolphin), signal SIGSEGV

Thread 1 (Thread 0xb5fdf700 (LWP 8492)):
[KCrash Handler]
#6  0xb6c284a2 in QUrl::operator= () from /usr/lib/libQtCore.so.4
#7  0xb7570e9c in KUrl::operator= (this=0x8, _u=@0xbfec898c) at /home/matteo/kde/src/KDE/kdelibs/kdecore/io/kurl.cpp:568
#8  0xb7f62869 in KFileItem::setUrl (this=0xbfec8738, url=@0xbfec898c) at /home/matteo/kde/src/KDE/kdelibs/kio/kio/kfileitem.cpp:494
#9  0xb7f4d2ed in KDirModelPrivate::_k_slotRedirection (this=0x838a080, oldUrl=@0xbfec8998, newUrl=@0xbfec898c) at /home/matteo/kde/src/KDE/kdelibs/kio/kio/kdirmodel.cpp:578
#10 0xb7f4e55d in KDirModel::qt_metacall (this=0x8302460, _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0xbfec8838) at /home/matteo/kde/build/KDE/kdelibs/kio/kdirmodel.moc:81
#11 0xb6c7182b in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#12 0xb6c71d82 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#13 0xb7f322a1 in KDirLister::redirection (this=0x8326dd8, _t1=@0xbfec8998, _t2=@0xbfec898c) at /home/matteo/kde/build/KDE/kdelibs/kio/kdirlister.moc:239
#14 0xb7f3f297 in KDirListerCache::emitRedirections (this=0x8351d88, oldUrl=@0xbfec8998, newUrl=@0xbfec898c) at /home/matteo/kde/src/KDE/kdelibs/kio/kio/kdirlister.cpp:1426
#15 0xb7f3fa0b in KDirListerCache::renameDir (this=0x8351d88, oldUrl=@0xbfec8a80, newUrl=@0xbfec8a78) at /home/matteo/kde/src/KDE/kdelibs/kio/kio/kdirlister.cpp:1355
#16 0xb7f4050e in KDirListerCache::slotFileRenamed (this=0x8351d88, _src=@0x851ebd0, _dst=@0x84e6b60) at /home/matteo/kde/src/KDE/kdelibs/kio/kio/kdirlister.cpp:862
#17 0xb7f408b6 in KDirListerCache::qt_metacall (this=0x8351d88, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0xbfec8bc8) at /home/matteo/kde/build/KDE/kdelibs/kio/kdirlister_p.moc:93
#18 0xb6c7182b in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#19 0xb6c71d82 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#20 0xb7f523fb in OrgKdeKDirNotifyInterface::FileRenamed (this=0x831b0f8, _t1=@0x851ebd0, _t2=@0x84e6b60) at /home/matteo/kde/build/KDE/kdelibs/kio/kdirnotify.moc:95
#21 0xb7f52492 in OrgKdeKDirNotifyInterface::qt_metacall (this=0x831b0f8, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0xbfec8cac) at /home/matteo/kde/build/KDE/kdelibs/kio/kdirnotify.moc:78
#22 0xb74690d7 in ?? () from /usr/lib/libQtDBus.so.4
#23 0x0831b0f8 in ?? ()
#24 0x00000000 in ?? ()
Comment 1 Dario Andres 2009-01-09 18:12:14 UTC
Here using:

Qt: 4.4.3 + qt-copy-patches-889120
KDE: 4.2.60 (KDE 4.2.60 (KDE 4.3 >= 20090106))
kdelibs svn rev. 908156 / kdebase svn rev. 908156
on ArchLinux x86_64 - Kernel 2.6.27.10

I can reproduce this crash.

Backtrace:

Application: Dolphin (dolphin), signal SIGSEGV
0x00007f7917f44001 in nanosleep () from /lib/libc.so.6

Thread 1 (Thread 0x7f791c3bf750 (LWP 18275)):
[KCrash Handler]
#5  QUrl::operator= (this=0x10, url=@0x7fff244ff130) at ../../include/QtCore/../../src/corelib/thread/qatomic.h:193
#6  0x00007f7919d9c619 in KUrl::operator= (this=0x10, _u=@0x7fff244ff130) at /home/kde-devel/kde/src/KDE/kdelibs/kdecore/io/kurl.cpp:568
#7  0x00007f791bf5188d in KFileItem::setUrl (this=0x7fff244fecf0, url=@0x7fff244ff130) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/kfileitem.cpp:494
#8  0x00007f791bf375b2 in KDirModelPrivate::_k_slotRedirection (this=0xf425e0, oldUrl=<value optimized out>, newUrl=@0x7fff244ff130) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/kdirmodel.cpp:581
#9  0x00007f791bf3bb5a in KDirModel::qt_metacall (this=0xfc3a30, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff244fee40)
    at /home/kde-devel/kde/build/KDE/kdelibs/kio/kdirmodel.moc:81
#10 0x00007f7918d0bac0 in QMetaObject::activate (sender=0xfbfcc0, from_signal_index=<value optimized out>, to_signal_index=10, argv=0xf) at kernel/qobject.cpp:3028
#11 0x00007f791bf1ca8a in KDirLister::redirection (this=0x10, _t1=<value optimized out>, _t2=<value optimized out>) at /home/kde-devel/kde/build/KDE/kdelibs/kio/kdirlister.moc:239
#12 0x00007f791bf296b9 in KDirListerCache::emitRedirections (this=0xeac550, oldUrl=@0x7fff244ff140, newUrl=@0x7fff244ff130) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/kdirlister.cpp:1426
#13 0x00007f791bf2a152 in KDirListerCache::renameDir (this=0xeac550, oldUrl=@0x7fff244ff370, newUrl=@0x7fff244ff360) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/kdirlister.cpp:1355
#14 0x00007f791bf2b350 in KDirListerCache::slotFileRenamed (this=0xeac550, _src=<value optimized out>, _dst=<value optimized out>) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/kdirlister.cpp:862
#15 0x00007f791bf2faa8 in KDirListerCache::qt_metacall (this=0xeac550, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff244ff5d0)
    at /home/kde-devel/kde/build/KDE/kdelibs/kio/kdirlister_p.moc:93
#16 0x00007f7918d0bac0 in QMetaObject::activate (sender=0xe70c50, from_signal_index=<value optimized out>, to_signal_index=5, argv=0xf) at kernel/qobject.cpp:3028
#17 0x00007f791bf3d167 in OrgKdeKDirNotifyInterface::FileRenamed (this=0x10, _t1=<value optimized out>, _t2=<value optimized out>) at /home/kde-devel/kde/build/KDE/kdelibs/kio/kdirnotify.moc:95
#18 0x00007f791bf3d288 in OrgKdeKDirNotifyInterface::qt_metacall (this=0xe70c50, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff244ff6e0)
    at /home/kde-devel/kde/build/KDE/kdelibs/kio/kdirnotify.moc:78
#19 0x00007f7919a6f7eb in QDBusConnectionPrivate::deliverCall (this=0xd8a720, object=0xe70c50, msg=@0x1329da8, metaTypes=@0x1329db0, slotIdx=5) at qdbusintegrator.cpp:849
#20 0x00007f7919a7632f in QDBusCallDeliveryEvent::placeMetaCall (this=0x0, object=0x7fff244ff130) at qdbusintegrator_p.h:130
#21 0x00007f7918d05c6e in QObject::event (this=0xe70c50, e=0x1329d60) at kernel/qobject.cpp:1152
#22 0x00007f791915d0ad in QApplicationPrivate::notify_helper (this=0xd96920, receiver=0xe70c50, e=0x1329d60) at kernel/qapplication.cpp:3803
#23 0x00007f791916440e in QApplication::notify (this=0x7fff245002f0, receiver=0xe70c50, e=0x1329d60) at kernel/qapplication.cpp:3768
#24 0x00007f791a5a059b in KApplication::notify (this=0x7fff245002f0, receiver=0xe70c50, event=0x1329d60) at /home/kde-devel/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:307
#25 0x00007f7918cf6d90 in QCoreApplication::notifyInternal (this=0x7fff245002f0, receiver=0xe70c50, event=0x1329d60) at kernel/qcoreapplication.cpp:583
#26 0x00007f7918cfa643 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0xd50a60) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:209
#27 0x00007f7918d1dfa3 in postEventSourceDispatch (s=<value optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:214
#28 0x00007f7914cedaa2 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#29 0x00007f7914cf121d in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#30 0x00007f7914cf13db in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#31 0x00007f7918d1dcdf in QEventDispatcherGlib::processEvents (this=0xd5f970, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:319
#32 0x00007f79191e4f7f in QGuiEventDispatcherGlib::processEvents (this=0x10, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:198
#33 0x00007f7918cf59c2 in QEventLoop::processEvents (this=<value optimized out>, flags={i = 609223200}) at kernel/qeventloop.cpp:143
#34 0x00007f7918cf5b55 in QEventLoop::exec (this=0x7fff24500260, flags={i = 609223280}) at kernel/qeventloop.cpp:190
#35 0x00007f7918cfa8f7 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:845
#36 0x00000000004437fd in main (argc=6, argv=0x7fff245007d8) at /home/kde-devel/kde/src/KDE/kdebase/apps/dolphin/src/main.cpp:94

Comment 2 Frank Reininghaus 2009-01-15 22:12:53 UTC
*** Bug 180804 has been marked as a duplicate of this bug. ***
Comment 3 David Faure 2009-01-16 12:50:42 UTC
Yep. Faster steps to reproduce it (important for bugfixing ;)
mkdir -p /tmp/kiotest/a/b ; konqueror /tmp/kiotest /tmp/kiotest/a
(and renaming a to c in the first tab).

I see that the crash is item.setUrl on a null item in kdirmodel.cpp:572, I'll add a unit test and then a fix.
Comment 4 David Faure 2009-01-16 14:26:53 UTC
SVN commit 911976 by dfaure:

Fix crash when renaming the directory shown by this KDirModel in another window. Now it finally works as intended:
when you do that, the window showing the directory is redirected to the new name, rather than still pointing to
the old nonexisting dir (and giving errors on e.g. reload) like many other file managers do :-)
Fix will be in 4.2.
BUG: 180156


 M  +4 -2      kio/kdirmodel.cpp  
 M  +18 -2     tests/kdirmodeltest.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=911976
Comment 5 Dario Andres 2009-01-18 13:16:14 UTC
*** Bug 181128 has been marked as a duplicate of this bug. ***
Comment 6 S. Burmeister 2009-01-25 21:02:13 UTC
*** Bug 181905 has been marked as a duplicate of this bug. ***
Comment 7 David Faure 2009-02-23 11:54:23 UTC
*** Bug 173054 has been marked as a duplicate of this bug. ***