Bug 175883 - [steps] Kate crashes when deleting a selection after folding [assert, KateViewInternal::endPos, KateViewInternal::endLine, KateViewInternal::scrollPos]
Summary: [steps] Kate crashes when deleting a selection after folding [assert, KateVie...
Status: RESOLVED WORKSFORME
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: VHI crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords: reproducible, testcase
: 180977 220592 227199 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-11-23 13:41 UTC by Daniel Franke
Modified: 2010-02-16 17:58 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
File where the problem happens (7.18 KB, text/x-c++src)
2009-02-01 21:35 UTC, Thomas McGuire
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Franke 2008-11-23 13:41:04 UTC
Version:           3.1.3 (using 4.1.3 (KDE 4.1.3), Gentoo)
Compiler:          i686-pc-linux-gnu-gcc
OS:                Linux (i686) release 2.6.25-gentoo-r8

Marked a large portion of highlighted text from somewhere in the middle to the very end, pressed enter and got a semi-useful backtrace ...

Application: Kate (kate), signal SIGABRT
Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 0xb5d736d0 (LWP 4724)]
[KCrash handler]
#6  0xb7f7d424 in __kernel_vsyscall ()
#7  0xb6060c20 in raise () from /lib/libc.so.6
#8  0xb6062478 in abort () from /lib/libc.so.6
#9  0xb63b1fbd in qt_message_output (msgType=QtFatalMsg, 
    buf=0xbfb94410 "ASSERT: \"false\" in file /var/tmp/portage/kde-base/kdelibs-4.1.3-r1/work/kdelibs-4.1.3/kate/view/kateviewinternal.cpp, line 324")
    at global/qglobal.cpp:2108
#10 0xb63b2086 in qFatal (msg=0xb650ef9c "ASSERT: \"%s\" in file %s, line %d")
    at global/qglobal.cpp:2309
#11 0xb63b2405 in qt_assert (assertion=0xb486e069 "false", 
    file=0xb487ecac "/var/tmp/portage/kde-base/kdelibs-4.1.3-r1/work/kdelibs-4.1.3/kate/view/kateviewinternal.cpp", line=324) at global/qglobal.cpp:1878
#12 0xb480e164 in KateViewInternal::endPos (this=0x9e66c88)
    at /var/tmp/portage/kde-base/kdelibs-4.1.3-r1/work/kdelibs-4.1.3/kate/view/kateviewinternal.cpp:324
#13 0xb4812bd9 in KateViewInternal::makeVisible (this=0x9e66c88, 
    c=@0x9e66d2c, endCol=0, force=false, center=false, calledExternally=false)
    at /var/tmp/portage/kde-base/kdelibs-4.1.3-r1/work/kdelibs-4.1.3/kate/view/kateviewinternal.cpp:632
#14 0xb4812fa7 in KateViewInternal::updateCursor (this=0x9e66c88, 
    newCursor=@0x9e66cdc, force=true, center=<value optimized out>, 
    calledExternally=<value optimized out>)
    at /var/tmp/portage/kde-base/kdelibs-4.1.3-r1/work/kdelibs-4.1.3/kate/view/kateviewinternal.cpp:1810
#15 0xb4816d7d in KateViewInternal::editEnd (this=0x9e66c88, 
    editTagLineStart=419, editTagLineEnd=419, tagFrom=true)
    at /var/tmp/portage/kde-base/kdelibs-4.1.3-r1/work/kdelibs-4.1.3/kate/view/kateviewinternal.cpp:3190
#16 0xb48003d9 in KateView::editEnd (this=0x9defa20, editTagLineStart=419, 
    editTagLineEnd=419, tagFrom=<value optimized out>)
    at /var/tmp/portage/kde-base/kdelibs-4.1.3-r1/work/kdelibs-4.1.3/kate/view/kateview.cpp:1333
#17 0xb4794f31 in KateDocument::editEnd (this=0x9dc28a0)
    at /var/tmp/portage/kde-base/kdelibs-4.1.3-r1/work/kdelibs-4.1.3/kate/document/katedocument.cpp:1102
