Bug 222204

Summary: kdirwatch crash after unmounting usb key (KDirWatchPrivate::slotRewatchDelayed)
Product: [Frameworks and Libraries] kio Reporter: mps <moabi2000>
Component: generalAssignee: David Faure <faure>
Status: RESOLVED FIXED    
Severity: crash CC: andresbajotierra, benpro82, ccancellieri, hahol13, honggoff, kde, sydalien2
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:

Description mps 2010-01-11 13:19:39 UTC
Application: dolphin (1.4)
KDE Platform Version: 4.3.90 (KDE 4.3.90 (KDE 4.4 RC1))
Qt Version: 4.6.0
Operating System: Linux 2.6.30.10-105.fc11.x86_64 x86_64
Distribution (Platform): Fedora RPMs

-- Information about the crash:
resuming from suspend a dolphin window that i had opened crashed.

 -- Backtrace:
Application: Dolphin (dolphin), signal: Segmentation fault
[KCrash Handler]
#5  0x00007f455339755d in QTextCodec::fromUnicode (this=0x1f07c40, str=<value optimized out>) at codecs/qtextcodec.cpp:1195
#6  0x00007f45532ba6f1 in QString::toLocal8Bit (this=0x2afa260) at tools/qstring.cpp:3511
#7  0x00007f45532f42b9 in locale_encode (f=@0x1f07c40) at io/qfile.cpp:66
#8  0x00007f45532f413a in QFile::encodeName (fileName=@0x1f07c40) at io/qfile.cpp:477
#9  0x00007f4554744d59 in stat (buf=<value optimized out>, path=<value optimized out>) at /usr/src/debug/kdelibs-4.3.90/kdecore/util/kde_file.h:203
#10 KDirWatchPrivate::slotRewatchDelayed (buf=<value optimized out>, path=<value optimized out>) at /usr/src/debug/kdelibs-4.3.90/kio/kio/kdirwatch.cpp:1283
#11 0x00007f455474eebc in KDirWatchPrivate::qt_metacall (this=0x20b0c70, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff95abecc0)
    at /usr/src/debug/kdelibs-4.3.90/x86_64-redhat-linux-gnu/kio/kdirwatch_p.moc:86
#12 0x00007f455337b4d3 in QMetaObject::activate (sender=0x35830a0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x1) at kernel/qobject.cpp:3294
#13 0x00007f4553382cef in QSingleShotTimer::timerEvent (this=0x35830a0) at kernel/qtimer.cpp:308
#14 0x00007f455337814e in QObject::event (this=0x35830a0, e=0x7fff95abf390) at kernel/qobject.cpp:1224
#15 0x00007f45521d490c in QApplicationPrivate::notify_helper (this=0x1f296a0, receiver=0x35830a0, e=0x7fff95abf390) at kernel/qapplication.cpp:4242
#16 0x00007f45521dae85 in QApplication::notify (this=0x7fff95abf6e0, receiver=0x35830a0, e=0x7fff95abf390) at kernel/qapplication.cpp:4125
#17 0x00007f45542039d6 in KApplication::notify (this=0x7fff95abf6e0, receiver=0x35830a0, event=0x7fff95abf390) at /usr/src/debug/kdelibs-4.3.90/kdeui/kernel/kapplication.cpp:302
#18 0x00007f45533686ac in QCoreApplication::notifyInternal (this=0x7fff95abf6e0, receiver=0x35830a0, event=0x7fff95abf390) at kernel/qcoreapplication.cpp:704
#19 0x00007f45533951a2 in QCoreApplication::sendEvent (event=<value optimized out>, receiver=<value optimized out>) at kernel/qcoreapplication.h:215
#20 QTimerInfoList::activateTimers (event=<value optimized out>, receiver=<value optimized out>) at kernel/qeventdispatcher_unix.cpp:603
#21 0x00007f4553391dc8 in timerSourceDispatch (source=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:184
#22 idleTimerSourceDispatch (source=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:231
#23 0x0000003e7023790e in g_main_dispatch (context=<value optimized out>) at gmain.c:1824
#24 IA__g_main_context_dispatch (context=<value optimized out>) at gmain.c:2377
#25 0x0000003e7023b0e8 in g_main_context_iterate (context=0x1f35920, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at gmain.c:2455
#26 0x0000003e7023b20a in IA__g_main_context_iteration (context=0x1f35920, may_block=1) at gmain.c:2518
#27 0x00007f4553391a93 in QEventDispatcherGlib::processEvents (this=0x1f02890, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:407
#28 0x00007f4552280e2e in QGuiEventDispatcherGlib::processEvents (this=0x7fff95abeb90, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:202
#29 0x00007f4553366fe2 in QEventLoop::processEvents (this=<value optimized out>, flags={i = 36}) at kernel/qeventloop.cpp:149
#30 0x00007f45533673bc in QEventLoop::exec (this=0x7fff95abf630, flags={i = 0}) at kernel/qeventloop.cpp:201
#31 0x00007f45533697d9 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#32 0x0000000000437f65 in main (argc=<value optimized out>, argv=<value optimized out>) at /usr/src/debug/kdebase-4.3.90/apps/dolphin/src/main.cpp:101
Warning: the current language does not match this frame.

Possible duplicates by query: bug 192328.

Reported using DrKonqi
Comment 1 Rolf Eike Beer 2010-02-14 21:23:39 UTC
Application: Dolphin (dolphin), signal: Segmentation fault
[Current thread is 1 (Thread 0xb4d6d760 (LWP 25000))]

