Bug 161113 - [testcase] [backtrace] kate crashes when trying to delete large block of text.
Summary: [testcase] [backtrace] kate crashes when trying to delete large block of text.
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: SVN
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 163942 173152 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-04-21 16:36 UTC by George Goldberg
Modified: 2008-12-14 16:18 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
testcase (23.14 KB, text/html)
2008-04-21 16:40 UTC, George Goldberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description George Goldberg 2008-04-21 16:36:36 UTC
Version:            (using Devel)
Installed from:    Compiled sources
Compiler:          gcc version 4.2.3 (4.2.3-6mnb1) Mandriva Linux 2008.1 x86_64
OS:                Linux

When editing the file I will attach below, I try and delete a large block of text, kate crashes with the following backtrace.

Application: KWrite (kwrite), signal SIGABRT
Using host libthread_db library "/lib64/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 47143422549104 (LWP 5844)]
[KCrash handler]
#5  0x00002ae06d5d0a55 in raise () from /lib64/libc.so.6
#6  0x00002ae06d5d21e0 in abort () from /lib64/libc.so.6
#7  0x00002ae06b346b58 in qt_message_output (msgType=QtFatalMsg, 
    buf=0x7fff4335aa90 "ASSERT: \"m_textLine\" in file /home/george/kde/src/KDE/kdelibs/kate/render/katelinelayout.cpp, line 68") at global/qglobal.cpp:2058
#8  0x00002ae06b346c67 in qFatal (
    msg=0x2ae06b4926a0 "ASSERT: \"%s\" in file %s, line %d")
    at global/qglobal.cpp:2260
#9  0x00002ae06b347099 in qt_assert (assertion=0x2ae070fc74e4 "m_textLine", 
    file=0x2ae070fc7450 "/home/george/kde/src/KDE/kdelibs/kate/render/katelinelayout.cpp", line=68) at global/qglobal.cpp:1828
#10 0x00002ae070f1df14 in KateLineLayout::textLine (this=0x7eaa00)
    at /home/george/kde/src/KDE/kdelibs/kate/render/katelinelayout.cpp:68
#11 0x00002ae070f1df71 in KateLineLayout::isValid (this=0x7eaa00)
    at /home/george/kde/src/KDE/kdelibs/kate/render/katelinelayout.cpp:120
#12 0x00002ae070f19fd2 in KateLayoutCache::line (this=0x7ee560, realLine=550, 
    virtualLine=15)
    at /home/george/kde/src/KDE/kdelibs/kate/render/katelayoutcache.cpp:161
#13 0x00002ae070f1b088 in KateLayoutCache::updateViewCache (this=0x7ee560, 
    startPos=@0x7f0268, newViewLineCount=35, viewLinesScrolled=0)
    at /home/george/kde/src/KDE/kdelibs/kate/render/katelayoutcache.cpp:148
#14 0x00002ae070f5f72f in KateViewInternal::doUpdateView (this=0x7f00f0, 
    changed=false, viewLinesScrolled=0)
    at /home/george/kde/src/KDE/kdelibs/kate/view/kateviewinternal.cpp:560
#15 0x00002ae070f6000c in KateViewInternal::updateView (this=0x7f00f0, 
    changed=false, viewLinesScrolled=0)
    at /home/george/kde/src/KDE/kdelibs/kate/view/kateviewinternal.cpp:539
#16 0x00002ae070f60b7d in KateViewInternal::slotRegionVisibilityChangedAt (
    this=0x7f00f0)
    at /home/george/kde/src/KDE/kdelibs/kate/view/kateviewinternal.cpp:672
#17 0x00002ae070f6a7ad in KateViewInternal::qt_metacall (this=0x7f00f0, 
    _c=QMetaObject::InvokeMetaMethod, _id=17, _a=0x7fff4335d0e0)
    at /home/george/kde/build/KDE/kdelibs/kate/kateviewinternal.moc:134
#18 0x00002ae06b453cef in QMetaObject::activate (sender=0x7e47e8, 
    from_signal_index=4, to_signal_index=4, argv=0x7fff4335d0e0)
    at kernel/qobject.cpp:3007
#19 0x00002ae06b454153 in QMetaObject::activate (sender=0x7e47e8, 
    m=0x2ae071222640, local_signal_index=0, argv=0x7fff4335d0e0)
    at kernel/qobject.cpp:3080
#20 0x00002ae070f47082 in KateCodeFoldingTree::regionVisibilityChangedAt (
    this=0x7e47e8, _t1=546)
    at /home/george/kde/build/KDE/kdelibs/kate/katecodefolding.moc:104
#21 0x00002ae070f474ec in KateCodeFoldingTree::toggleRegionVisibility (
    this=0x7e47e8, line=546)
    at /home/george/kde/src/KDE/kdelibs/kate/syntax/katecodefolding.cpp:1375
