<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>220153</bug_id>
          
          <creation_ts>2009-12-26 17:10:59 +0000</creation_ts>
          <short_desc>[steps] Kate crashes when reloading two documents at the same time after a change [QListData::size, QList&lt;KDirWatchPrivate::Client*&gt;::count, KDirWatchPrivate::Entry::isValid]</short_desc>
          <delta_ts>2010-02-11 08:54:35 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>kio</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>Compiled Sources</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dario Andres">andresbajotierra</reporter>
          <assigned_to name="David Faure">faure</assigned_to>
          <cc>arne_bab</cc>
    
    <cc>kwrite-bugs-null</cc>
    
    <cc>sputnikshock</cc>
    
    <cc>xtekhne</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>887020</commentid>
    <comment_count>0</comment_count>
    <who name="Dario Andres">andresbajotierra</who>
    <bug_when>2009-12-26 17:10:59 +0000</bug_when>
    <thetext>Application: kate (3.3.85)
KDE Platform Version: 4.3.85 (KDE 4.3.85 (KDE 4.4 Beta2)) (Compiled from sources)
Qt Version: 4.6.0
Operating System: Linux 2.6.31-ARCH i686
Distribution (Platform): Archlinux Packages

-- Information about the crash:
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.85 (KDE 4.3.85 (KDE 4.4 Beta2))
kdelibs svn rev. 1065942 / kdebase svn rev. 1065942
on ArchLinux i686 - Kernel 2.6.31.6

Steps to reproduce:
--

- Create two files with some content on it
  - &apos;echo &quot;foobar1&quot; &gt; foobar1&apos;
  - &apos;echo &quot;foobar2&quot; &gt; foobar2&apos;
- Open Kate
- Load this two documents at the same time
Kate opens the two documents and shows &quot;foobar2&quot;
- From Konsole, append new content to the &quot;foobar2&quot; file
  - &apos;echo &quot;foobar2&quot; &gt;&gt; foobar2&apos;
Kate will notice the change and it will open the &quot;file modified&quot; dialog
- Do not touch that dialog yet ...
- From Konsole, append new content to the &quot;foobar1&quot; file
  - &apos;echo &quot;foobar1&quot; &gt;&gt; foobar1&apos;
Kate will append the new changed document (foobar1) to the &quot;file modified&quot; dialog
- Press &quot;Reload&quot; into the &quot;file modified&quot; dialog
Kate crashes.

If you repeat this steps to much with the same file set (foobar1 and foobar2), it may stop happening (caching related?)

The crash can be reproduced everytime.

 -- Backtrace:
Application: Kate (kate), signal: Segmentation fault
[Current thread is 1 (Thread 0xb4c09700 (LWP 14119))]

