Bug 217128 - Kate crashed on editing (KateSmartCursor::setPositionInternal, KateSmartCursor::setPosition, KTextEditor::Cursor::operator)
Summary: Kate crashed on editing (KateSmartCursor::setPositionInternal, KateSmartCurso...
Status: RESOLVED DUPLICATE of bug 239046
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 209855 218742 218901 223479 223545 231263 232508 245084 245908 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-12-02 22:47 UTC by Bartemius Crouch
Modified: 2010-07-31 12:58 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Test file for procedure described below (165 bytes, text/plain)
2010-02-24 14:50 UTC, François Bianco
Details
New crash information added by DrKonqi (3.47 KB, text/plain)
2010-04-10 04:02 UTC, jogarlo18
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bartemius Crouch 2009-12-02 22:47:32 UTC
Application that crashed: kate
Version of the application: 3.3.2
KDE Version: 4.3.2 (KDE 4.3.2)
Qt Version: 4.5.2
Operating System: Linux 2.6.31-15-generic i686
Distribution: Ubuntu 9.10

 -- Backtrace:
Application: Kate (kdeinit4), signal: Segmentation fault
[KCrash Handler]
#6  0x01d27e6a in KateSmartCursor::setPositionInternal (this=0x8edade0, pos=..., internal=false) at ../../kate/smart/katesmartcursor.cpp:186
#7  0x01d28595 in KateSmartCursor::setPosition (this=0x8edade0, pos=...) at ../../kate/smart/katesmartcursor.cpp:415
#8  0x01ce4a71 in KTextEditor::Cursor::operator= (this=0x8b606d0, range=..., maxLines=96) at ../../interfaces/ktexteditor/cursor.h:202
#9  KateDocument::findMatchingBracket (this=0x8b606d0, range=..., maxLines=96) at ../../kate/document/katedocument.cpp:4857
#10 0x01ce4ada in KateDocument::newBracketMark (this=0x8b606d0, cursor=..., bm=..., maxLines=96) at ../../kate/document/katedocument.cpp:4778
#11 0x01d78ec5 in KateViewInternal::updateBracketMarks (this=0x8ed8fa0) at ../../kate/view/kateviewinternal.cpp:1992
#12 0x01d8001b in KateViewInternal::updateCursor (this=0x8ed8fa0, newCursor=..., force=false, center=false, calledExternally=false) at ../../kate/view/kateviewinternal.cpp:1913
#13 0x01d8203e in KateViewInternal::cursorDown (this=0x8ed8fa0, sel=<value optimized out>) at ../../kate/view/kateviewinternal.cpp:1516
#14 0x01d5d2bb in KateView::down (this=0x8c6b900) at ../../kate/view/kateview.cpp:2593
#15 0x01d68238 in KateView::qt_metacall (this=0x8c6b900, _c=QMetaObject::InvokeMetaMethod, _id=69, _a=0xbfba45c8) at ./kateview.moc:373
#16 0x002bb263 in QMetaObject::activate (sender=0x8eafa00, from_signal_index=5, to_signal_index=6, argv=0xbfba45c8) at kernel/qobject.cpp:3113
#17 0x002bb6d8 in QMetaObject::activate (sender=0x8eafa00, m=0x4985e48, from_local_signal_index=1, to_local_signal_index=2, argv=0xbfba45c8) at kernel/qobject.cpp:3207
#18 0x0411d9b1 in QAction::triggered (this=0x8eafa00, _t1=false) at .moc/release-shared/moc_qaction.cpp:236
#19 0x0411ef32 in QAction::activate (this=0x8eafa00, event=QAction::Trigger) at kernel/qaction.cpp:1160
#20 0x04121a18 in QAction::event (this=0x0, e=0x24) at kernel/qaction.cpp:1079
#21 0x0109ceb3 in KAction::event (this=0x8eafa00, event=0xbfba4a18) at ../../kdeui/actions/kaction.cpp:88
#22 0x04123f54 in QApplicationPrivate::notify_helper (this=0x8ac72e8, receiver=0x8eafa00, e=0xbfba4a18) at kernel/qapplication.cpp:4056
#23 0x0412b67c in QApplication::notify (this=0xbfba696c, receiver=0x8eafa00, e=0xbfba4a18) at kernel/qapplication.cpp:3603
#24 0x01183bfa in KApplication::notify (this=0xbfba696c, receiver=0x8eafa00, event=0xbfba4a18) at ../../kdeui/kernel/kapplication.cpp:302
#25 0x002a56cb in QCoreApplication::notifyInternal (this=0xbfba696c, receiver=0x8eafa00, event=0xbfba4a18) at kernel/qcoreapplication.cpp:610
#26 0x0415cdfd in QCoreApplication::sendEvent (this=0x8ac7388, e=0xbfba4dc4) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:213
#27 QShortcutMap::dispatchEvent (this=0x8ac7388, e=0xbfba4dc4) at kernel/qshortcutmap.cpp:884
#28 0x0415ec7e in QShortcutMap::tryShortcutEvent (this=0x8ac7388, o=0x8ed8fa0, e=0xbfba4dc4) at kernel/qshortcutmap.cpp:369
#29 0x0412ca0d in QApplication::notify (this=0xbfba696c, receiver=0x8ed8fa0, e=0xbfba4dc4) at kernel/qapplication.cpp:3645
#30 0x01183bfa in KApplication::notify (this=0xbfba696c, receiver=0x8ed8fa0, event=0xbfba4dc4) at ../../kdeui/kernel/kapplication.cpp:302
#31 0x002a56cb in QCoreApplication::notifyInternal (this=0xbfba696c, receiver=0x8ed8fa0, event=0xbfba4dc4) at kernel/qcoreapplication.cpp:610
#32 0x04124e2e in QCoreApplication::sendSpontaneousEvent (receiver=0x8ed8fa0, event=0x0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:216
#33 qt_sendSpontaneousEvent (receiver=0x8ed8fa0, event=0x0) at kernel/qapplication.cpp:4958
#34 0x041c1440 in QKeyMapper::sendKeyEvent (keyWidget=0x8ed8fa0, grab=false, type=QEvent::KeyPress, code=16777237, modifiers=..., text=..., autorepeat=<value optimized out>, 
    count=<value optimized out>, nativeScanCode=116, nativeVirtualKey=65364, nativeModifiers=0) at kernel/qkeymapper_x11.cpp:1861