#22 0x00002ae070f4796c in KateCodeFoldingTree::removeOpening (this=0x7e47e8, 
    node=0xac3d40, line=546)
    at /home/george/kde/src/KDE/kdelibs/kate/syntax/katecodefolding.cpp:547
#23 0x00002ae070f47c6d in KateCodeFoldingTree::cleanupUnneededNodes (
    this=0x7e47e8, line=546)
    at /home/george/kde/src/KDE/kdelibs/kate/syntax/katecodefolding.cpp:1303
#24 0x00002ae070f47d8c in KateCodeFoldingTree::lineHasBeenRemoved (
    this=0x7e47e8, line=546)
    at /home/george/kde/src/KDE/kdelibs/kate/syntax/katecodefolding.cpp:1053
#25 0x00002ae070eee673 in KateBuffer::removeLine (this=0x7e47a0, i=546)
    at /home/george/kde/src/KDE/kdelibs/kate/document/katebuffer.cpp:647
#26 0x00002ae070edea07 in KateDocument::editRemoveLine (this=0x736040, 
    line=546, editSource=Kate::NoEditSource)
    at /home/george/kde/src/KDE/kdelibs/kate/document/katedocument.cpp:1588
#27 0x00002ae070ee0117 in KateDocument::removeText (this=0x736040, 
    _range=@0x7fff4335d600, block=false)
    at /home/george/kde/src/KDE/kdelibs/kate/document/katedocument.cpp:856
#28 0x00002ae070f4f0f8 in KateView::removeSelectedText (this=0x7e9da0)
    at /home/george/kde/src/KDE/kdelibs/kate/view/kateview.cpp:1484
#29 0x00002ae070edd7b5 in KateDocument::backspace (this=0x736040, 
    view=0x7e9da0, c=@0x7f0178)
    at /home/george/kde/src/KDE/kdelibs/kate/document/katedocument.cpp:4134
#30 0x00002ae070f5f070 in KateViewInternal::doBackspace (this=0x7f00f0)
    at /home/george/kde/src/KDE/kdelibs/kate/view/kateviewinternal.cpp:740
#31 0x00002ae070f4bce0 in KateView::backspace (this=0x7e9da0)
    at /home/george/kde/src/KDE/kdelibs/kate/view/kateview.cpp:2189
#32 0x00002ae070f59b25 in KateView::qt_metacall (this=0x7e9da0, 
    _c=QMetaObject::InvokeMetaMethod, _id=39, _a=0x7fff4335d9f0)
    at /home/george/kde/build/KDE/kdelibs/kate/kateview.moc:311
#33 0x00002ae06b453cef in QMetaObject::activate (sender=0x909640, 
    from_signal_index=5, to_signal_index=6, argv=0x7fff4335d9f0)
    at kernel/qobject.cpp:3007
#34 0x00002ae06b453f01 in QMetaObject::activate (sender=0x909640, 
    m=0x2ae06c9bccc0, from_local_signal_index=1, to_local_signal_index=2, 
    argv=0x7fff4335d9f0) at kernel/qobject.cpp:3100
#35 0x00002ae06bfdd757 in QAction::triggered (this=0x909640, _t1=false)
    at .moc/debug-shared/moc_qaction.cpp:216
#36 0x00002ae06bfdf194 in QAction::activate (this=0x909640, 
    event=QAction::Trigger) at kernel/qaction.cpp:1119
#37 0x00002ae06bfdf2f3 in QAction::event (this=0x909640, e=0x7fff4335e190)
    at kernel/qaction.cpp:1038
#38 0x00002ae06c048a8a in QWidgetAction::event (this=0x909640, 
    event=0x7fff4335e190) at kernel/qwidgetaction.cpp:239
#39 0x00002ae06bfe4ee7 in QApplicationPrivate::notify_helper (this=0x61c890, 
    receiver=0x909640, e=0x7fff4335e190) at kernel/qapplication.cpp:3766
#40 0x00002ae06bfe5209 in QApplication::notify (this=0x7fff4335f800, 
    receiver=0x909640, e=0x7fff4335e190) at kernel/qapplication.cpp:3360
#41 0x00002ae068ad5b34 in KApplication::notify (this=0x7fff4335f800, 
    receiver=0x909640, event=0x7fff4335e190)
    at /home/george/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:311
#42 0x00002ae06b43f3ea in QCoreApplication::notifyInternal (
    this=0x7fff4335f800, receiver=0x909640, event=0x7fff4335e190)
    at kernel/qcoreapplication.cpp:583