#18 0xb479a016 in KateDocument::newLine (this=0x9dc28a0, v=0x9defa20)
    at /var/tmp/portage/kde-base/kdelibs-4.1.3-r1/work/kdelibs-4.1.3/kate/document/katedocument.cpp:4103
#19 0xb4811e61 in KateViewInternal::doReturn (this=0x9e66c88)
    at /var/tmp/portage/kde-base/kdelibs-4.1.3-r1/work/kdelibs-4.1.3/kate/view/kateviewinternal.cpp:742
#20 0xb4813ca6 in KateViewInternal::keyPressEvent (this=0x9e66c88, 
    e=0xbfb96bcc)
    at /var/tmp/portage/kde-base/kdelibs-4.1.3-r1/work/kdelibs-4.1.3/kate/view/kateviewinternal.cpp:2202
#21 0xb4811ba1 in KateViewInternal::eventFilter (this=0x9e66c88, 
    obj=0x9e66c88, e=0xbfb96bcc)
    at /var/tmp/portage/kde-base/kdelibs-4.1.3-r1/work/kdelibs-4.1.3/kate/view/kateviewinternal.cpp:2133
#22 0xb64b989a in QCoreApplicationPrivate::sendThroughObjectEventFilters (
    this=0x9c23338, receiver=0x9e66c88, event=0xbfb96bcc)
    at kernel/qcoreapplication.cpp:700
#23 0xb66c292a in QApplicationPrivate::notify_helper (this=0x9c23338, 
    receiver=0x9e66c88, e=0xbfb96bcc) at kernel/qapplication.cpp:3805
#24 0xb66caae0 in QApplication::notify (this=0xbfb9759c, receiver=0x9e66c88, 
    e=0xbfb96bcc) at kernel/qapplication.cpp:3453
#25 0xb74916b1 in KApplication::notify (this=0xbfb9759c, receiver=0x9e66c88, 
    event=0xbfb96bcc)
    at /var/tmp/portage/kde-base/kdelibs-4.1.3-r1/work/kdelibs-4.1.3/kdeui/kernel/kapplication.cpp:311
#26 0xb64b9ebf in QCoreApplication::notifyInternal (this=0xbfb9759c, 
    receiver=0x9e66c88, event=0xbfb96bcc) at kernel/qcoreapplication.cpp:593
#27 0xb6729f4e in qt_sendSpontaneousEvent (receiver=0x9e66c88, event=0x6)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#28 0xb675d973 in QKeyMapper::sendKeyEvent (keyWidget=0x9e66c88, grab=false, 
    type=QEvent::KeyPress, code=16777220, modifiers={i = -1078366580}, 
    text=@0xbfb96eb8, autorepeat=<value optimized out>, count=1, 
    nativeScanCode=36, nativeVirtualKey=65293, nativeModifiers=0)
    at kernel/qkeymapper_x11.cpp:1658
#29 0xb675fa83 in QKeyMapperPrivate::translateKeyEvent (this=0x9c3de78, 
    keyWidget=0x9e66c88, event=0xbfb97308, grab=false)
    at kernel/qkeymapper_x11.cpp:1629
#30 0xb6738a5b in QApplication::x11ProcessEvent (this=0xbfb9759c, 
    event=0xbfb97308) at kernel/qapplication_x11.cpp:3059
#31 0xb67612f8 in QEventDispatcherX11::processEvents (this=0x9c236a8, flags=
      {i = -1078365272}) at kernel/qeventdispatcher_x11.cpp:134
#32 0xb64b882a in QEventLoop::processEvents (this=0xbfb97420, flags=
      {i = -1078365208}) at kernel/qeventloop.cpp:149
#33 0xb64b89ea in QEventLoop::exec (this=0xbfb97420, flags={i = -1078365144})
    at kernel/qeventloop.cpp:200
