Bug 290525

Summary: Kate crashed while rewrapping text
Product: [Applications] kate Reporter: Wayne Hammond <wdhammond>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: crash CC: arne.henningsen, christoph, cydyney, jtatria, kfstephens2, wdhammond
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: New crash information added by DrKonqi
Perl object dump

Description Wayne Hammond 2012-01-03 19:40:18 UTC
Application: kate (3.7.3)
KDE Platform Version: 4.7.3 (4.7.3)
Qt Version: 4.8.0
Operating System: Linux 3.1.6-1.fc16.x86_64 x86_64
Distribution: "Fedora release 16 (Verne)"

-- Information about the crash:
- What I was doing when the application crashed:
Highlighting text and using<ctrl>j to rewrap paragraphs.

-- Backtrace:
Application: Kate (kate), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f4e7b160840 (LWP 12560))]

Thread 3 (Thread 0x7f4e62cd0700 (LWP 12573)):
#0  0x0000003eae80bae5 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f4e6989ee52 in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0x7f4e69b98240) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2359
#2  0x00007f4e6989ee89 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=<optimized out>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464
#3  0x0000003eae807d90 in start_thread () from /lib64/libpthread.so.0
#4  0x0000003eae0ef48d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f4e61788700 (LWP 12580)):
#0  0x0000003eae0e6af3 in poll () from /lib64/libc.so.6
#1  0x0000003eb0044f88 in g_main_context_poll (n_fds=1, fds=0x7f4e5c002400, priority=<optimized out>, timeout=-1, context=0x7f4e5c0009a0) at gmain.c:3386
#2  g_main_context_iterate (context=0x7f4e5c0009a0, block=<optimized out>, dispatch=1, self=<optimized out>) at gmain.c:3068
#3  0x0000003eb004544c in g_main_context_iteration (context=0x7f4e5c0009a0, may_block=1) at gmain.c:3136
#4  0x0000003eb95a6896 in QEventDispatcherGlib::processEvents (this=0x7f4e5c0008c0, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:426
#5  0x0000003eb9576c82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#6  0x0000003eb9576ed7 in QEventLoop::exec (this=0x7f4e61787d10, flags=...) at kernel/qeventloop.cpp:204
#7  0x0000003eb9478ad7 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#8  0x0000003eb9556a5f in QInotifyFileSystemWatcherEngine::run (this=0x12789c0) at io/qfilesystemwatcher_inotify.cpp:248
#9  0x0000003eb947bb1b in QThreadPrivate::start (arg=0x12789c0) at thread/qthread_unix.cpp:298
#10 0x0000003eae807d90 in start_thread () from /lib64/libpthread.so.0
#11 0x0000003eae0ef48d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f4e7b160840 (LWP 12560)):
[KCrash Handler]
#6  0x0000004700000039 in ?? ()
#7  0x00007f4e693387e9 in Kate::TextBuffer::rangesForLine (this=<optimized out>, line=7998, view=0x119b9b0, rangesWithAttributeOnly=false) at /usr/src/debug/kate-4.7.3/part/buffer/katetextbuffer.cpp:764
#8  0x00007f4e69418d3e in KateView::updateRangesIn (this=0x119b9b0, activationType=KTextEditor::Attribute::ActivateMouseIn) at /usr/src/debug/kate-4.7.3/part/view/kateview.cpp:2810
#9  0x00007f4e69422fa9 in KateViewInternal::mouseMoveEvent (this=0x11a1430, e=0x7fff98394da0) at /usr/src/debug/kate-4.7.3/part/view/kateviewinternal.cpp:2726
#10 0x0000003ebfe19dbe in QWidget::event (this=0x11a1430, event=0x7fff98394da0) at kernel/qwidget.cpp:8335
#11 0x0000003ebfdc96f4 in notify_helper (e=0x7fff98394da0, receiver=0x11a1430, this=0x7c1570) at kernel/qapplication.cpp:4518
#12 QApplicationPrivate::notify_helper (this=0x7c1570, receiver=0x11a1430, e=0x7fff98394da0) at kernel/qapplication.cpp:4490
#13 0x0000003ebfdcee43 in QApplication::notify (this=<optimized out>, receiver=0x11a1430, e=0x7fff98394da0) at kernel/qapplication.cpp:4061
#14 0x0000003ebda50396 in KApplication::notify (this=0x7fff98395af0, receiver=0x11a1430, event=0x7fff98394da0) at /usr/src/debug/kdelibs-4.7.3/kdeui/kernel/kapplication.cpp:311
#15 0x0000003eb9577b4c in QCoreApplication::notifyInternal (this=0x7fff98395af0, receiver=0x11a1430, event=0x7fff98394da0) at kernel/qcoreapplication.cpp:876
#16 0x0000003ebfdca6c2 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../src/corelib/kernel/qcoreapplication.h:231
#17 QApplicationPrivate::sendMouseEvent (receiver=0x11a1430, event=0x7fff98394da0, alienWidget=0x11a1430, nativeWidget=0x11bfba0, buttonDown=0x0, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3157
#18 0x0000003ebfe46045 in QETWidget::translateMouseEvent (this=0x11bfba0, event=<optimized out>) at kernel/qapplication_x11.cpp:4515
#19 0x0000003ebfe44f0a in QApplication::x11ProcessEvent (this=0x7fff98395af0, event=0x7fff98395660) at kernel/qapplication_x11.cpp:3641
#20 0x0000003ebfe6c74c in x11EventSourceDispatch (s=0x7c6580, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:148
#21 0x0000003eb0044a7d in g_main_dispatch (context=0x7c55e0) at gmain.c:2425
#22 g_main_context_dispatch (context=0x7c55e0) at gmain.c:2995
#23 0x0000003eb0045278 in g_main_context_iterate (context=0x7c55e0, block=<optimized out>, dispatch=1, self=<optimized out>) at gmain.c:3073
#24 0x0000003eb004544c in g_main_context_iteration (context=0x7c55e0, may_block=1) at gmain.c:3136
#25 0x0000003eb95a682f in QEventDispatcherGlib::processEvents (this=0x795990, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#26 0x0000003ebfe6c43e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:207
#27 0x0000003eb9576c82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#28 0x0000003eb9576ed7 in QEventLoop::exec (this=0x7fff98395a30, flags=...) at kernel/qeventloop.cpp:204
#29 0x0000003eb957b8d5 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#30 0x0000003eb580608d in kdemain (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kate-4.7.3/kate/app/katemain.cpp:377
#31 0x0000003eae02169d in __libc_start_main () from /lib64/libc.so.6
#32 0x0000000000400761 in _start ()