#43 0x00002ae06b442d97 in QCoreApplication::sendEvent (receiver=0x909640, 
    event=0x7fff4335e190)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#44 0x00002ae06c021d98 in QShortcutMap::dispatchEvent (this=0x61c9a0, 
    e=0x7fff4335e8c0) at kernel/qshortcutmap.cpp:768
#45 0x00002ae06c022ccb in QShortcutMap::tryShortcutEvent (this=0x61c9a0, 
    w=0x7f00f0, e=0x7fff4335e8c0) at kernel/qshortcutmap.cpp:365
#46 0x00002ae06bfe5478 in QApplication::notify (this=0x7fff4335f800, 
    receiver=0x7f00f0, e=0x7fff4335e8c0) at kernel/qapplication.cpp:3397
#47 0x00002ae068ad5b34 in KApplication::notify (this=0x7fff4335f800, 
    receiver=0x7f00f0, event=0x7fff4335e8c0)
    at /home/george/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:311
#48 0x00002ae06b43f3ea in QCoreApplication::notifyInternal (
    this=0x7fff4335f800, receiver=0x7f00f0, event=0x7fff4335e8c0)
    at kernel/qcoreapplication.cpp:583
#49 0x00002ae06bff1001 in QCoreApplication::sendSpontaneousEvent (
    receiver=0x7f00f0, event=0x7fff4335e8c0)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#50 0x00002ae06c04b0b9 in qt_sendSpontaneousEvent (receiver=0x7f00f0, 
    event=0x7fff4335e8c0) at kernel/qapplication_x11.cpp:4659
#51 0x00002ae06c08268e in QKeyMapper::sendKeyEvent (keyWidget=0x7f00f0, 
    grab=false, type=QEvent::KeyPress, code=16777219, 
    modifiers=@0x7fff4335edf0, text=@0x7fff4335ed80, autorepeat=false, 
    count=1, nativeScanCode=22, nativeVirtualKey=65288, nativeModifiers=0)
    at kernel/qkeymapper_x11.cpp:1656
#52 0x00002ae06c083a3e in QKeyMapperPrivate::translateKeyEvent (
    this=0x651180, keyWidget=0x7f00f0, event=0x7fff4335f510, grab=false)
    at kernel/qkeymapper_x11.cpp:1627
#53 0x00002ae06c05aba4 in QApplication::x11ProcessEvent (this=0x7fff4335f800, 
    event=0x7fff4335f510) at kernel/qapplication_x11.cpp:3127
#54 0x00002ae06c085d0c in QEventDispatcherX11::processEvents (this=0x618510, 
    flags=@0x7fff4335f670) at kernel/qeventdispatcher_x11.cpp:134
#55 0x00002ae06b43c518 in QEventLoop::processEvents (this=0x7fff4335f720, 
    flags=@0x7fff4335f6d0) at kernel/qeventloop.cpp:149
#56 0x00002ae06b43c714 in QEventLoop::exec (this=0x7fff4335f720, 
    flags=@0x7fff4335f730) at kernel/qeventloop.cpp:196
#57 0x00002ae06b43fc34 in QCoreApplication::exec ()
    at kernel/qcoreapplication.cpp:845
#58 0x00002ae06bfe4c48 in QApplication::exec ()
    at kernel/qapplication.cpp:3298
#59 0x00002ae067972caf in kdemain (argc=2, argv=0x7fff43360518)
    at /home/george/kde/src/KDE/kdebase/apps/kwrite/kwritemain.cpp:786
#60 0x0000000000400863 in main (argc=2, argv=0x7fff43360518)
    at /home/george/kde/build/KDE/kdebase/apps/kwrite/kwrite_dummy.cpp:3
#0  0x00002ae06d63a060 in nanosleep () from /lib64/libc.so.6
Comment 1 George Goldberg 2008-04-21 16:40:06 UTC
Created attachment 24471 [details]
testcase

Open the HTML file attached (its a half finished testcase for a konqueror bug
that I was working on :)).

Then, collapse the two divs with ids "content_left" and "content_bottom".

Then, select from a line or two above to a line or two below the content_bottom
div.

Press backspace and kate crashes.

Btw: I'm using svn trunk r795406.
Comment 2 Christophe Marin 2008-06-13 08:39:21 UTC
*** Bug 163942 has been marked as a duplicate of this bug. ***
Comment 3 Dominik Haumann 2008-07-04 23:15:06 UTC
cannot reproduce, maybe it's fixed in the meanwhile. Can you please retest with trunk? Thanks!!!
Comment 4 George Goldberg 2008-07-05 05:57:45 UTC
Still 100% reproducible in svn trunk r827914. (Also happens in kwrite, but then I guess thats expected). The only difference in behaviour is that the div with id "content_bottom" auto expands when you select its text, but just continue dragging until the bottom of the document. Then press backspace and kate/kwrite will crash.

