Bug 226674 - Kate crash when a file in watched directory was created externally [isSignalConnected, ..., KDirWatch::dirty, KDirWatch::setDirty, KDirWatchPrivate::emitEvent]
Summary: Kate crash when a file in watched directory was created externally [isSignalC...
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: David Faure
: 226976 227121 227206 227398 227994 228248 (view as bug list)
Depends on:
Reported: 2010-02-13 13:49 UTC by Christoph Feck
Modified: 2010-02-23 23:40 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Feck 2010-02-13 13:49:34 UTC
Application: kate (3.4.63)
KDE Platform Version: 4.4.63 (KDE 4.4.63 (KDE 4.5 >= 20100209)) (Compiled from sources)
Qt Version: 4.6.2
Operating System: Linux i686
Distribution: "openSUSE 11.2 (i586)"

-- Information about the crash:
I have Kate with its sidebar KDirOperator open. Via Ctrl+Alt+F1 terminal, I run a script that creates files in this directory. When going back to X11, I see Kate has crashed.

 -- Backtrace:
Application: Kate (kdeinit4), signal: Segmentation fault
[Current thread is 1 (Thread 0xb5337700 (LWP 3756))]

Thread 2 (Thread 0xb125db70 (LWP 3757)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb6798d95 in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:122
#2  0xb13f4b37 in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0xb14d01a0) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2304
#3  0xb13f4b7f in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=0xb14d01a0) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1438
#4  0xb67946e5 in start_thread (arg=0x0) at pthread_create.c:297
#5  0xb6794600 in ?? () at pthread_create.c:216 from /lib/libpthread.so.0

Thread 1 (Thread 0xb5337700 (LWP 3756)):
[KCrash Handler]
#6  0xb692cfd1 in isSignalConnected (signal_index=<value optimized out>, this=<value optimized out>) at kernel/qobject_p.h:222
#7  QMetaObject::activate (signal_index=<value optimized out>, this=<value optimized out>) at kernel/qobject.cpp:3210
#8  0xb7184212 in KDirWatch::dirty (this=0x809c2d8, _t1=...) at /local/build/KDE/kdelibs/kio/kdirwatch.moc:89
#9  0xb7183f44 in KDirWatch::setDirty (this=0x809c2d8, _file=...) at /local/svn/kde/trunk/KDE/kdelibs/kio/kio/kdirwatch.cpp:1839
#10 0xb71812d7 in KDirWatchPrivate::emitEvent (this=0x8175ec8, e=0x83e7db4, event=1, fileName=...) at /local/svn/kde/trunk/KDE/kdelibs/kio/kio/kdirwatch.cpp:1272
#11 0xb7181b55 in KDirWatchPrivate::slotRescan (this=0x8175ec8) at /local/svn/kde/trunk/KDE/kdelibs/kio/kio/kdirwatch.cpp:1395
#12 0xb71843bc in KDirWatchPrivate::qt_metacall (this=0x8175ec8, _c=InvokeMetaMethod, _id=0, _a=0xbfb9a30c) at /local/build/KDE/kdelibs/kio/kdirwatch_p.moc:81
#13 0xb691df0d in QMetaObject::metacall (object=0x8175ec8, cl=InvokeMetaMethod, idx=4, argv=0xbfb9a30c) at kernel/qmetaobject.cpp:237
#14 0xb692cd3a in QMetaObject::activate (sender=0x8175f10, m=0xb6a2f5a4, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3285
#15 0xb6980165 in QTimer::timeout (this=0x8175f10) at .moc/release-shared/moc_qtimer.cpp:134
#16 0xb6935096 in QTimer::timerEvent (this=0x8175f10, e=0xbfb9a864) at kernel/qtimer.cpp:271
#17 0xb6929844 in QObject::event (this=0x8175f10, e=0x29) at kernel/qobject.cpp:1204
#18 0xb5df582c in QApplicationPrivate::notify_helper (this=0x80bb970, receiver=0x8175f10, e=0xbfb9a864) at kernel/qapplication.cpp:4300
#19 0xb5dfc678 in QApplication::notify (this=0xbfb9abac, receiver=0x8175f10, e=0xbfb9a864) at kernel/qapplication.cpp:4183
#20 0xb6c84c68 in KApplication::notify (this=0xbfb9abac, receiver=0x8175f10, event=0xbfb9a864) at /local/svn/kde/trunk/KDE/kdelibs/kdeui/kernel/kapplication.cpp:302
#21 0xb6918b9e in QCoreApplication::notifyInternal (this=0xbfb9abac, receiver=0x8175f10, event=0xbfb9a864) at kernel/qcoreapplication.cpp:704
#22 0xb6948d8e 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 0xb69459f2 in timerSourceDispatch (source=0x80bc708) at kernel/qeventdispatcher_glib.cpp:184
#25 0xb55ff4c2 in g_main_dispatch (context=<value optimized out>) at gmain.c:1960
#26 IA__g_main_context_dispatch (context=<value optimized out>) at gmain.c:2513
#27 0xb5602d98 in g_main_context_iterate (context=0x80b9580, block=<value optimized out>, dispatch=1, self=0x80b8e48) at gmain.c:2591
#28 0xb5602ebe in IA__g_main_context_iteration (context=0x80b9580, may_block=1) at gmain.c:2654
#29 0xb69456c1 in QEventDispatcherGlib::processEvents (this=0x80b88b8, flags=...) at kernel/qeventdispatcher_glib.cpp:412
#30 0xb5eb5aaa in QGuiEventDispatcherGlib::processEvents (this=0x80b88b8, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#31 0xb691720d in QEventLoop::processEvents (this=0xbfb9ab14, flags=) at kernel/qeventloop.cpp:149
#32 0xb6917659 in QEventLoop::exec (this=0xbfb9ab14, flags=...) at kernel/qeventloop.cpp:201
#33 0xb691b7d0 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#34 0xb5df58d4 in QApplication::exec () at kernel/qapplication.cpp:3579
#35 0xb4dd7a76 in kdemain (argc=2, argv=0x80a8b90) at /local/svn/kde/trunk/KDE/kdesdk/kate/app/katemain.cpp:377
#36 0x0804d8a8 in launch (argc=2, _name=0x809b854 "/local/kde4/bin/kate", args=0x809b86c "\001", cwd=0x0, envc=1, envs=0x809b87d "", reset_env=false, tty=0x0, avoid_loops=false, startup_id_str=
    0x809b881 "duo;1266061519;624194;3331_TIME1138349") at /local/svn/kde/trunk/KDE/kdelibs/kinit/kinit.cpp:719
#37 0x0804e93d in handle_launcher_request (sock=8, who=0x8052760 "launcher") at /local/svn/kde/trunk/KDE/kdelibs/kinit/kinit.cpp:1211
#38 0x0804f068 in handle_requests (waitForPid=0) at /local/svn/kde/trunk/KDE/kdelibs/kinit/kinit.cpp:1404
#39 0x080504e3 in main (argc=4, argv=0xbfb9b7d4, envp=0xbfb9b7e8) at /local/svn/kde/trunk/KDE/kdelibs/kinit/kinit.cpp:1843

Reported using DrKonqi
Comment 1 Dario Andres 2010-02-15 16:03:09 UTC
Another case from bug 226976:
On Okular:
1.) Open a pdf
2.) Save copy as
3.) Type in a name
4.) press OK
=> okular crashes (but the document is saved)
Comment 2 Dario Andres 2010-02-15 16:03:12 UTC
*** Bug 226976 has been marked as a duplicate of this bug. ***
Comment 3 Dario Andres 2010-02-15 23:07:29 UTC
SVN commit 1090729 by dfaure:

Fix the "kdirwatch crash on re-entrancy from the slots" by emitting the signals
in a delayed manner.
Fixed for: 4.4.1
BUG: 224229 208486 226674 222547

 M  +21 -9     kdirwatch.cpp
 M  +20 -16    kdirwatch.h
 M  +2 -0      kdirwatch_p.h

WebSVN link: http://websvn.kde.org/?view=rev&revision=1090729
Comment 4 Maksim Orlovich 2010-02-16 16:10:40 UTC
*** Bug 227121 has been marked as a duplicate of this bug. ***
Comment 5 Maksim Orlovich 2010-02-16 16:11:56 UTC
*** Bug 227206 has been marked as a duplicate of this bug. ***
Comment 6 Dario Andres 2010-02-17 17:57:55 UTC
*** Bug 227398 has been marked as a duplicate of this bug. ***
Comment 7 Pino Toscano 2010-02-22 02:31:03 UTC
*** Bug 227994 has been marked as a duplicate of this bug. ***
Comment 8 Milian Wolff 2010-02-23 23:40:22 UTC
*** Bug 228248 has been marked as a duplicate of this bug. ***