Thread 2 (Thread 0xb2e0eb70 (LWP 14123)):
#0  0xb7807424 in __kernel_vsyscall ()
#1  0xb5c5fe55 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb2fa46cb in WTF::TCMalloc_PageHeap::scavengerThread (this=0xb30e3ac0) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2304
#3  0xb2fa3e1d in WTF::TCMalloc_PageHeap::runScavengerThread (context=0xb30e3ac0) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1438
#4  0xb5c5b8ac in start_thread () from /lib/libpthread.so.0
#5  0xb5aa501e in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb4c09700 (LWP 14119)):
[KCrash Handler]
#6  0xb753ab4a in QListData::size (this=0xffffffdc) at /home/kde-devel/kde/src/qt/include/QtCore/../../src/corelib/tools/qlist.h:90
#7  0xb75c2d79 in QList&lt;KDirWatchPrivate::Client*&gt;::count (this=0xffffffdc) at /home/kde-devel/kde/src/qt/include/QtCore/../../src/corelib/tools/qlist.h:261
#8  0xb75c2a58 in KDirWatchPrivate::Entry::isValid (this=0xffffffc0) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/kdirwatch_p.h:157
#9  0xb75bfd79 in KDirWatchPrivate::slotRescan (this=0x84a2690) at /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/kdirwatch.cpp:1359
#10 0xb75c28ce in KDirWatchPrivate::qt_metacall (this=0x84a2690, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0xbff74a08) at /home/kde-devel/kde/build/KDE/kdelibs/kio/kdirwatch_p.moc:81
#11 0xb5e289c4 in QMetaObject::metacall (object=0x84a2690, cl=QMetaObject::InvokeMetaMethod, idx=4, argv=0xbff74a08) at kernel/qmetaobject.cpp:237
#12 0xb5e3ca85 in QMetaObject::activate (sender=0x84a26d8, m=0xb5f847c4, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3294
#13 0xb5e9bbd7 in QTimer::timeout (this=0x84a26d8) at .moc/debug-shared/moc_qtimer.cpp:134
#14 0xb5e45498 in QTimer::timerEvent (this=0x84a26d8, e=0xbff74ff4) at kernel/qtimer.cpp:271
#15 0xb5e38ac6 in QObject::event (this=0x84a26d8, e=0xbff74ff4) at kernel/qobject.cpp:1224
#16 0xb63e8834 in QApplicationPrivate::notify_helper (this=0x8398940, receiver=0x84a26d8, e=0xbff74ff4) at kernel/qapplication.cpp:4242
#17 0xb63e6231 in QApplication::notify (this=0xbff753e4, receiver=0x84a26d8, e=0xbff74ff4) at kernel/qapplication.cpp:3661
#18 0xb711e538 in KApplication::notify (this=0xbff753e4, receiver=0x84a26d8, event=0xbff74ff4) at /home/kde-devel/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:302
#19 0xb5e21411 in QCoreApplication::notifyInternal (this=0xbff753e4, receiver=0x84a26d8, event=0xbff74ff4) at kernel/qcoreapplication.cpp:704
#20 0xb63d8f8f in QCoreApplication::sendEvent (receiver=0x84a26d8, event=0xbff74ff4) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#21 0xb5e5bdb6 in QTimerInfoList::activateTimers (this=0x8398234) at kernel/qeventdispatcher_unix.cpp:603
#22 0xb5e57cac in timerSourceDispatch (source=0x8398200) at kernel/qeventdispatcher_glib.cpp:184
#23 0xb5e57d65 in idleTimerSourceDispatch (source=0x8398270) at kernel/qeventdispatcher_glib.cpp:231
#24 0xb50b5378 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#25 0xb50b8bf0 in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#26 0xb50b8d23 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#27 0xb5e58e48 in QEventDispatcherGlib::processEvents (this=0x8361630, flags=...) at kernel/qeventdispatcher_glib.cpp:407
#28 0xb64bcd50 in QGuiEventDispatcherGlib::processEvents (this=0x8361630, flags=...) at kernel/qguieventdispatcher_glib.cpp:202
#29 0xb5e1e81b in QEventLoop::processEvents (this=0xbff752ec, flags=...) at kernel/qeventloop.cpp:149
#30 0xb5e1e960 in QEventLoop::exec (this=0xbff752ec, flags=...) at kernel/qeventloop.cpp:201
#31 0xb5e21aed in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#32 0xb63e5e54 in QApplication::exec () at kernel/qapplication.cpp:3570
#33 0xb7801ab5 in kdemain (argc=1, argv=0xbff75a84) at /home/kde-devel/kde/src/KDE/kdesdk/kate/app/katemain.cpp:377
#34 0x080486eb in main (argc=1, argv=0xbff75a84) at /home/kde-devel/kde/build/KDE/kdesdk/kate/app/kate_dummy.cpp:3

Reported using DrKonqi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>908070</commentid>
    <comment_count>1</comment_count>
    <who name="Dario Andres">andresbajotierra</who>
    <bug_when>2010-01-29 17:51:45 +0000</bug_when>
    <thetext>*** Bug 218665 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>908071</commentid>
    <comment_count>2</comment_count>
    <who name="Dario Andres">andresbajotierra</who>
    <bug_when>2010-01-29 17:52:43 +0000</bug_when>
    <thetext>Bug 224758 has another steps-set</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>908073</commentid>
    <comment_count>3</comment_count>
    <who name="Dario Andres">andresbajotierra</who>
    <bug_when>2010-01-29 17:52:48 +0000</bug_when>
    <thetext>*** Bug 224758 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>911802</commentid>
    <comment_count>4</comment_count>
    <who name="Dario Andres">andresbajotierra</who>
    <bug_when>2010-02-05 14:41:02 +0000</bug_when>
    <thetext>*** Bug 225591 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>914142</commentid>
    <comment_count>5</comment_count>
    <who name="Dario Andres">andresbajotierra</who>
    <bug_when>2010-02-10 14:23:26 +0000</bug_when>
    <thetext>Other steps to reproduce:

- Create a dummy file &quot;test&quot;
- Open Kate
- Open the &quot;test&quot; file
- Delete the file externally
- On Kate prompt select &quot;Overwrite&quot; -&gt; Crash
or
- On Kate prompt select &quot;Reload.&quot;, accept the error message about the file not being found and select &quot;Overwrite&quot; again -&gt; Crash</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>914146</commentid>
    <comment_count>6</comment_count>
    <who name="Milian Wolff">mail</who>
    <bug_when>2010-02-10 14:42:13 +0000</bug_when>
    <thetext>could confirm, will have to try to fix it later today</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>914642</commentid>
    <comment_count>7</comment_count>
    <who name="David Faure">faure</who>
    <bug_when>2010-02-11 08:54:35 +0000</bug_when>
    <thetext>SVN commit 1088537 by dfaure:

Fix crash in KDirWatch when using a messagebox in a slot connected to dirty(),
and in that nested event loop, doing things like getting another notification
and removing/adding watches.
Fixed for: 4.4.1
BUG: 220153


 M  +5 -2      kio/kdirwatch.cpp  
 M  +90 -9     tests/kdirwatch_unittest.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&amp;revision=1088537</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>