New backtrace follows here, since it looks a little different.

Application: Kate (kate), signal SIGABRT
Using host libthread_db library "/lib64/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 47616382144464 (LWP 8397)]
[KCrash handler]
#5  0x00002b4e8abe1a55 in raise () from /lib64/libc.so.6
#6  0x00002b4e8abe31e0 in abort () from /lib64/libc.so.6
#7  0x00002b4e88715098 in qt_message_output (msgType=QtFatalMsg, 
    buf=0x7fff2727e850 "ASSERT: \"false\" in file /home/george/kde/src/KDE/kdelibs/kate/view/kateviewinternal.cpp, line 324") at global/qglobal.cpp:2058
#8  0x00002b4e887151a7 in qFatal (
    msg=0x2b4e88862cd8 "ASSERT: \"%s\" in file %s, line %d")
    at global/qglobal.cpp:2260
#9  0x00002b4e887155d9 in qt_assert (assertion=0x2b4e8f947470 "false", 
    file=0x2b4e8f947430 "/home/george/kde/src/KDE/kdelibs/kate/view/kateviewinternal.cpp", line=324) at global/qglobal.cpp:1828
#10 0x00002b4e8f8d2e2a in KateViewInternal::endPos (this=0xaa0970)
    at /home/george/kde/src/KDE/kdelibs/kate/view/kateviewinternal.cpp:324
#11 0x00002b4e8f8d767c in KateViewInternal::makeVisible (this=0xaa0970, 
    c=@0xaa0a80, endCol=17, force=false, center=false, calledExternally=false)
    at /home/george/kde/src/KDE/kdelibs/kate/view/kateviewinternal.cpp:632
#12 0x00002b4e8f8d7c9a in KateViewInternal::updateCursor (this=0xaa0970, 
    newCursor=@0xaa09f8, force=true, center=false, calledExternally=false)
    at /home/george/kde/src/KDE/kdelibs/kate/view/kateviewinternal.cpp:1810
#13 0x00002b4e8f8d8a08 in KateViewInternal::editEnd (this=0xaa0970, 
    editTagLineStart=567, editTagLineEnd=567, tagFrom=true)
    at /home/george/kde/src/KDE/kdelibs/kate/view/kateviewinternal.cpp:3190
#14 0x00002b4e8f8c54ad in KateView::editEnd (this=0x9b94e0, 
    editTagLineStart=567, editTagLineEnd=567, tagFrom=true)
    at /home/george/kde/src/KDE/kdelibs/kate/view/kateview.cpp:1333
#15 0x00002b4e8f8575b7 in KateDocument::editEnd (this=0x6f1590)
    at /home/george/kde/src/KDE/kdelibs/kate/document/katedocument.cpp:1100
#16 0x00002b4e8f8c52a5 in KateView::removeSelectedText (this=0x9b94e0)
    at /home/george/kde/src/KDE/kdelibs/kate/view/kateview.cpp:1510
#17 0x00002b4e8f85c061 in KateDocument::backspace (this=0x6f1590, 
    view=0x9b94e0, c=@0xaa09f8)
    at /home/george/kde/src/KDE/kdelibs/kate/document/katedocument.cpp:4138
#18 0x00002b4e8f8d56ce in KateViewInternal::doBackspace (this=0xaa0970)
    at /home/george/kde/src/KDE/kdelibs/kate/view/kateviewinternal.cpp:753
#19 0x00002b4e8f8c1cd0 in KateView::backspace (this=0x9b94e0)
    at /home/george/kde/src/KDE/kdelibs/kate/view/kateview.cpp:2212
#20 0x00002b4e8f8d0011 in KateView::qt_metacall (this=0x9b94e0, 
    _c=QMetaObject::InvokeMetaMethod, _id=43, _a=0x7fff27281130)
    at /home/george/kde/build/KDE/kdelibs/kate/kateview.moc:329
#21 0x00002b4e888223ab in QMetaObject::activate (sender=0xbdc4f0, 
    from_signal_index=5, to_signal_index=6, argv=0x7fff27281130)
    at kernel/qobject.cpp:3007
#22 0x00002b4e888225bd in QMetaObject::activate (sender=0xbdc4f0, 
    m=0x2b4e89d90100, from_local_signal_index=1, to_local_signal_index=2, 
    argv=0x7fff27281130) at kernel/qobject.cpp:3100
#23 0x00002b4e893af617 in QAction::triggered (this=0xbdc4f0, _t1=false)
    at .moc/debug-shared/moc_qaction.cpp:216
#24 0x00002b4e893b1054 in QAction::activate (this=0xbdc4f0, 
    event=QAction::Trigger) at kernel/qaction.cpp:1119
