Summary: | while pressing "del" key kate crashes (crash, bt) | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | Marco Krohn <marco.krohn> |
Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | Admin, calvin, jtamate, kde, kde_bugzilla_2, krzysiek, lacogubik, missive, Norbert, pavel.simerda, toby.e.cox, vlegacy |
Priority: | NOR | ||
Version: | 2.2 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Marco Krohn
2004-09-07 23:41:56 UTC
I get bitten by this bug every once in a while, too. When the crash happens, it's usually when I've been rapidly deleting a bunch of characters. Most of the files I edit in Kate are Python files, but I'm not sure whether that's related to the above case or just a coincidence. How to reproduce (sometimes): 1. Open a medium-to-large Python file. 2. Go to the beginning of a line in the middle of the file, and hit the "Delete" button. 3. Hit the down arrow. 4. Repeat steps 2 and 3 repeatedly and very quickly (i.e., delete, down, delete, down, delete, down). Kate crashes. For what it's worth, here's my backtrace: Using host libthread_db library "/lib/tls/libthread_db.so.1". [Thread debugging using libthread_db enabled] [New Thread -151115936 (LWP 2123)] [KCrash handler] #4 0x0575ded8 in QGList::find () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #5 0x0575da59 in QGList::remove () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #6 0x00edf22c in KateCodeFoldingTree::removeEnding () from /usr/lib/kde3/libkatepart.so #7 0x00ee1345 in KateCodeFoldingTree::cleanupUnneededNodes () from /usr/lib/kde3/libkatepart.so #8 0x00ede612 in KateCodeFoldingTree::updateLine () from /usr/lib/kde3/libkatepart.so #9 0x00e737ea in KateBuffer::doHighlight () from /usr/lib/kde3/libkatepart.so #10 0x00e71575 in KateBuffer::editEnd () from /usr/lib/kde3/libkatepart.so #11 0x00e946c6 in KateDocument::editEnd () from /usr/lib/kde3/libkatepart.so #12 0x00e937cc in KateDocument::removeText () from /usr/lib/kde3/libkatepart.so #13 0x00e935b1 in KateDocument::removeText () from /usr/lib/kde3/libkatepart.so #14 0x00e9dac2 in KateDocument::del () from /usr/lib/kde3/libkatepart.so #15 0x00ee7b5f in KateViewInternal::doDelete () from /usr/lib/kde3/libkatepart.so #16 0x00f29305 in KateView::keyDelete () from /usr/lib/kde3/libkatepart.so #17 0x00eedebe in KateViewInternal::keyPressEvent () from /usr/lib/kde3/libkatepart.so #18 0x00eed788 in KateViewInternal::eventFilter () from /usr/lib/kde3/libkatepart.so #19 0x0549fe4e in QObject::activate_filters () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #20 0x0549fd7c in QObject::event () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #21 0x054d853f in QWidget::event () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #22 0x05445fef in QApplication::internalNotify () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #23 0x05445ae4 in QApplication::notify () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #24 0x0046d623 in KApplication::notify () from /usr/lib/libkdecore.so.4 #25 0x053de3d0 in QETWidget::translateKeyEvent () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #26 0x053da2ef in QApplication::x11ProcessEvent () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #27 0x053f10b4 in QEventLoop::processEvents () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #28 0x05458238 in QEventLoop::enterLoop () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #29 0x054580e8 in QEventLoop::exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #30 0x05446241 in QApplication::exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #31 0x00a47814 in kdemain () from /usr/lib/libkdeinit_kate.so #32 0x0804864b in ?? () #33 0x00000001 in ?? () #34 0xfef4dde4 in ?? () #35 0xfef4ddb8 in ?? () #36 0x00ac9ad4 in __libc_start_main () from /lib/tls/libc.so.6 I'll just add to the above comment that I'm using KDE 3.3.0 with Kate 2.3, via RPMs from the KDE-Redhat project (kde-redhat.sourceforge.net). But this bug was also in my previous version (KDE 3.2.0). *** Bug 100104 has been marked as a duplicate of this bug. *** *** Bug 96783 has been marked as a duplicate of this bug. *** *** Bug 97643 has been marked as a duplicate of this bug. *** should be solved with kde 3.4, as I have fixed some folding issues there not fixed, see #bug 125986. *** Bug 125986 has been marked as a duplicate of this bug. *** *** Bug 118756 has been marked as a duplicate of this bug. *** *** Bug 119570 has been marked as a duplicate of this bug. *** *** Bug 121809 has been marked as a duplicate of this bug. *** The related bugs from comment #8 - #10 include more information and test files. *** Bug 122311 has been marked as a duplicate of this bug. *** *** Bug 124102 has been marked as a duplicate of this bug. *** SVN commit 554198 by kling: Remove nodes from `markedForDeleting' when deleting them now. Fixes issues with cleanupUnneededNodes() working on dangling pointers. BUG: 89042 BUG: 103648 M +17 -5 katecodefoldinghelpers.cpp --- branches/KDE/3.5/kdelibs/kate/part/katecodefoldinghelpers.cpp #554197:554198 @@ -559,7 +559,9 @@ uint endCol=node->endCol; // removes + deletes - delete parent->takeChild(mypos); + KateCodeFoldingNode *child = parent->takeChild(mypos); + markedForDeleting.removeRef(child); + delete child; if ((type>0) && (endLineValid)) correctEndings(-type, parent, line+endLineRel/*+1*/,endCol, mypos); // why the hell did I add a +1 here ? @@ -583,7 +585,11 @@ // removes + deletes int i = parent->findChild (node); if (i >= 0) - delete parent->takeChild (i); + { + KateCodeFoldingNode *child = parent->takeChild(i); + markedForDeleting.removeRef(child); + delete child; + } return true; } @@ -598,7 +604,9 @@ node->endLineValid = true; node->endLineRel = parent->child(i)->startLineRel - node->startLineRel; - delete parent->takeChild(i); + KateCodeFoldingNode *child = parent->takeChild(i); + markedForDeleting.removeRef(child); + delete child; count = i-mypos-1; if (count > 0) @@ -831,7 +839,9 @@ node->endLineValid = true; node->endLineRel = getStartLine(parent->child(i))-line; node->endCol = parent->child(i)->endCol; - delete parent->takeChild(i); + KateCodeFoldingNode *child = parent->takeChild(i); + markedForDeleting.removeRef( child ); + delete child; break; } } @@ -907,7 +917,9 @@ count = node->childCount() - i - 1; newNode->endLineValid = true; newNode->endLineRel = line - getStartLine(node->child(i)); - delete node->takeChild(i); + KateCodeFoldingNode *child = node->takeChild(i); + markedForDeleting.removeRef( child ); + delete child; break; } } SVN commit 554957 by dhaumann: forward port: SVN commit 554198 by kling: Remove nodes from `markedForDeleting' when deleting them now. Fixes issues with cleanupUnneededNodes() working on dangling pointers. CCBUG: 89042 CCBUG: 103648 M +17 -5 katecodefoldinghelpers.cpp --- trunk/KDE/kdelibs/kate/part/katecodefoldinghelpers.cpp #554956:554957 @@ -558,7 +558,9 @@ uint endCol=node->endCol; // removes + deletes - delete parent->takeChild(mypos); + KateCodeFoldingNode *child = parent->takeChild(mypos); + markedForDeleting.removeAll(child); + delete child; if ((type>0) && (endLineValid)) correctEndings(-type, parent, line+endLineRel/*+1*/,endCol, mypos); // why the hell did I add a +1 here ? @@ -582,7 +584,11 @@ // removes + deletes int i = parent->findChild (node); if (i >= 0) - delete parent->takeChild (i); + { + KateCodeFoldingNode *child = parent->takeChild(i); + markedForDeleting.removeAll(child); + delete child; + } return true; } @@ -597,7 +603,9 @@ node->endLineValid = true; node->endLineRel = parent->child(i)->startLineRel - node->startLineRel; - delete parent->takeChild(i); + KateCodeFoldingNode *child = parent->takeChild(i); + markedForDeleting.removeAll(child); + delete child; count = i-mypos-1; if (count > 0) @@ -829,7 +837,9 @@ node->endLineValid = true; node->endLineRel = getStartLine(parent->child(i))-line; node->endCol = parent->child(i)->endCol; - delete parent->takeChild(i); + KateCodeFoldingNode *child = parent->takeChild(i); + markedForDeleting.removeAll( child ); + delete child; break; } } @@ -905,7 +915,9 @@ count = node->childCount() - i - 1; newNode->endLineValid = true; newNode->endLineRel = line - getStartLine(node->child(i)); - delete node->takeChild(i); + KateCodeFoldingNode *child = node->takeChild(i); + markedForDeleting.removeAll( child ); + delete child; break; } } *** Bug 132486 has been marked as a duplicate of this bug. *** *** Bug 142673 has been marked as a duplicate of this bug. *** |