#34 0xb64bb155 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:851
#35 0xb66c2677 in QApplication::exec () at kernel/qapplication.cpp:3337
#36 0xb7f77b5d in kdemain () from /usr/lib/libkdeinit4_kate.so
#37 0x080488f2 in main ()
#0  0xb7f7d424 in __kernel_vsyscall ()
Comment 1 Dario Andres 2008-11-23 15:04:57 UTC
This bug seems to be related to bug 161113. Same description , different ASSERT (but this assert is described also in the same bug (bug 161113 comment 4))
Comment 2 Dario Andres 2009-01-16 15:55:54 UTC
*** Bug 180977 has been marked as a duplicate of this bug. ***
Comment 3 Thomas McGuire 2009-02-01 21:21:58 UTC
I just had the same crash (in KDevelop) with r918271 of kdelibs trunk.
Comment 4 Thomas McGuire 2009-02-01 21:35:05 UTC
Created attachment 30837 [details]
File where the problem happens

With the attached file, do the following to reproduce (I tried in KWrite):
1. Fold in line 16 (class Vector3)
2. Select lines 202 to 252 (including both)
3. Press the delete key
4. CRASH
Comment 5 Dario Andres 2009-12-30 17:47:25 UTC
Here using:

Qt: 4.6.0 (kde-qt master commit 747ff8e6ef6f5a1163dfa75bc9ac4755ce7083d1
        Date:   Tue Dec 15 11:58:13 2009 +0100)
KDE Development Platform: 4.3.85 (KDE 4.3.85 (KDE 4.4 Beta2))
kdelibs svn rev. 1067378 / kdebase svn rev. 1067378
on ArchLinux i686 - Kernel 2.6.31.6

I can reproduce the crash using the steps mentioned on comment 4.

Updated backtrace:
---

Application: KWrite (kwrite), signal: Aborted
[Current thread is 1 (Thread 0xb52f4920 (LWP 14518))]

Thread 2 (Thread 0xb33fdb70 (LWP 14519)):
#0  0xb78cf424 in __kernel_vsyscall ()
#1  0xb5d7ae55 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb359b6cb in WTF::TCMalloc_PageHeap::scavengerThread (this=0xb36daac0) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2304
#3  0xb359ae1d in WTF::TCMalloc_PageHeap::runScavengerThread (context=0xb36daac0) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1438
#4  0xb5d768ac in start_thread () from /lib/libpthread.so.0
#5  0xb5bc001e in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb52f4920 (LWP 14518)):
[KCrash Handler]
#6  0xb78cf424 in __kernel_vsyscall ()
#7  0xb5b1c571 in raise () from /lib/libc.so.6
#8  0xb5b1dd72 in abort () from /lib/libc.so.6
#9  0xb5e1b953 in qt_message_output (msgType=QtFatalMsg, buf=0x8480e00 "ASSERT: \"false\" in file /home/kde-devel/kde/src/KDE/kdelibs/kate/view/kateviewinternal.cpp, line 335")
    at global/qglobal.cpp:2226
#10 0xb5e1bb15 in qt_message (msgType=QtFatalMsg, msg=0xb5fba4c4 "ASSERT: \"%s\" in file %s, line %d", ap=0xbfc84034 "L\305\223\263\020\304\223\263O\001") at global/qglobal.cpp:2272
#11 0xb5e1bf33 in qFatal (msg=0xb5fba4c4 "ASSERT: \"%s\" in file %s, line %d") at global/qglobal.cpp:2455
#12 0xb5e1b4ec in qt_assert (assertion=0xb393c54c "false", file=0xb393c410 "/home/kde-devel/kde/src/KDE/kdelibs/kate/view/kateviewinternal.cpp", line=335) at global/qglobal.cpp:1989
#13 0xb387a73a in KateViewInternal::endPos (this=0x834ee28) at /home/kde-devel/kde/src/KDE/kdelibs/kate/view/kateviewinternal.cpp:335
#14 0xb387a829 in KateViewInternal::endLine (this=0x834ee28) at /home/kde-devel/kde/src/KDE/kdelibs/kate/view/kateviewinternal.cpp:342
#15 0xb387b0e5 in KateViewInternal::scrollPos (this=0x834ee28, c=..., force=false, calledExternally=false) at /home/kde-devel/kde/src/KDE/kdelibs/kate/view/kateviewinternal.cpp:493
#16 0xb387bd72 in KateViewInternal::makeVisible (this=0x834ee28, c=..., endCol=0, force=false, center=false, calledExternally=false)
    at /home/kde-devel/kde/src/KDE/kdelibs/kate/view/kateviewinternal.cpp:674