#25 0x00002b4e893b11b3 in QAction::event (this=0xbdc4f0, e=0x7fff272818d0)
    at kernel/qaction.cpp:1038
#26 0x00002b4e8941a966 in QWidgetAction::event (this=0xbdc4f0, 
    event=0x7fff272818d0) at kernel/qwidgetaction.cpp:239
#27 0x00002b4e893b6da7 in QApplicationPrivate::notify_helper (this=0x61d4e0, 
    receiver=0xbdc4f0, e=0x7fff272818d0) at kernel/qapplication.cpp:3772
#28 0x00002b4e893b70c9 in QApplication::notify (this=0x7fff272830d0, 
    receiver=0xbdc4f0, e=0x7fff272818d0) at kernel/qapplication.cpp:3366
#29 0x00002b4e85dc3768 in KApplication::notify (this=0x7fff272830d0, 
    receiver=0xbdc4f0, event=0x7fff272818d0)
    at /home/george/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:311
#30 0x00002b4e8880da26 in QCoreApplication::notifyInternal (
    this=0x7fff272830d0, receiver=0xbdc4f0, event=0x7fff272818d0)
    at kernel/qcoreapplication.cpp:583
#31 0x00002b4e84d0ef6b in QCoreApplication::sendEvent (receiver=0xbdc4f0, 
    event=0x7fff272818d0)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#32 0x00002b4e893f3c24 in QShortcutMap::dispatchEvent (this=0x61d5f0, 
    e=0x7fff27282000) at kernel/qshortcutmap.cpp:768
#33 0x00002b4e893f4b57 in QShortcutMap::tryShortcutEvent (this=0x61d5f0, 
    w=0xaa0970, e=0x7fff27282000) at kernel/qshortcutmap.cpp:365
#34 0x00002b4e893b7338 in QApplication::notify (this=0x7fff272830d0, 
    receiver=0xaa0970, e=0x7fff27282000) at kernel/qapplication.cpp:3403
#35 0x00002b4e85dc3768 in KApplication::notify (this=0x7fff272830d0, 
    receiver=0xaa0970, event=0x7fff27282000)
    at /home/george/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:311
#36 0x00002b4e8880da26 in QCoreApplication::notifyInternal (
    this=0x7fff272830d0, receiver=0xaa0970, event=0x7fff27282000)
    at kernel/qcoreapplication.cpp:583
#37 0x00002b4e84d0efcb in QCoreApplication::sendSpontaneousEvent (
    receiver=0xaa0970, event=0x7fff27282000)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#38 0x00002b4e8941cf95 in qt_sendSpontaneousEvent (receiver=0xaa0970, 
    event=0x7fff27282000) at kernel/qapplication_x11.cpp:4680
#39 0x00002b4e894547ce in QKeyMapper::sendKeyEvent (keyWidget=0xaa0970, 
    grab=false, type=QEvent::KeyPress, code=16777219, 
    modifiers=@0x7fff27282530, text=@0x7fff272824c0, autorepeat=false, 
    count=1, nativeScanCode=22, nativeVirtualKey=65288, nativeModifiers=0)
    at kernel/qkeymapper_x11.cpp:1656
#40 0x00002b4e89455b7e in QKeyMapperPrivate::translateKeyEvent (
    this=0x654a20, keyWidget=0xaa0970, event=0x7fff27282c60, grab=false)
    at kernel/qkeymapper_x11.cpp:1627
#41 0x00002b4e8942cce4 in QApplication::x11ProcessEvent (this=0x7fff272830d0, 
    event=0x7fff27282c60) at kernel/qapplication_x11.cpp:3148
#42 0x00002b4e89458327 in x11EventSourceDispatch (s=0x6209a0, callback=0, 
    user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:148
#43 0x00002b4e8caa1e92 in g_main_context_dispatch ()
   from /usr/lib64/libglib-2.0.so.0
#44 0x00002b4e8caa5146 in ?? () from /usr/lib64/libglib-2.0.so.0
#45 0x00002b4e8caa55df in g_main_context_iteration ()
   from /usr/lib64/libglib-2.0.so.0
#46 0x00002b4e8883bb8c in QEventDispatcherGlib::processEvents (this=0x617aa0, 
    flags=@0x7fff27282f00) at kernel/qeventdispatcher_glib.cpp:325
#47 0x00002b4e89457b6f in QGuiEventDispatcherGlib::processEvents (
    this=0x617aa0, flags=@0x7fff27282f60)
    at kernel/qguieventdispatcher_glib.cpp:204
#48 0x00002b4e8880ab54 in QEventLoop::processEvents (this=0x7fff27283010, 
    flags=@0x7fff27282fc0) at kernel/qeventloop.cpp:149
