Bug 171027 - split view crashes on new files
Summary: split view crashes on new files
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: VHI crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 173307 173396 175210 176478 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-09-14 11:36 UTC by Sven-Erik Petermann
Modified: 2008-12-15 12:34 UTC (History)
6 users (show)

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


Attachments
split view debug information per crash (7.31 KB, application/octet-stream)
2008-11-12 06:40 UTC, Jim Haslip
Details
Fix Path (980 bytes, patch)
2008-12-13 20:38 UTC, Fabio
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sven-Erik Petermann 2008-09-14 11:36:07 UTC
Version:           3.1.0 (using KDE 4.1.0)
OS:                Linux
Installed from:    Fedora RPMs

Always reproducible:
1. Open Kate
2. Press Ctrl+N (create new file)
3. Press Ctrl+Shift+L (split view vertically)
4. Type some characters
5. Press Enter
6. Instant Crash (TM)
Comment 1 Oliver Putz 2008-09-14 14:43:46 UTC
Confirming on KDE-4.1.1 with the following backtrace:

Application: Kate (kate), signal SIGSEGV
[Thread debugging using libthread_db enabled]
[New Thread 0xb5e04700 (LWP 12703)]
[KCrash handler]
#6  0xb6dad2d7 in QTextLine::cursorToX (this=0xbf9332e0, 
    cursorPos=0xbf9332b4, edge=QTextLine::Leading)
    at text/qtextlayout.cpp:2063
#7  0xb466215b in QTextLine::cursorToX (this=0xbf9332e0, cursorPos=0, 
    edge=QTextLine::Leading) at /usr/include/qt4/QtGui/qtextlayout.h:216
#8  0xb46a6f5d in KateViewInternal::cursorToCoordinate (this=0x8564e68, 
    cursor=@0xbf93335c, realCursor=true, includeBorder=false)
    at /var/tmp/portage/kde-base/kdelibs-4.1.1/work/kdelibs-4.1.1/kate/view/kateviewinternal.cpp:729
#9  0xb46a7068 in KateViewInternal::inputMethodQuery (this=0x8564e68, 
    query=Qt::ImMicroFocus)
    at /var/tmp/portage/kde-base/kdelibs-4.1.1/work/kdelibs-4.1.1/kate/view/kateviewinternal.cpp:3501
#10 0xb71160c0 in QXIMInputContext::update (this=0x81e77f0)
    at inputmethod/qximinputcontext_x11.cpp:747
#11 0xb6bed0e4 in QWidget::updateMicroFocus (this=0x84a12f8)
    at kernel/qwidget.cpp:9519
#12 0xb46a92cd in KateViewInternal::updateCursor (this=0x84a12f8, 
    newCursor=@0x84a134c, force=true, center=false, calledExternally=false)
    at /var/tmp/portage/kde-base/kdelibs-4.1.1/work/kdelibs-4.1.1/kate/view/kateviewinternal.cpp:1818
#13 0xb46acdd6 in KateViewInternal::editEnd (this=0x84a12f8, 
    editTagLineStart=0, editTagLineEnd=1, tagFrom=true)
    at /var/tmp/portage/kde-base/kdelibs-4.1.1/work/kdelibs-4.1.1/kate/view/kateviewinternal.cpp:3190
#14 0xb469739d in KateView::editEnd (this=0x84a0a48, editTagLineStart=0, 
    editTagLineEnd=1, tagFrom=<value optimized out>)
    at /var/tmp/portage/kde-base/kdelibs-4.1.1/work/kdelibs-4.1.1/kate/view/kateview.cpp:1333
#15 0xb46346a4 in KateDocument::editEnd (this=0x84a4ca8)
    at /var/tmp/portage/kde-base/kdelibs-4.1.1/work/kdelibs-4.1.1/kate/document/katedocument.cpp:1102
#16 0xb46395f1 in KateDocument::newLine (this=0x84a4ca8, v=0x8564640)
    at /var/tmp/portage/kde-base/kdelibs-4.1.1/work/kdelibs-4.1.1/kate/document/katedocument.cpp:4103
#17 0xb46a8255 in KateViewInternal::doReturn (this=0x8564e68)
    at /var/tmp/portage/kde-base/kdelibs-4.1.1/work/kdelibs-4.1.1/kate/view/kateviewinternal.cpp:742
#18 0xb46a9f53 in KateViewInternal::keyPressEvent (this=0x8564e68, 
    e=0xbf933afc)
    at /var/tmp/portage/kde-base/kdelibs-4.1.1/work/kdelibs-4.1.1/kate/view/kateviewinternal.cpp:2202
#19 0xb46a7fda in KateViewInternal::eventFilter (this=0x8564e68, 
    obj=0x8564e68, e=0xbf933afc)
    at /var/tmp/portage/kde-base/kdelibs-4.1.1/work/kdelibs-4.1.1/kate/view/kateviewinternal.cpp:2133