Possible duplicates by query: bug 282385, bug 282274, bug 280224.

Reported using DrKonqi
Comment 1 Wayne Hammond 2012-01-06 22:14:50 UTC
Created attachment 67525 [details]
New crash information added by DrKonqi

kate (3.7.3) on KDE Platform 4.7.3 (4.7.3) using Qt 4.8.0

- What I was doing when the application crashed:
Same as above, rewrapping text (large file ~1 MB).  Applications crashes about every 10 minutes of use, more when working more quickly.

-- Backtrace (Reduced):
#7  0x00007ff749b9f7e9 in Kate::TextBuffer::rangesForLine (this=<optimized out>, line=7682, view=0x17c5bc0, rangesWithAttributeOnly=false) at /usr/src/debug/kate-4.7.3/part/buffer/katetextbuffer.cpp:764
#8  0x00007ff749c7fd3e in KateView::updateRangesIn (this=0x17c5bc0, activationType=KTextEditor::Attribute::ActivateMouseIn) at /usr/src/debug/kate-4.7.3/part/view/kateview.cpp:2810
#9  0x00007ff749c89fa9 in KateViewInternal::mouseMoveEvent (this=0x17c72d0, e=0x7fff5b310300) at /usr/src/debug/kate-4.7.3/part/view/kateviewinternal.cpp:2726
#10 0x0000003ebfe19dbe in QWidget::event (this=0x17c72d0, event=0x7fff5b310300) at kernel/qwidget.cpp:8335
#11 0x0000003ebfdc96f4 in notify_helper (e=0x7fff5b310300, receiver=0x17c72d0, this=0xde9850) at kernel/qapplication.cpp:4518
Comment 2 Michel Ludwig 2012-03-15 20:37:43 UTC
*** Bug 294240 has been marked as a duplicate of this bug. ***
Comment 3 Michel Ludwig 2012-04-04 11:52:30 UTC
*** Bug 297382 has been marked as a duplicate of this bug. ***
Comment 4 Jekyll Wu 2012-07-05 20:41:58 UTC
*** Bug 299146 has been marked as a duplicate of this bug. ***
Comment 5 Jekyll Wu 2012-09-20 00:28:20 UTC
*** Bug 307075 has been marked as a duplicate of this bug. ***
Comment 6 Christoph Cullmann 2012-10-27 00:00:52 UTC
Thanks for the report, but I need a way to reproduce this. I believe there is some error somewhere, but I am unable to find it without some example to reproduce :(
Comment 7 José Tomás Atria 2012-11-06 17:36:25 UTC
Created attachment 75057 [details]
Perl object dump

You'll notice that the items are numbered, but nor in order. If you attempt to re order them by pressing Ctrl+Shift+Up, or Ctrl+Shift+Down, Kate crashes in the same way as in the bug report above.
Comment 8 Christoph Cullmann 2012-11-06 22:15:31 UTC
Hmm, I just try and it doesn't crash, does it crash on any reorder or do I need to reorder some special lines?
Comment 9 Christoph Cullmann 2012-11-06 22:27:28 UTC
Btw., thanks already for the example! If I now could get it to crash here, I really would like to fix this, seems to be some nasty hidden bug :/
Comment 10 José Tomás Atria 2012-11-06 22:34:22 UTC
Christoph, thank you so much for looking into this, this bug is driving me nuts!

I have to confess that the document doesn't actually reproduce the exact same bug I reported originally: the original crashed when folding and unfolding nodes, this one crashes when reordering lines... but it looks uncannily similar.

I'll look in detail into this in the following days and try to produce a reliable test case.
Comment 11 Christoph Cullmann 2012-11-06 22:37:30 UTC
Thanks ;) If we really could find the reason for this crash, many users will be happy, as it seems to come up in many bug reports but until now without any way to reproduce.
Comment 12 Dominik Haumann 2013-01-20 15:51:48 UTC

*** This bug has been marked as a duplicate of bug 265426 ***