#49 0x00002b4e8880ad50 in QEventLoop::exec (this=0x7fff27283010, 
    flags=@0x7fff27283020) at kernel/qeventloop.cpp:196
#50 0x00002b4e8880e270 in QCoreApplication::exec ()
    at kernel/qcoreapplication.cpp:845
#51 0x00002b4e893b6b08 in QApplication::exec ()
    at kernel/qapplication.cpp:3304
#52 0x00002b4e83a44014 in kdemain (argc=1, argv=0x7fff27284368)
    at /home/george/kde/src/KDE/kdesdk/kate/app/katemain.cpp:252
#53 0x00000000004008d3 in main (argc=1, argv=0x7fff27284368)
    at /home/george/kde/build/KDE/kdesdk/kate/app/kate_dummy.cpp:3
#0  0x00002b4e8ac4b091 in nanosleep () from /lib64/libc.so.6


Comment 5 Drew Fisher 2008-07-05 06:13:26 UTC
I too get kwrite to crash in SVN 828072 with the (effectively) same original backtrace:

Application: KWrite (kwrite), signal SIGABRT
[Thread debugging using libthread_db enabled]
[New Thread 0xb5e98720 (LWP 22260)]
[KCrash handler]
#6  0xb7f23410 in __kernel_vsyscall ()
#7  0xb61f2085 in raise () from /lib/tls/i686/cmov/libc.so.6
#8  0xb61f3a01 in abort () from /lib/tls/i686/cmov/libc.so.6
#9  0xb72731d8 in qt_message_output (msgType=QtFatalMsg, 
    buf=0xbfb39b90 "ASSERT: \"m_textLine\" in file /home/kdedev/kde/src/KDE/kdelibs/kate/render/katelinelayout.cpp, line 68") at global/qglobal.cpp:2058
#10 0xb727325d in qFatal (msg=0xb73f0fa4 "ASSERT: \"%s\" in file %s, line %d")
    at global/qglobal.cpp:2260
#11 0xb72736d9 in qt_assert (assertion=0xb4749200 "m_textLine", 
    file=0xb4749150 "/home/kdedev/kde/src/KDE/kdelibs/kate/render/katelinelayout.cpp", line=68) at global/qglobal.cpp:1828
#12 0xb46928d1 in KateLineLayout::textLine (this=0x83dcae0)
    at /home/kdedev/kde/src/KDE/kdelibs/kate/render/katelinelayout.cpp:68
#13 0xb4692938 in KateLineLayout::isValid (this=0x83dcae0)
    at /home/kdedev/kde/src/KDE/kdelibs/kate/render/katelinelayout.cpp:120
#14 0xb468e2b0 in KateLayoutCache::line (this=0x8200348, realLine=550, 
    virtualLine=15)
    at /home/kdedev/kde/src/KDE/kdelibs/kate/render/katelayoutcache.cpp:165
#15 0xb468f609 in KateLayoutCache::updateViewCache (this=0x8200348, 
    startPos=@0x81ff020, newViewLineCount=48, viewLinesScrolled=0)
    at /home/kdedev/kde/src/KDE/kdelibs/kate/render/katelayoutcache.cpp:150
#16 0xb46d9a23 in KateViewInternal::doUpdateView (this=0x81fef38, 
    changed=false, viewLinesScrolled=0)
    at /home/kdedev/kde/src/KDE/kdelibs/kate/view/kateviewinternal.cpp:564
#17 0xb46da2ea in KateViewInternal::updateView (this=0x81fef38, 
    changed=false, viewLinesScrolled=0)
    at /home/kdedev/kde/src/KDE/kdelibs/kate/view/kateviewinternal.cpp:543
#18 0xb46db048 in KateViewInternal::slotRegionVisibilityChangedAt (
    this=0x81fef38)
    at /home/kdedev/kde/src/KDE/kdelibs/kate/view/kateviewinternal.cpp:676
#19 0xb46e5146 in KateViewInternal::qt_metacall (this=0x81fef38, 
    _c=QMetaObject::InvokeMetaMethod, _id=17, _a=0xbfb3bf4c)
    at /home/kdedev/kde/build/KDE/kdelibs/kate/kateviewinternal.moc:134
#20 0xb73a5051 in QMetaObject::activate (sender=0x81a81c4, 
    from_signal_index=4, to_signal_index=4, argv=0xbfb3bf4c)
    at kernel/qobject.cpp:3010
#21 0xb73a55db in QMetaObject::activate (sender=0x81a81c4, m=0xb475da2c, 
    local_signal_index=0, argv=0xbfb3bf4c) at kernel/qobject.cpp:3080
#22 0xb46be3ec in KateCodeFoldingTree::regionVisibilityChangedAt (
    this=0x81a81c4, _t1=546)
    at /home/kdedev/kde/build/KDE/kdelibs/kate/katecodefolding.moc:104
