Bug 202007

Summary: Kate crashed after saving a file (KateSmartCursor, KateSmartRange, KateSmartManager::newSmartRange, KateDocument::newSmartRange)
Product: [Applications] kate Reporter: Johann Renner Rouliez <jrenner.rouliez>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: alexanderkohout, andresbajotierra, andrey.rukhin, christoph, Ekkehard.Blanz, ghostunderscore, juancarlosfigueroaduran, klindenberg, martin.schlaeffer, nicotra.andrea, pablo, sara.royuela, sebastian.souyris, thomasdn, tim.tadh, tritemio, vlad.lapadatescu
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: New crash information added by DrKonqi
New crash information added by DrKonqi
New crash information added by DrKonqi

Description Johann Renner Rouliez 2009-07-30 16:11:18 UTC
Application that crashed: kate
Version of the application: 3.2.98
KDE Version: 4.2.98 (KDE 4.2.98 (KDE 4.3 RC3))
Qt Version: 4.5.0
Operating System: Linux 2.6.28-14-generic i686
Distribution: Ubuntu 9.04

What I was doing when the application crashed:
As usual, I was working with a group of files opened in Kate, all of them managed by a session. I modified a single file and after I clicked in the Save button (on the toolbar) Kate crashed. This is the first time it happens to me, at least in the KDE4 era.

 -- Backtrace:
Application: Kate (kdeinit4), signal: Segmentation fault
[KCrash Handler]
#6  KateSmartCursor (this=0x83cf140, position=@0x8bce6d0, doc=0x84ab3a0, insertBehavior=KTextEditor::SmartCursor::MoveOnInsert) at /build/buildd/kde4libs-4.2.98a/kate/smart/katesmartcursor.cpp:50
#7  0xb2e0e1f9 in KateSmartRange (this=0x826dfa8, range=@0xbfc24014, doc=0x84ab3a0, parent=0x0, insertBehavior={i = -1077788916}) at /build/buildd/kde4libs-4.2.98a/kate/smart/katesmartrange.cpp:36
#8  0xb2e13d10 in KateSmartManager::newSmartRange (this=0x84bf0e0, range=@0xbfc24014, parent=0x0, insertBehavior={i = -1077788848}, internal=false)
    at /build/buildd/kde4libs-4.2.98a/kate/smart/katesmartmanager.cpp:208
#9  0xb2db1668 in KateDocument::newSmartRange (this=0x84ab3a0, range=@0xbfc24014, parent=0x0, insertBehavior={i = -1077788556}) at /build/buildd/kde4libs-4.2.98a/kate/document/katedocument.cpp:5809
#10 0xb2e75d06 in KateIconBorder::showBlock (this=0x8b848a0, line=20) at /build/buildd/kde4libs-4.2.98a/kate/view/kateviewhelpers.cpp:1301
#11 0xb2e7663a in KateIconBorder::mouseMoveEvent (this=0x8b848a0, e=0xbfc24628) at /build/buildd/kde4libs-4.2.98a/kate/view/kateviewhelpers.cpp:1328
#12 0xb68df9ad in QWidget::event (this=0x8b848a0, event=0xbfc24628) at kernel/qwidget.cpp:7501
#13 0xb6888e9c in QApplicationPrivate::notify_helper (this=0x82992f0, receiver=0x8b848a0, e=0xbfc24628) at kernel/qapplication.cpp:4084
#14 0xb6891b11 in QApplication::notify (this=0xbfc25068, receiver=0x8b848a0, e=0xbfc24628) at kernel/qapplication.cpp:3786
#15 0xb73c35cd in KApplication::notify (this=0xbfc25068, receiver=0x8b848a0, event=0xbfc24628) at /build/buildd/kde4libs-4.2.98a/kdeui/kernel/kapplication.cpp:302
#16 0xb7dfba3b in QCoreApplication::notifyInternal (this=0xbfc25068, receiver=0x8b848a0, event=0xbfc24628) at kernel/qcoreapplication.cpp:602
#17 0xb6890b7e in QApplicationPrivate::sendMouseEvent (receiver=0x8b848a0, event=0xbfc24628, alienWidget=0x8b848a0, nativeWidget=0x84807f0, buttonDown=0xb7133200, lastMouseReceiver=@0xb7133204)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:216
#18 0xb690097e in QETWidget::translateMouseEvent (this=0x84807f0, event=0xbfc24c6c) at kernel/qapplication_x11.cpp:4425
#19 0xb68ffca7 in QApplication::x11ProcessEvent (this=0xbfc25068, event=0xbfc24c6c) at kernel/qapplication_x11.cpp:3421
#20 0xb692ac6a in x11EventSourceDispatch (s=0x829c2a8, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#21 0xb641bb88 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#22 0xb641f0eb in ?? () from /usr/lib/libglib-2.0.so.0
#23 0xb641f268 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#24 0xb7e27438 in QEventDispatcherGlib::processEvents (this=0x8236d40, flags={i = -1077785048}) at kernel/qeventdispatcher_glib.cpp:323
#25 0xb692a365 in QGuiEventDispatcherGlib::processEvents (this=0x8236d40, flags={i = -1077785000}) at kernel/qguieventdispatcher_glib.cpp:202
#26 0xb7dfa06a in QEventLoop::processEvents (this=0xbfc24ed0, flags={i = -1077784936}) at kernel/qeventloop.cpp:149
#27 0xb7dfa4aa in QEventLoop::exec (this=0xbfc24ed0, flags={i = -1077784872}) at kernel/qeventloop.cpp:200
#28 0xb7dfc959 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:880
#29 0xb6888d17 in QApplication::exec () at kernel/qapplication.cpp:3553
#30 0xb5bc386d in kdemain () from /usr/lib/libkdeinit4_kate.so
#31 0x0804e27d in launch (argc=3, _name=0x82825ac "kate", args=0x82825f5 "", cwd=0x0, envc=0, envs=0x82825fa "", reset_env=false, tty=0x0, avoid_loops=false, startup_id_str=0x8051391 "0")
    at /build/buildd/kde4libs-4.2.98a/kinit/kinit.cpp:676
