Summary: | [testcase] [backtrace] kate crashes when trying to delete large block of text. | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | George Goldberg <grundleborg> |
Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | bearscafe2.0, dhaumann, jowenn, zayed.alsaidi |
Priority: | NOR | ||
Version: | SVN | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | testcase |
Description
George Goldberg
2008-04-21 16:36:36 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.
*** Bug 163942 has been marked as a duplicate of this bug. *** cannot reproduce, maybe it's fixed in the meanwhile. Can you please retest with trunk? Thanks!!! 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 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 () 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? 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. 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 *** Bug 173152 has been marked as a duplicate of this bug. *** |