#23 0xb46be8ab in KateCodeFoldingTree::toggleRegionVisibility (
    this=0x81a81c4, line=546)
    at /home/kdedev/kde/src/KDE/kdelibs/kate/syntax/katecodefolding.cpp:1375
#24 0xb46bedc8 in KateCodeFoldingTree::removeOpening (this=0x81a81c4, 
    node=0x8653048, line=546)
    at /home/kdedev/kde/src/KDE/kdelibs/kate/syntax/katecodefolding.cpp:547
#25 0xb46bf139 in KateCodeFoldingTree::cleanupUnneededNodes (this=0x81a81c4, 
    line=546)
    at /home/kdedev/kde/src/KDE/kdelibs/kate/syntax/katecodefolding.cpp:1303
#26 0xb46bf291 in KateCodeFoldingTree::lineHasBeenRemoved (this=0x81a81c4, 
    line=546)
    at /home/kdedev/kde/src/KDE/kdelibs/kate/syntax/katecodefolding.cpp:1053
#27 0xb466a510 in KateBuffer::removeLine (this=0x81a8198, i=546)
    at /home/kdedev/kde/src/KDE/kdelibs/kate/document/katebuffer.cpp:647
#28 0xb465ab0b in KateDocument::editRemoveLine (this=0x80cbc10, line=546, 
    editSource=Kate::NoEditSource)
    at /home/kdedev/kde/src/KDE/kdelibs/kate/document/katedocument.cpp:1597
#29 0xb465c338 in KateDocument::removeText (this=0x80cbc10, 
    _range=@0xbfb3c250, block=false)
    at /home/kdedev/kde/src/KDE/kdelibs/kate/document/katedocument.cpp:866
#30 0xb46c71c1 in KateView::removeSelectedText (this=0x81fdd78)
    at /home/kdedev/kde/src/KDE/kdelibs/kate/view/kateview.cpp:1505
#31 0xb465984d in KateDocument::backspace (this=0x80cbc10, view=0x81fdd78, 
    c=@0x81fef8c)
    at /home/kdedev/kde/src/KDE/kdelibs/kate/document/katedocument.cpp:4145
#32 0xb46d9110 in KateViewInternal::doBackspace (this=0x81fef38)
    at /home/kdedev/kde/src/KDE/kdelibs/kate/view/kateviewinternal.cpp:753
#33 0xb46c36e3 in KateView::backspace (this=0x81fdd78)
    at /home/kdedev/kde/src/KDE/kdelibs/kate/view/kateview.cpp:2212
#34 0xb46d36bc in KateView::qt_metacall (this=0x81fdd78, 
    _c=QMetaObject::InvokeMetaMethod, _id=43, _a=0xbfb3c48c)
    at /home/kdedev/kde/build/KDE/kdelibs/kate/kateview.moc:329
#35 0xb73a5051 in QMetaObject::activate (sender=0x832da98, 
    from_signal_index=5, to_signal_index=6, argv=0xbfb3c48c)
    at kernel/qobject.cpp:3010
#36 0xb73a5342 in QMetaObject::activate (sender=0x832da98, m=0xb716afb8, 
    from_local_signal_index=1, to_local_signal_index=2, argv=0xbfb3c48c)
    at kernel/qobject.cpp:3100
#37 0xb6842bea in QAction::triggered (this=0x832da98, _t1=false)
    at .moc/debug-shared/moc_qaction.cpp:216
#38 0xb6844c0a in QAction::activate (this=0x832da98, event=QAction::Trigger)
    at kernel/qaction.cpp:1119
#39 0xb6844de4 in QAction::event (this=0x832da98, e=0xbfb3c910)
    at kernel/qaction.cpp:1038
#40 0xb68c143b in QWidgetAction::event (this=0x832da98, event=0xbfb3c910)
    at kernel/qwidgetaction.cpp:239
#41 0xb684bf55 in QApplicationPrivate::notify_helper (this=0x805cc38, 
    receiver=0x832da98, e=0xbfb3c910) at kernel/qapplication.cpp:3772
#42 0xb684c23b in QApplication::notify (this=0xbfb3d778, receiver=0x832da98, 
    e=0xbfb3c910) at kernel/qapplication.cpp:3366
#43 0xb78ec44d in KApplication::notify (this=0xbfb3d778, receiver=0x832da98, 
    event=0xbfb3c910)
    at /home/kdedev/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:311
#44 0xb738d24d in QCoreApplication::notifyInternal (this=0xbfb3d778, 
    receiver=0x832da98, event=0xbfb3c910) at kernel/qcoreapplication.cpp:587