#17 0xb388142f in KateViewInternal::updateCursor (this=0x834ee28, newCursor=..., force=true, center=false, calledExternally=false)
    at /home/kde-devel/kde/src/KDE/kdelibs/kate/view/kateviewinternal.cpp:1912
#18 0xb3887607 in KateViewInternal::editEnd (this=0x834ee28, editTagLineStart=202, editTagLineEnd=202, tagFrom=true) at /home/kde-devel/kde/src/KDE/kdelibs/kate/view/kateviewinternal.cpp:3397
#19 0xb3871fa5 in KateView::editEnd (this=0x8346a00, editTagLineStart=202, editTagLineEnd=202, tagFrom=true) at /home/kde-devel/kde/src/KDE/kdelibs/kate/view/kateview.cpp:1603
#20 0xb37c7f71 in KateDocument::editEnd (this=0x820b908) at /home/kde-devel/kde/src/KDE/kdelibs/kate/document/katedocument.cpp:967
#21 0xb3872c17 in KateView::removeSelectedText (this=0x8346a00) at /home/kde-devel/kde/src/KDE/kdelibs/kate/view/kateview.cpp:1781
#22 0xb37d15ef in KateDocument::del (this=0x820b908, view=0x8346a00, c=...) at /home/kde-devel/kde/src/KDE/kdelibs/kate/document/katedocument.cpp:2868
#23 0xb387cbdb in KateViewInternal::doDelete (this=0x834ee28) at /home/kde-devel/kde/src/KDE/kdelibs/kate/view/kateviewinternal.cpp:849
#24 0xb38751ec in KateView::keyDelete (this=0x8346a00) at /home/kde-devel/kde/src/KDE/kdelibs/kate/view/kateview.cpp:2314
#25 0xb38639ea in KateView::qt_metacall (this=0x8346a00, _c=QMetaObject::InvokeMetaMethod, _id=53, _a=0xbfc84618) at /home/kde-devel/kde/build/KDE/kdelibs/kate/kateview.moc:375
#26 0xb5f439c4 in QMetaObject::metacall (object=0x8346a00, cl=QMetaObject::InvokeMetaMethod, idx=92, argv=0xbfc84618) at kernel/qmetaobject.cpp:237
#27 0xb5f57a85 in QMetaObject::activate (sender=0x83a5530, m=0xb6cef458, local_signal_index=1, argv=0xbfc84618) at kernel/qobject.cpp:3294
#28 0xb6218a54 in QAction::triggered (this=0x83a5530, _t1=false) at .moc/debug-shared/moc_qaction.cpp:263
#29 0xb6217f2b in QAction::activate (this=0x83a5530, event=QAction::Trigger) at kernel/qaction.cpp:1245
#30 0xb6217c71 in QAction::event (this=0x83a5530, e=0xbfc84b20) at kernel/qaction.cpp:1162
#31 0xb7157435 in KAction::event (this=0x83a5530, event=0xbfc84b20) at /home/kde-devel/kde/src/KDE/kdelibs/kdeui/actions/kaction.cpp:129
#32 0xb6228834 in QApplicationPrivate::notify_helper (this=0x8145cf8, receiver=0x83a5530, e=0xbfc84b20) at kernel/qapplication.cpp:4242
#33 0xb6226231 in QApplication::notify (this=0xbfc85abc, receiver=0x83a5530, e=0xbfc84b20) at kernel/qapplication.cpp:3661
#34 0xb7239528 in KApplication::notify (this=0xbfc85abc, receiver=0x83a5530, event=0xbfc84b20) at /home/kde-devel/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:302
#35 0xb5f3c411 in QCoreApplication::notifyInternal (this=0xbfc85abc, receiver=0x83a5530, event=0xbfc84b20) at kernel/qcoreapplication.cpp:704
#36 0xb6218f8f in QCoreApplication::sendEvent (receiver=0x83a5530, event=0xbfc84b20) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#37 0xb626c617 in QShortcutMap::dispatchEvent (this=0x8145da4, e=0xbfc8500c) at kernel/qshortcutmap.cpp:879
#38 0xb626ae8d in QShortcutMap::tryShortcutEvent (this=0x8145da4, o=0x834ee28, e=0xbfc8500c) at kernel/qshortcutmap.cpp:364
#39 0xb6226493 in QApplication::notify (this=0xbfc85abc, receiver=0x834ee28, e=0xbfc8500c) at kernel/qapplication.cpp:3703
#40 0xb7239528 in KApplication::notify (this=0xbfc85abc, receiver=0x834ee28, event=0xbfc8500c) at /home/kde-devel/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:302
#41 0xb5f3c411 in QCoreApplication::notifyInternal (this=0xbfc85abc, receiver=0x834ee28, event=0xbfc8500c) at kernel/qcoreapplication.cpp:704
#42 0xb622a9d9 in QCoreApplication::sendSpontaneousEvent (receiver=0x834ee28, event=0xbfc8500c) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#43 0xb6228b73 in qt_sendSpontaneousEvent (receiver=0x834ee28, event=0xbfc8500c) at kernel/qapplication.cpp:5219
#44 0xb62fa796 in QKeyMapper::sendKeyEvent (keyWidget=0x834ee28, grab=false, type=QEvent::KeyPress, code=16777223, modifiers=..., text=..., autorepeat=false, count=1, nativeScanCode=107, 
    nativeVirtualKey=65535, nativeModifiers=0) at kernel/qkeymapper_x11.cpp:1861