#35 0x041c3989 in QKeyMapperPrivate::translateKeyEvent (this=0x8aeefa8, keyWidget=0x8ed8fa0, event=0xbfba65ac, grab=36) at kernel/qkeymapper_x11.cpp:1831
#36 0x04197ed7 in QApplication::x11ProcessEvent (this=0xbfba696c, event=0xbfba65ac) at kernel/qapplication_x11.cpp:3443
#37 0x041c5502 in x11EventSourceDispatch (s=0x8ac9df8, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#38 0x00afae78 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#39 0x00afe720 in ?? () from /lib/libglib-2.0.so.0
#40 0x00afe853 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#41 0x002d002c in QEventDispatcherGlib::processEvents (this=0x8a46a58, flags=...) at kernel/qeventdispatcher_glib.cpp:327
#42 0x041c4be5 in QGuiEventDispatcherGlib::processEvents (this=0x8a46a58, flags=...) at kernel/qguieventdispatcher_glib.cpp:202
#43 0x002a3c79 in QEventLoop::processEvents (this=0xbfba68a4, flags=) at kernel/qeventloop.cpp:149
#44 0x002a40ca in QEventLoop::exec (this=0xbfba68a4, flags=...) at kernel/qeventloop.cpp:201
#45 0x002a653f in QCoreApplication::exec () at kernel/qcoreapplication.cpp:888
#46 0x04123dd7 in QApplication::exec () at kernel/qapplication.cpp:3525
#47 0x01c43b0d in kdemain () from /usr/lib/libkdeinit4_kate.so
#48 0x0804dde1 in launch (argc=<value optimized out>, _name=<value optimized out>, args=<value optimized out>, cwd=0x0, envc=1, envs=0x8a7452e "DISPLAY=:0.0", reset_env=false, tty=0x0, 
    avoid_loops=false, startup_id_str=0x8a7453f "Mary-Jo;1259779776;141524;2572_TIME8731308") at ../../kinit/kinit.cpp:677
#49 0x0804ea35 in handle_launcher_request (sock=<value optimized out>, who=<value optimized out>) at ../../kinit/kinit.cpp:1169
#50 0x0804eeac in handle_requests (waitForPid=<value optimized out>) at ../../kinit/kinit.cpp:1362
#51 0x0804fbaf in main (argc=2, argv=0xbfba7584, envp=0xbfba7590) at ../../kinit/kinit.cpp:1793