#45 0xb73917dd in QCoreApplication::sendEvent (receiver=0x832da98, 
    event=0xbfb3c910)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#46 0xb68932b6 in QShortcutMap::dispatchEvent (this=0x805ccd4, e=0xbfb3cd54)
    at kernel/qshortcutmap.cpp:768
#47 0xb68943e8 in QShortcutMap::tryShortcutEvent (this=0x805ccd4, 
    w=0x81fef38, e=0xbfb3cd54) at kernel/qshortcutmap.cpp:365
#48 0xb684c456 in QApplication::notify (this=0xbfb3d778, receiver=0x81fef38, 
    e=0xbfb3cd54) at kernel/qapplication.cpp:3403
#49 0xb78ec44d in KApplication::notify (this=0xbfb3d778, receiver=0x81fef38, 
    event=0xbfb3cd54)
    at /home/kdedev/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:311
#50 0xb738d24d in QCoreApplication::notifyInternal (this=0xbfb3d778, 
    receiver=0x81fef38, event=0xbfb3cd54) at kernel/qcoreapplication.cpp:587
#51 0xb68598db in QCoreApplication::sendSpontaneousEvent (receiver=0x81fef38, 
    event=0xbfb3cd54)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#52 0xb68c451a in qt_sendSpontaneousEvent (receiver=0x81fef38, 
    event=0xbfb3cd54) at kernel/qapplication_x11.cpp:4680
#53 0xb69048d1 in QKeyMapper::sendKeyEvent (keyWidget=0x81fef38, grab=false, 
    type=QEvent::KeyPress, code=16777219, modifiers=@0xbfb3ceb8, 
    text=@0xbfb3ceec, autorepeat=false, count=1, nativeScanCode=22, 
    nativeVirtualKey=65288, nativeModifiers=0)
    at kernel/qkeymapper_x11.cpp:1656
#54 0xb6905d7f in QKeyMapperPrivate::translateKeyEvent (this=0x8084d00, 
    keyWidget=0x81fef38, event=0xbfb3d47c, grab=false)
    at kernel/qkeymapper_x11.cpp:1627
#55 0xb68d8960 in QApplication::x11ProcessEvent (this=0xbfb3d778, 
    event=0xbfb3d47c) at kernel/qapplication_x11.cpp:3148
#56 0xb69086e1 in x11EventSourceDispatch (s=0x805fbb8, callback=0, 
    user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:148
#57 0xb6072bf8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#58 0xb6075e5e in ?? () from /usr/lib/libglib-2.0.so.0
#59 0xb60763ac in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#60 0xb73c278c in QEventDispatcherGlib::processEvents (this=0x805cd78, 
    flags=@0xbfb3d614) at kernel/qeventdispatcher_glib.cpp:325
#61 0xb6907db0 in QGuiEventDispatcherGlib::processEvents (this=0x805cd78, 
    flags=@0xbfb3d644) at kernel/qguieventdispatcher_glib.cpp:204
#62 0xb7389aca in QEventLoop::processEvents (this=0xbfb3d6cc, 
    flags=@0xbfb3d684) at kernel/qeventloop.cpp:149
#63 0xb7389d09 in QEventLoop::exec (this=0xbfb3d6cc, flags=@0xbfb3d6d4)
    at kernel/qeventloop.cpp:200
#64 0xb738db84 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:845
#65 0xb684bc6e in QApplication::exec () at kernel/qapplication.cpp:3304
#66 0xb7f1ad99 in kdemain (argc=1, argv=0xbfb3db64)
    at /home/kdedev/kde/src/KDE/kdebase/apps/kwrite/kwritemain.cpp:781
#67 0x08048776 in main (argc=)
    at /home/kdedev/kde/build/KDE/kdebase/apps/kwrite/kwrite_dummy.cpp:3
#0  0xb7f23410 in __kernel_vsyscall ()
Comment 6 Hamish Rodda 2008-07-07 01:40:53 UTC
What is happening here is that we're deleting a large block of folded text, and the text is removed from the buffer, then the folding code asks the view to update itself but because the line doesn't exist any more, we crash.

I'm not sure of the best way to fix this, given I don't really understand the folding code... anyone else?
Comment 7 Hamish Rodda 2008-07-07 01:42:53 UTC
More information as to why it crashes which I meant to write earlier - the reason that the view still looks for these lines is that it has not yet received the edit information when it is asked to update.  Perhaps we could make the folding code check before the lines are removed, then it would expand before deleting, but that seems pretty inefficient to me.
Comment 8 Joseph Wenninger 2008-12-07 17:53:27 UTC
r893994
If a folded block is being deleted, which triggers a view update, the render caches are now cleared so the line informations are correct.
BUG:161113
Comment 9 Dario Andres 2008-12-14 16:18:20 UTC
*** Bug 173152 has been marked as a duplicate of this bug. ***