#20 0xb67e11f1 in QCoreApplicationPrivate::sendThroughObjectEventFilters (
    this=0x8057bb8, receiver=0x8564e68, event=0xbf933afc)
    at kernel/qcoreapplication.cpp:698
#21 0xb6b9fefe in QApplicationPrivate::notify_helper (this=0x8057bb8, 
    receiver=0x8564e68, e=0xbf933afc) at kernel/qapplication.cpp:3796
#22 0xb6ba7a2b in QApplication::notify (this=0xbf9345e4, receiver=0x8564e68, 
    e=0xbf933afc) at kernel/qapplication.cpp:3446
#23 0xb7667ce9 in KApplication::notify (this=0xbf9345e4, receiver=0x8564e68, 
    event=0xbf933afc)
    at /var/tmp/portage/kde-base/kdelibs-4.1.1/work/kdelibs-4.1.1/kdeui/kernel/kapplication.cpp:311
#24 0xb67e1771 in QCoreApplication::notifyInternal (this=0xbf9345e4, 
    receiver=0x8564e68, event=0xbf933afc) at kernel/qcoreapplication.cpp:591
#25 0xb6c0071c in qt_sendSpontaneousEvent (receiver=0x8564e68, 
    event=0xbf9332dc)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#26 0xb6c31c8b in QKeyMapper::sendKeyEvent (keyWidget=0x8564e68, grab=false, 
    type=QEvent::KeyPress, code=16777220, modifiers={i = -1080869444}, 
    text=@0xbf933de8, autorepeat=<value optimized out>, count=1, 
    nativeScanCode=36, nativeVirtualKey=65293, nativeModifiers=16)
    at kernel/qkeymapper_x11.cpp:1658
#27 0xb6c33bb2 in QKeyMapperPrivate::translateKeyEvent (this=0x8072df0, 
    keyWidget=0x8564e68, event=0xbf934258, grab=224)
    at kernel/qkeymapper_x11.cpp:1629
#28 0xb6c0ed62 in QApplication::x11ProcessEvent (this=0xbf9345e4, 
    event=0xbf934258) at kernel/qapplication_x11.cpp:3059
#29 0xb6c3535d in QEventDispatcherX11::processEvents (this=0x8057c70, flags=
      {i = -1080868104}) at kernel/qeventdispatcher_x11.cpp:134
#30 0xb67e0300 in QEventLoop::processEvents (this=0xbf934370, flags=
      {i = -1080868040}) at kernel/qeventloop.cpp:149
#31 0xb67e04a2 in QEventLoop::exec (this=0xbf934370, flags={i = -1080867976})
    at kernel/qeventloop.cpp:200
#32 0xb67e28bf in QCoreApplication::exec () at kernel/qcoreapplication.cpp:849
#33 0xb6b9fcb3 in QApplication::exec () at kernel/qapplication.cpp:3330
#34 0xb7f161d2 in kdemain (argc=1, argv=0xbf934b64)
    at /var/tmp/portage/kde-base/kate-4.1.1/work/kate-4.1.1/kate/app/katemain.cpp:252
#35 0x08048902 in main (argc=-1221264120, argv=0x8358080)
    at /var/tmp/portage/kde-base/kate-4.1.1/work/kate_build/kate/app/kate_dummy.cpp:3
#0  0xffffe424 in __kernel_vsyscall ()
Comment 2 Michael Leupold 2008-09-22 16:16:50 UTC
I can reproduce this as well using the Debian 4.1.1 packages. Same backtrace. I can reproduce 100%. 4. can be replaced by "paste something" (even multiline) too.
Comment 3 Jan K 2008-11-11 14:27:07 UTC
Still not fixed in version 3.1.3 (4.1.3 official gentoo ebuild)
For me it's enough to:
1. Open Kate
2. Split view vertically OR HORIZONTALLY
3. Press Enter
And kate crashes.

It crases only on the last line.
You can edit 3rd line in a file with 6 lines, as well as add a line in the middle.

It doesn't matter if the second view has same or different file.

The view in which you press enter must be opened on a new, unsaved file.