Reported using DrKonqi
Comment 1 Milian Wolff 2009-12-03 03:11:48 UTC
related to 200450?
Comment 2 Michel Ludwig 2009-12-15 10:48:00 UTC
*** Bug 218742 has been marked as a duplicate of this bug. ***
Comment 3 Michel Ludwig 2009-12-16 12:07:37 UTC
*** Bug 218901 has been marked as a duplicate of this bug. ***
Comment 4 Milian Wolff 2010-01-09 19:11:22 UTC
*** Bug 209855 has been marked as a duplicate of this bug. ***
Comment 5 Milian Wolff 2010-01-09 19:16:00 UTC
This might have been fixed now with the fix for https://bugs.kde.org/show_bug.cgi?id=200450 , as it might have reduced the size of a group and hence lead to cases where we have lines at the end of a document without a related SmartGroup. I'm tempted to close this as fixed as well until someone can reproduce it again. What would you guys say?
Comment 6 Michel Ludwig 2010-01-19 21:57:23 UTC
*** Bug 223479 has been marked as a duplicate of this bug. ***
Comment 7 François Bianco 2010-01-20 11:07:38 UTC
*** Bug 223545 has been marked as a duplicate of this bug. ***
Comment 8 François Bianco 2010-01-20 11:10:17 UTC
Still got the same bug while using Kile (cf. duplicated bug above). My Kate version
is 3.3.4.
Comment 9 Christoph Cullmann 2010-02-16 14:43:45 UTC
I fixed something yesterday, without more info, this is closed for me. We need a testcase to fix this.
Comment 10 François Bianco 2010-02-24 14:48:33 UTC
Can somebody with the latest version test the following procedure :

0. Change Kate setting to use no dynamical line return (Retour à la ligne dynamique), and activate Statical line return (Retour à la ligne satique) in Edition settings
1. open test.txt (in attachement below)
2. clic to set cursor just before last "test" on first line, type "add" => get expected behavior
3. use ctrl+z to revert changes works
4. go to fourth line, copy past the whole line (cursor at the end of the line, maj+home, ctrl+c, ctrl+v, ctrl+v)
5. set cursor just before last "test" on fourth line, type "add" => behavior different from 1st line (you get on the next line "adtestd" instead of "addtest")
6. use ctrl+z to revert changes => crash

This procedure is 100% reproducible with Kate 3.3.4 and affects all text editor in KDE.
Comment 11 François Bianco 2010-02-24 14:48:37 UTC
Can somebody with the latest version test the following procedure :

0. Change Kate setting to use no dynamical line return (Retour à la ligne dynamique), and activate Statical line return (Retour à la ligne satique) in Edition settings
1. open test.txt (in attachement below)
2. clic to set cursor just before last "test" on first line, type "add" => get expected behavior
3. use ctrl+z to revert changes works
4. go to fourth line, copy past the whole line (cursor at the end of the line, maj+home, ctrl+c, ctrl+v, ctrl+v)
5. set cursor just before last "test" on fourth line, type "add" => behavior different from 1st line (you get on the next line "adtestd" instead of "addtest")
6. use ctrl+z to revert changes => crash

This procedure is 100% reproducible with Kate 3.3.4 and affects all text editor in KDE.
Comment 12 François Bianco 2010-02-24 14:50:58 UTC
Created attachment 41059 [details]
Test file for procedure described below

0. Change Kate setting to use no dynamical line return (Retour à la ligne
dynamique), and activate Statical line return (Retour à la ligne satique) in
Edition settings
1. open test.txt (in attachement below)
2. clic to set cursor just before last "test" on first line, type "add" => get
expected behavior
3. use ctrl+z to revert changes works
4. go to fourth line, copy past the whole line (cursor at the end of the line,
maj+home, ctrl+c, ctrl+v, ctrl+v)
5. set cursor just before last "test" on fourth line, type "add" => behavior
different from 1st line (you get on the next line "adtestd" instead of
"addtest")
6. use ctrl+z to revert changes => crash
Comment 13 François Bianco 2010-02-24 15:03:17 UTC
Below are the correct settings name in English and path to find them :

Settings menu → Configure Kate/Kwrite/Kile … → 
- Editor → Appearance → Dynamic word wrap (checked or uncheked)
- Editor → Editing → Enable static word wrap (checked)

Dynamic word wrap play actually no role in this bug, it can be checked or not.

PS : sorry for the three splitted messages.
Comment 14 Milian Wolff 2010-02-24 15:08:56 UTC
Works with current trunk, should also work with kde 4.4.1 once it's released (many more fixes got into this version).
Comment 15 Michel Ludwig 2010-04-04 19:46:06 UTC
*** Bug 232508 has been marked as a duplicate of this bug. ***
Comment 16 jogarlo18 2010-04-10 04:02:36 UTC
Created attachment 42638 [details]
New crash information added by DrKonqi

Estaba programando un script cuando kate se cerró. Tenía activada la vista de remarcado de bash.
Comment 17 Dominik Haumann 2010-06-03 12:22:13 UTC

*** This bug has been marked as a duplicate of bug 239046 ***
Comment 18 Dominik Haumann 2010-06-03 12:22:41 UTC
*** Bug 231263 has been marked as a duplicate of this bug. ***
Comment 19 Michel Ludwig 2010-07-31 12:57:25 UTC
*** Bug 245908 has been marked as a duplicate of this bug. ***
Comment 20 Michel Ludwig 2010-07-31 12:58:54 UTC
*** Bug 245084 has been marked as a duplicate of this bug. ***