#32 0x0804ea5d in handle_launcher_request (sock=7, who=<value optimized out>) at /build/buildd/kde4libs-4.2.98a/kinit/kinit.cpp:1168
#33 0x0804efe5 in handle_requests (waitForPid=0) at /build/buildd/kde4libs-4.2.98a/kinit/kinit.cpp:1361
#34 0x0804fbca in main (argc=2, argv=0xbfc25c24, envp=0xbfc25c30) at /build/buildd/kde4libs-4.2.98a/kinit/kinit.cpp:1788

Reported using DrKonqi
Comment 1 Dario Andres 2009-08-28 20:16:45 UTC
*** Bug 205273 has been marked as a duplicate of this bug. ***
Comment 2 Dario Andres 2009-08-28 20:17:45 UTC
This looks like it could be the same as bug 192961. Thanks
Comment 3 Dario Andres 2009-08-28 20:19:20 UTC
*** Bug 192961 has been marked as a duplicate of this bug. ***
Comment 4 Dario Andres 2009-10-22 23:34:05 UTC
*** Bug 211473 has been marked as a duplicate of this bug. ***
Comment 5 Andreas Pakulat 2010-01-07 19:37:36 UTC
*** Bug 221629 has been marked as a duplicate of this bug. ***
Comment 6 Christoph Cullmann 2010-02-16 14:32:50 UTC
Guess fixed by other smart range fixes, no such crash seen here at least since long.
Comment 7 Tim Henderson 2010-04-28 08:19:17 UTC
Created attachment 43075 [details]
New crash information added by DrKonqi

I had just saved and then tried to delete some spaces at the end of the line to join the current line with next line (static word wrap is enabled). It then seg faulted.
Comment 8 Tim Henderson 2010-04-29 08:00:02 UTC
Created attachment 43093 [details]
New crash information added by DrKonqi

I had not saved recently this time. I was simply typing along when the program seg faulted. It may be related to having the structure view open.
Comment 9 Christoph Cullmann 2010-04-29 08:15:11 UTC
I am very sorry about the problems you have :(
Seems there are more hidden errors in smart, which is no wonder, as it is quiet complex and not maintained.
For KDE 4.5, Kate will use no smart ranges and cursors at all any more for normal work and only provide them as deprecated API for external apps until they switch over to the new Moving* stuff, for KDE 4.6.
Therefor, this problem is solved in /trunk but won't be able to be fixed in the KDE 4.4 branch, as nobody understands the smart* stuff at all :/
I am very sorry, I hope the crashs don't happen to often and that KDE 4.5 again will fix that all for you :((( Sorry :((
Comment 10 Michel Ludwig 2010-05-30 23:27:11 UTC
*** Bug 239970 has been marked as a duplicate of this bug. ***
Comment 11 Michel Ludwig 2010-07-11 11:03:36 UTC
*** Bug 244156 has been marked as a duplicate of this bug. ***
Comment 12 Nicolas L. 2010-07-20 14:47:48 UTC
*** Bug 245206 has been marked as a duplicate of this bug. ***
Comment 13 Michel Ludwig 2010-08-27 17:45:54 UTC
*** Bug 249124 has been marked as a duplicate of this bug. ***
Comment 14 Katja Lindenberg 2010-09-16 21:08:58 UTC
Created attachment 51732 [details]
New crash information added by DrKonqi

Kile has now crashed randomly about 3 or 4 times.  I was just typing.
Comment 15 Michel Ludwig 2010-09-21 22:26:25 UTC
*** Bug 250896 has been marked as a duplicate of this bug. ***
Comment 16 Christoph Feck 2010-09-25 23:10:09 UTC
*** Bug 252379 has been marked as a duplicate of this bug. ***
Comment 17 Michel Ludwig 2010-11-17 21:00:29 UTC
*** Bug 255820 has been marked as a duplicate of this bug. ***
Comment 18 Michel Ludwig 2011-01-05 19:53:28 UTC
*** Bug 261901 has been marked as a duplicate of this bug. ***
Comment 19 Michel Ludwig 2011-03-11 23:47:45 UTC
*** Bug 268055 has been marked as a duplicate of this bug. ***
Comment 20 Michel Ludwig 2011-06-13 22:50:19 UTC
*** Bug 274456 has been marked as a duplicate of this bug. ***