Thread 2 (Thread 0xb2ccab70 (LWP 25644)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb54200c2 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb59ed2d4 in pthread_cond_timedwait () from /lib/libc.so.6
#3  0xb243808b in ?? () from /usr/lib/libxine.so.1
#4  0xb541b6e5 in start_thread () from /lib/libpthread.so.0
#5  0xb541b600 in ?? () from /lib/libpthread.so.0

Thread 1 (Thread 0xb4d6d760 (LWP 25000)):
[KCrash Handler]
#6  0xb67bfe13 in QTextCodec::fromUnicode (this=0x80e63f8, str=...) at codecs/qtextcodec.cpp:1195
#7  0xb66d0220 in QString::toLocal8Bit (this=0x8651d40) at tools/qstring.cpp:3511
#8  0xb670deda in locale_encode (f=...) at io/qfile.cpp:66
#9  0xb670dc7b in QFile::encodeName (fileName=...) at io/qfile.cpp:477
#10 0xb70a2854 in stat (buf=0x0, path=...) at /usr/src/debug/kdelibs-4.4.0/kdecore/util/kde_file.h:203
#11 KDirWatchPrivate::slotRewatchDelayed (buf=0x0, path=...) at /usr/src/debug/kdelibs-4.4.0/kio/kio/kdirwatch.cpp:1283
#12 0xb71bf8ec in KDirWatchPrivate::qt_metacall (this=0x81fb7e8, _c=InvokeMetaMethod, _id=9, _a=0xbffcd44c) at /usr/src/debug/kdelibs-4.4.0/build/kio/kdirwatch_p.moc:86
#13 0xb679232d in QMetaObject::metacall (object=0x81fb7e8, cl=3062506888, idx=9, argv=0xbffcd44c) at kernel/qmetaobject.cpp:237
#14 0xb67a118a in QMetaObject::activate (sender=0x8a33968, m=0xb68a2188, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3275
#15 0xb67a8e05 in QSingleShotTimer::timeout (this=0x8a33968) at .moc/release-shared/qtimer.moc:82
#16 0xb67a8f3c in QSingleShotTimer::timerEvent (this=0x8a33968) at kernel/qtimer.cpp:308
#17 0xb679dc94 in QObject::event (this=0x8a33968, e=0x73002f) at kernel/qobject.cpp:1212
#18 0xb5cb62ac in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#19 0xb5cbd0f8 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#20 0xb6d25cb1 in KApplication::notify (this=0xbffcdcf4, receiver=0x8a33968, event=0xbffcd9a4) at /usr/src/debug/kdelibs-4.4.0/kdeui/kernel/kapplication.cpp:302
#21 0xb678cfbe in QCoreApplication::notifyInternal (this=0xbffcdcf4, receiver=0x8a33968, event=0xbffcd9a4) at kernel/qcoreapplication.cpp:704
#22 0xb67bd1fe in sendEvent (event=<value optimized out>, receiver=<value optimized out>) at kernel/qcoreapplication.h:215
#23 QTimerInfoList::activateTimers (event=<value optimized out>, receiver=<value optimized out>) at kernel/qeventdispatcher_unix.cpp:617
#24 0xb67b9e95 in timerSourceDispatch (source=0x8105c80) at kernel/qeventdispatcher_glib.cpp:184
#25 idleTimerSourceDispatch (source=0x8105c80) at kernel/qeventdispatcher_glib.cpp:231
#26 0xb52544c2 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#27 0xb5257d98 in ?? () from /usr/lib/libglib-2.0.so.0
#28 0xb5257ebe in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#29 0xb67b9b31 in QEventDispatcherGlib::processEvents (this=0x80e3b08, flags=...) at kernel/qeventdispatcher_glib.cpp:412
#30 0xb5d766ca in ?? () from /usr/lib/libQtGui.so.4
#31 0xb678b62d in QEventLoop::processEvents (this=0xbffcdc54, flags=) at kernel/qeventloop.cpp:149
#32 0xb678ba79 in QEventLoop::exec (this=0xbffcdc54, flags=...) at kernel/qeventloop.cpp:201
#33 0xb678fbf0 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#34 0xb5cb6354 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#35 0x0807c05f in _start ()

It happened after I copied a big file to a USB stick and unmounted it from places view within dolphin.
Comment 2 Rolf Eike Beer 2010-02-14 21:24:49 UTC
Btw.: openSuSE 11.2 KDE 4.4.0 i686
Comment 3 Dario Andres 2010-02-16 01:19:03 UTC
This could be related to bug 224766. Regards
Comment 4 David Faure 2010-02-18 21:38:14 UTC
*** Bug 224766 has been marked as a duplicate of this bug. ***
Comment 5 David Faure 2010-02-20 00:29:23 UTC
SVN commit 1093006 by dfaure:

Fix detection of "the file I'm watching, has been deleted and recreated immediately" (e.g. the /etc/localtime case).
This also removes the code that was crashing in bug 222204.
Fixed for: 4.4.1
BUG: 222204


 M  +42 -110   kio/kdirwatch.cpp  
 M  +2 -8      kio/kdirwatch_p.h  
 M  +83 -15    tests/kdirwatch_unittest.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1093006
Comment 6 Dario Andres 2010-03-01 12:46:00 UTC
*** Bug 228988 has been marked as a duplicate of this bug. ***
Comment 7 Dario Andres 2010-03-01 12:46:43 UTC
*** Bug 227952 has been marked as a duplicate of this bug. ***
Comment 8 Dario Andres 2010-03-01 12:47:40 UTC
*** Bug 222479 has been marked as a duplicate of this bug. ***
Comment 9 Mikko C. 2010-10-23 11:23:08 UTC
*** Bug 253137 has been marked as a duplicate of this bug. ***