Bug 315745 - Kate crash on replace
Summary: Kate crash on replace
Status: RESOLVED DUPLICATE of bug 313759
Alias: None
Product: kate
Classification: Applications
Component: kwrite (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 315993 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-02-25 11:27 UTC by sbaynes
Modified: 2013-03-17 18:25 UTC (History)
2 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 sbaynes 2013-02-25 11:27:32 UTC
Application: kwrite (4.8.5 (4.8.5))
KDE Platform Version: 4.8.5 (4.8.5)
Qt Version: 4.8.1
Operating System: Linux 3.2.0-37-generic x86_64
Distribution: Ubuntu 12.04.2 LTS

-- Information about the crash:
Started kate (new window, no existing file)
pasted in 4 long (aprox 1600 chars) lines.
Did following replace
Find:,
Replace:,\n    
(some spaces after the \n)
Mode: Requalr expression.
action Replace All (no current selection).
I then added 4 additional new lines breaking some existing lines into two.
I then changed the replace mode to Plain Text (left Find and Replace unchanged) and clicked Replace All. At this point it crashed.

The crash can be reproduced some of the time.

-- Backtrace:
Application: KWrite (kwrite), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f1269859780 (LWP 31120))]

Thread 4 (Thread 0x7f12551ab700 (LWP 31123)):
#0  0x00007f1269188303 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f12633e6036 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f12633e649a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f12551b098b in ?? () from /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
#4  0x00007f12634079e5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f12638b2e9a in start_thread (arg=0x7f12551ab700) at pthread_create.c:308
#6  0x00007f1269193cbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f12549aa700 (LWP 31124)):
#0  __pthread_mutex_lock (mutex=0x7f1250010300) at pthread_mutex_lock.c:113
#1  0x00007f12634215a1 in g_mutex_lock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f12633e51df in g_main_context_acquire () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f12633e5f04 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f12633e649a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f125c302406 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#6  0x00007f12634079e5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007f12638b2e9a in start_thread (arg=0x7f12549aa700) at pthread_create.c:308
#8  0x00007f1269193cbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#9  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f124048b700 (LWP 31126)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f1240e33222 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#2  0x00007f1240e33259 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#3  0x00007f12638b2e9a in start_thread (arg=0x7f124048b700) at pthread_create.c:308
#4  0x00007f1269193cbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f1269859780 (LWP 31120)):
[KCrash Handler]
#6  0x00007f1241414f16 in Kate::TextBuffer::rangesForLine (this=<optimized out>, line=152, view=0x1407230, rangesWithAttributeOnly=true) at ../../part/buffer/katetextbuffer.cpp:820
#7  0x00007f12414b0740 in KateRenderer::decorationsForLine (this=0x13ffdc0, textLine=..., line=152, selectionsOnly=false, completionHighlight=0x0, completionSelected=false) at ../../part/render/katerenderer.cpp:333
#8  0x00007f12414b1a9a in KateRenderer::layoutLine (this=0x13ffdc0, lineLayout=..., maxwidth=-1, cacheLayout=<optimized out>) at ../../part/render/katerenderer.cpp:895
#9  0x00007f12414b636d in KateLayoutCache::line (this=0x1470070, realLine=<optimized out>, virtualLine=-1) at ../../part/render/katelayoutcache.cpp:299
#10 0x00007f12414b7299 in KateLayoutCache::updateViewCache (this=0x1470070, startPos=..., newViewLineCount=<optimized out>, viewLinesScrolled=<optimized out>) at ../../part/render/katelayoutcache.cpp:233
#11 0x00007f124150aecd in KateViewInternal::tagLines (this=0x143cf00, start=..., end=..., realCursors=<optimized out>) at ../../part/view/kateviewinternal.cpp:1978
#12 0x00007f124150b33c in KateViewInternal::tagLines (this=0x143cf00, start=0, end=<optimized out>, realLines=true) at ../../part/view/kateviewinternal.cpp:1948
#13 0x00007f124146f9d2 in KateDocument::tagLines (this=<optimized out>, start=0, end=199) at ../../part/document/katedocument.cpp:3615
#14 0x00007f124147ee36 in qt_static_metacall (_a=0x7fff7152cd60, _id=<optimized out>, _o=0x13ffe70, _c=<optimized out>) at ./katedocument.moc:281
#15 KateDocument::qt_static_metacall (_o=0x13ffe70, _c=<optimized out>, _id=<optimized out>, _a=0x7fff7152cd60) at ./katedocument.moc:205
#16 0x00007f1266c03281 in QMetaObject::activate (sender=0x14008d0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff7152cd60) at kernel/qobject.cpp:3547
#17 0x00007f12414881cf in KateBuffer::tagLines (this=<optimized out>, _t1=0, _t2=199) at ./katebuffer.moc:112
#18 0x00007f12414898e9 in KateBuffer::doHighlight (this=<optimized out>, startLine=0, endLine=196, invalidate=true) at ../../part/document/katebuffer.cpp:736
#19 0x00007f1241470dbc in editEnd (this=0x13ffe70) at ../../part/document/katedocument.cpp:854
#20 KateDocument::editEnd (this=0x13ffe70) at ../../part/document/katedocument.cpp:835
#21 0x00007f1241487799 in KateDocument::endEditing (this=<optimized out>) at ../../part/document/katedocument.h:214
#22 0x00007f12414c26da in KateSearchBar::findAll (this=0x183d5f0, inputRange=..., replacement=<optimized out>) at ../../part/search/katesearchbar.cpp:838
#23 0x00007f12414c2e8d in KateSearchBar::replaceAll (this=0x183d5f0) at ../../part/search/katesearchbar.cpp:871
#24 0x00007f1266c03281 in QMetaObject::activate (sender=0x198cae0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff7152d4d0) at kernel/qobject.cpp:3547
#25 0x00007f1267c78c72 in QAbstractButton::clicked (this=<optimized out>, _t1=false) at .moc/release-shared/moc_qabstractbutton.cpp:220
#26 0x00007f12679b6a4e in QAbstractButtonPrivate::emitClicked (this=<optimized out>) at widgets/qabstractbutton.cpp:548
#27 0x00007f12679b7d8b in QAbstractButtonPrivate::click (this=0x198d020) at widgets/qabstractbutton.cpp:541
#28 0x00007f12679b7ffc in QAbstractButton::mouseReleaseEvent (this=0x198cae0, e=0x7fff7152dda0) at widgets/qabstractbutton.cpp:1123
#29 0x00007f1267639144 in QWidget::event (this=0x198cae0, event=0x7fff7152dda0) at kernel/qwidget.cpp:8362
#30 0x00007f12675e8894 in notify_helper (e=0x7fff7152dda0, receiver=0x198cae0, this=0x1064d20) at kernel/qapplication.cpp:4559
#31 QApplicationPrivate::notify_helper (this=0x1064d20, receiver=0x198cae0, e=0x7fff7152dda0) at kernel/qapplication.cpp:4531
#32 0x00007f12675ee0bf in QApplication::notify (this=<optimized out>, receiver=0x198cae0, e=0x7fff7152dda0) at kernel/qapplication.cpp:4102
#33 0x00007f12683223f6 in KApplication::notify (this=0x7fff7152ea80, receiver=0x198cae0, event=0x7fff7152dda0) at ../../kdeui/kernel/kapplication.cpp:311
#34 0x00007f1266beee9c in QCoreApplication::notifyInternal (this=0x7fff7152ea80, receiver=0x198cae0, event=0x7fff7152dda0) at kernel/qcoreapplication.cpp:876
#35 0x00007f12675e9862 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#36 QApplicationPrivate::sendMouseEvent (receiver=0x198cae0, event=0x7fff7152dda0, alienWidget=0x198cae0, nativeWidget=0x183d5f0, buttonDown=0x198cae0, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3170
#37 0x00007f1267668bf5 in QETWidget::translateMouseEvent (this=0x183d5f0, event=<optimized out>) at kernel/qapplication_x11.cpp:4617
#38 0x00007f1267667bae in QApplication::x11ProcessEvent (this=0x7fff7152ea80, event=0x7fff7152e670) at kernel/qapplication_x11.cpp:3732
#39 0x00007f12676910d2 in x11EventSourceDispatch (s=0x1062880, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#40 0x00007f12633e5d53 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#41 0x00007f12633e60a0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#42 0x00007f12633e6164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#43 0x00007f1266c1e3bf in QEventDispatcherGlib::processEvents (this=0x1039ad0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#44 0x00007f1267690d5e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#45 0x00007f1266bedc82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#46 0x00007f1266beded7 in QEventLoop::exec (this=0x7fff7152ea10, flags=...) at kernel/qeventloop.cpp:204
#47 0x00007f1266bf2f67 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#48 0x00007f126946dcb1 in kdemain (argc=1, argv=<optimized out>) at ../../kwrite/kwritemain.cpp:680
#49 0x00007f12690c176d in __libc_start_main (main=0x400630 <main(int, char**)>, argc=1, ubp_av=0x7fff7152f568, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff7152f558) at libc-start.c:226
#50 0x0000000000400661 in _start ()