#45 0xb62fa4a8 in QKeyMapperPrivate::translateKeyEvent (this=0x8178870, keyWidget=0x834ee28, event=0xbfc85730, grab=false) at kernel/qkeymapper_x11.cpp:1831
#46 0xb62c621d in QApplication::x11ProcessEvent (this=0xbfc85abc, event=0xbfc85730) at kernel/qapplication_x11.cpp:3394
#47 0xb62fc729 in x11EventSourceDispatch (s=0x8148f70, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#48 0xb5651378 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#49 0xb5654bf0 in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#50 0xb5654d23 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#51 0xb5f73e48 in QEventDispatcherGlib::processEvents (this=0x8116440, flags=...) at kernel/qeventdispatcher_glib.cpp:407
#52 0xb62fcd50 in QGuiEventDispatcherGlib::processEvents (this=0x8116440, flags=...) at kernel/qguieventdispatcher_glib.cpp:202
#53 0xb5f3981b in QEventLoop::processEvents (this=0xbfc85a0c, flags=...) at kernel/qeventloop.cpp:149
#54 0xb5f39960 in QEventLoop::exec (this=0xbfc85a0c, flags=...) at kernel/qeventloop.cpp:201
#55 0xb5f3caed in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#56 0xb6225e54 in QApplication::exec () at kernel/qapplication.cpp:3570
#57 0xb78c77f9 in kdemain (argc=2, argv=0xbfc85ed4) at /home/kde-devel/kde/src/KDE/kdebase/apps/kwrite/kwritemain.cpp:782
#58 0x080486d9 in main (argc=2, argv=0xbfc85ed4) at /home/kde-devel/kde/build/KDE/kdebase/apps/kwrite/kwrite_dummy.cpp:3
Comment 6 Dario Andres 2009-12-30 17:47:50 UTC
*** Bug 220592 has been marked as a duplicate of this bug. ***
Comment 7 Christoph Cullmann 2010-02-16 14:50:47 UTC
Can not reproduce that with KDE 4.4 and /trunk, guess fixed in the mean time.
Comment 8 Christoph Cullmann 2010-02-16 17:58:01 UTC
*** Bug 227199 has been marked as a duplicate of this bug. ***