It DOES matter which view you are currently in (one crashes, the other - doesn't)
Comment 4 Dominik Haumann 2008-11-11 14:32:28 UTC
Still in trunk, current backtrace is:

Application: Kate (kate), signal SIGSEGV
[Current thread is 0 (LWP 13013)]

Thread 2 (Thread 0xb4157b90 (LWP 13023)):
#0  0xb7f77410 in __kernel_vsyscall ()
#1  0xb6a6e881 in select () from /lib/tls/i686/cmov/libc.so.6
#2  0xb6d87147 in QProcessManager::run (this=0x805fef8) at /home/dh/kde/trunk/qt-copy/src/corelib/io/qprocess_unix.cpp:301
#3  0xb6ccd043 in QThreadPrivate::start (arg=0x805fef8) at /home/dh/kde/trunk/qt-copy/src/corelib/thread/qthread_unix.cpp:185
#4  0xb6c534fb in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#5  0xb6a75e5e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread 0xb5ec66c0 (LWP 13013)):
[KCrash Handler]
#6  QTextLine::cursorToX (this=0xbf81799c, cursorPos=0xbf817974, edge=QTextLine::Leading) at /home/dh/kde/trunk/qt-copy/src/gui/text/qtextlayout.cpp:2057
#7  0xb4761f77 in QTextLine::cursorToX (this=0xbf81799c, cursorPos=0, edge=QTextLine::Leading) at /home/dh/kde/run/qt4/include/QtGui/qtextlayout.h:210
#8  0xb47b4ac4 in KateViewInternal::cursorToCoordinate (this=0x9266f98, cursor=@0xbf817a24, realCursor=true, includeBorder=false) at /home/dh/kde/trunk/kdelibs/kate/view/kateviewinternal.cpp:733
#9  0xb47b4bf8 in KateViewInternal::inputMethodQuery (this=0x9266f98, query=Qt::ImMicroFocus) at /home/dh/kde/trunk/kdelibs/kate/view/kateviewinternal.cpp:3639
#10 0xb76be687 in QXIMInputContext::update (this=0x82436f8) at /home/dh/kde/trunk/qt-copy/src/gui/inputmethod/qximinputcontext_x11.cpp:741
#11 0xb7221240 in QWidget::updateMicroFocus (this=0x9140368) at /home/dh/kde/trunk/qt-copy/src/gui/kernel/qwidget.cpp:9682
#12 0xb47b7cda in KateViewInternal::updateCursor (this=0x9140368, newCursor=@0x91403bc, force=true, center=false, calledExternally=false)
    at /home/dh/kde/trunk/kdelibs/kate/view/kateviewinternal.cpp:1902
#13 0xb47b89ef in KateViewInternal::editEnd (this=0x9140368, editTagLineStart=1674, editTagLineEnd=1675, tagFrom=true) at /home/dh/kde/trunk/kdelibs/kate/view/kateviewinternal.cpp:3321
#14 0xb47a18bf in KateView::editEnd (this=0x9144e58, editTagLineStart=1674, editTagLineEnd=1675, tagFrom=true) at /home/dh/kde/trunk/kdelibs/kate/view/kateview.cpp:1507
#15 0xb472b6cc in KateDocument::editEnd (this=0x81ccb38) at /home/dh/kde/trunk/kdelibs/kate/document/katedocument.cpp:1069
#16 0xb4730cfa in KateDocument::newLine (this=0x81ccb38, v=0x9266850) at /home/dh/kde/trunk/kdelibs/kate/document/katedocument.cpp:4083
#17 0xb47b640b in KateViewInternal::doReturn (this=0x9266f98) at /home/dh/kde/trunk/kdelibs/kate/view/kateviewinternal.cpp:769
#18 0xb47b68e4 in KateViewInternal::keyPressEvent (this=0x9266f98, e=0xbf818204) at /home/dh/kde/trunk/kdelibs/kate/view/kateviewinternal.cpp:2326
#19 0xb47b5eff in KateViewInternal::eventFilter (this=0x9266f98, obj=0x9266f98, e=0xbf818204) at /home/dh/kde/trunk/kdelibs/kate/view/kateviewinternal.cpp:2225
#20 0xb6da2ce1 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=0x805c9b8, receiver=0x9266f98, event=0xbf818204)
    at /home/dh/kde/trunk/qt-copy/src/corelib/kernel/qcoreapplication.cpp:694
#21 0xb71dc973 in QApplicationPrivate::notify_helper (this=0x805c9b8, receiver=0x9266f98, e=0xbf818204) at /home/dh/kde/trunk/qt-copy/src/gui/kernel/qapplication.cpp:3799
Comment 5 Jim Haslip 2008-11-12 06:40:08 UTC
Created attachment 28508 [details]
split view debug information per crash
Comment 6 Fabio 2008-12-13 20:38:23 UTC
Created attachment 29304 [details]
Fix Path

This patch fix the bug where the split view crash in kate.
The modified file is kateviewinternal.cpp

Attached to this message the patch to the svn trunk.
Comment 7 Dominik Haumann 2008-12-15 11:47:03 UTC
*** Bug 176478 has been marked as a duplicate of this bug. ***
Comment 8 Dominik Haumann 2008-12-15 11:48:59 UTC
*** Bug 175210 has been marked as a duplicate of this bug. ***
Comment 9 Dominik Haumann 2008-12-15 11:50:17 UTC
*** Bug 173307 has been marked as a duplicate of this bug. ***
Comment 10 Dominik Haumann 2008-12-15 12:18:05 UTC
SVN commit 897109 by dhaumann:

fix crash: invalid layout access.
Thanks to Fábio Rodrigo for the patch!
BUG: 171027


 M  +9 -2      kateviewinternal.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=897109
Comment 11 Dominik Haumann 2008-12-15 12:34:46 UTC
*** Bug 173396 has been marked as a duplicate of this bug. ***