Possible duplicates by query: bug 315160, bug 313427, bug 304351, bug 304018, bug 302976.

Reported using DrKonqi
Comment 1 sbaynes 2013-02-25 11:33:36 UTC
On one of the occasions it did not crash, it then crashed on save.


Application: KWrite (kwrite), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7ffad8971780 (LWP 31287))]

Thread 5 (Thread 0x7ffac42c3700 (LWP 31290)):
#0  0x00007ffad82a0303 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007ffad24fe036 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffad24fe49a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffac42c898b in ?? () from /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
#4  0x00007ffad251f9e5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffad29cae9a in start_thread (arg=0x7ffac42c3700) at pthread_create.c:308
#6  0x00007ffad82abcbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7ffac3ac2700 (LWP 31291)):
#0  0x00007ffad82a0303 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007ffad24fe036 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffad24fe49a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffacb41a406 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007ffad251f9e5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffad29cae9a in start_thread (arg=0x7ffac3ac2700) at pthread_create.c:308
#6  0x00007ffad82abcbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7ffaaf6c9700 (LWP 31294)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007ffab0071222 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#2  0x00007ffab0071259 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#3  0x00007ffad29cae9a in start_thread (arg=0x7ffaaf6c9700) at pthread_create.c:308
#4  0x00007ffad82abcbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7ffac2651700 (LWP 32511)):
#0  0x00007ffad82a0303 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007ffad24fe036 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffad24fe164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffad5d36426 in QEventDispatcherGlib::processEvents (this=0x7ffab80008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007ffad5d05c82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007ffad5d05ed7 in QEventLoop::exec (this=0x7ffac2650dd0, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007ffad5c04fa7 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#7  0x00007ffad5ce59ff in QInotifyFileSystemWatcherEngine::run (this=0x1f28aa0) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007ffad5c07fcb in QThreadPrivate::start (arg=0x1f28aa0) at thread/qthread_unix.cpp:298
#9  0x00007ffad29cae9a in start_thread (arg=0x7ffac2651700) at pthread_create.c:308
#10 0x00007ffad82abcbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7ffad8971780 (LWP 31287)):
[KCrash Handler]
#6  0x00000000021a5520 in ?? ()
#7  0x00007ffab0652f19 in Kate::TextBuffer::rangesForLine (this=<optimized out>, line=65, view=0x1b13bd0, rangesWithAttributeOnly=true) at ../../part/buffer/katetextbuffer.cpp:820
#8  0x00007ffab06ee740 in KateRenderer::decorationsForLine (this=0x1b0c7f0, textLine=..., line=65, selectionsOnly=false, completionHighlight=0x0, completionSelected=false) at ../../part/render/katerenderer.cpp:333
#9  0x00007ffab06efa9a in KateRenderer::layoutLine (this=0x1b0c7f0, lineLayout=..., maxwidth=-1, cacheLayout=<optimized out>) at ../../part/render/katerenderer.cpp:895
#10 0x00007ffab06f447d in KateLayoutCache::line (this=0x1b7ecd0, realLine=65, virtualLine=-1) at ../../part/render/katelayoutcache.cpp:318
#11 0x00007ffab07433a8 in KateViewInternal::maxLen (this=0x1b49c20, startLine=11) at ../../part/view/kateviewinternal.cpp:1612
#12 0x00007ffab07466da in doUpdateView (viewLinesScrolled=3, changed=<optimized out>, this=0x1b49c20) at ../../part/view/kateviewinternal.cpp:566
#13 KateViewInternal::doUpdateView (this=0x1b49c20, changed=<optimized out>, viewLinesScrolled=3) at ../../part/view/kateviewinternal.cpp:530
#14 0x00007ffab0746cac in KateViewInternal::updateView (this=0x1b49c20, changed=false, viewLinesScrolled=<optimized out>) at ../../part/view/kateviewinternal.cpp:524
#15 0x00007ffab0747e83 in KateViewInternal::scrollPos (this=0x1b49c20, c=..., force=<optimized out>, calledExternally=false) at ../../part/view/kateviewinternal.cpp:477
#16 0x00007ffab07482d0 in KateViewInternal::scrollViewLines (this=<optimized out>, offset=3) at ../../part/view/kateviewinternal.cpp:354
#17 0x00007ffab074845b in wheelEvent (e=0x7fff2009e0a0, this=0x1b49c20) at ../../part/view/kateviewinternal.cpp:3223
#18 KateViewInternal::wheelEvent (this=0x1b49c20, e=0x7fff2009e0a0) at ../../part/view/kateviewinternal.cpp:3200
#19 0x00007ffad6751984 in QWidget::event (this=0x1b49c20, event=0x7fff2009e0a0) at kernel/qwidget.cpp:8370
#20 0x00007ffad6700894 in notify_helper (e=0x7fff2009e0a0, receiver=0x1b49c20, this=0x1771d20) at kernel/qapplication.cpp:4559
#21 QApplicationPrivate::notify_helper (this=0x1771d20, receiver=0x1b49c20, e=0x7fff2009e0a0) at kernel/qapplication.cpp:4531
#22 0x00007ffad6705f70 in QApplication::notify (this=<optimized out>, receiver=0x1b49c20, e=0x7fff2009e0a0) at kernel/qapplication.cpp:4157
#23 0x00007ffad743a3f6 in KApplication::notify (this=0x7fff2009eeb0, receiver=0x1b49c20, event=0x7fff2009e0a0) at ../../kdeui/kernel/kapplication.cpp:311
#24 0x00007ffad5d06e9c in QCoreApplication::notifyInternal (this=0x7fff2009eeb0, receiver=0x1b49c20, event=0x7fff2009e0a0) at kernel/qcoreapplication.cpp:876
#25 0x00007ffad676d932 in sendSpontaneousEvent (event=0x7fff2009e0a0, receiver=0x1b49c20) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:234
#26 QETWidget::translateWheelEvent (this=<optimized out>, global_x=<optimized out>, global_y=<optimized out>, delta=-120, buttons=..., modifiers=..., orient=Qt::Vertical) at kernel/qapplication_x11.cpp:4655
#27 0x00007ffad6780e6d in QETWidget::translateMouseEvent (this=0x1b81910, event=0x7fff2009eaa0) at kernel/qapplication_x11.cpp:4432
#28 0x00007ffad677fbae in QApplication::x11ProcessEvent (this=0x7fff2009eeb0, event=0x7fff2009eaa0) at kernel/qapplication_x11.cpp:3732
#29 0x00007ffad67a90d2 in x11EventSourceDispatch (s=0x176f880, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#30 0x00007ffad24fdd53 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007ffad24fe0a0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007ffad24fe164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#33 0x00007ffad5d363bf in QEventDispatcherGlib::processEvents (this=0x1746ad0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#34 0x00007ffad67a8d5e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#35 0x00007ffad5d05c82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#36 0x00007ffad5d05ed7 in QEventLoop::exec (this=0x7fff2009ee40, flags=...) at kernel/qeventloop.cpp:204
#37 0x00007ffad5d0af67 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#38 0x00007ffad8585cb1 in kdemain (argc=1, argv=<optimized out>) at ../../kwrite/kwritemain.cpp:680
#39 0x00007ffad81d976d in __libc_start_main (main=0x400630 <main(int, char**)>, argc=1, ubp_av=0x7fff2009f998, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff2009f988) at libc-start.c:226
#40 0x0000000000400661 in _start ()
Comment 2 Dominik Haumann 2013-02-25 20:05:44 UTC
Can you check, if the crash also appears when you disable "View" > "[ ] Dynamic Word Wrap" ?
Comment 3 Jekyll Wu 2013-03-04 08:29:54 UTC
*** Bug 315993 has been marked as a duplicate of this bug. ***
Comment 4 sbaynes 2013-03-04 09:22:15 UTC
(In reply to comment #2)
> Can you check, if the crash also appears when you disable "View" > "[ ]
> Dynamic Word Wrap" ?

Dynamic word wrap was already disabled.
Comment 5 Dominik Haumann 2013-03-17 17:16:07 UTC
Do you have on-thy-fly spellchecking enabled?
Comment 6 Christoph Cullmann 2013-03-17 18:25:47 UTC

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