Summary: | kate crash when I use delete key | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | Zayed Al-Saidi <zayed.alsaidi> |
Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED DUPLICATE | ||
Severity: | crash | CC: | andresbajotierra, smartins |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Unspecified | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
the test case
collapse the last sixth divs from the test case and delete them Simpler testcase |
Description
Zayed Al-Saidi
2008-10-19 17:58:42 UTC
Can you reproduce this bug with any HTML file deleting any DIV ? Here: Kate Version 3.1.2 Using KDE 4.1.2 (KDE 4.1.2) (KDEmod) in ArchLinux i686: Trying to delete some DIVs and another random characters from a random HTML file didn't crash Kate. (I'm using a plain default Kate configuration. Are you using a special feature/plugin/configuration) ?) Ok, I I find a way to reproduce this crash. 1- download the test case and make sure it save as html file. 2- collapse all the div and delete the last 6 divs ( see the photo.) By the way, I do not use any special feature or configuration. Created attachment 28159 [details]
the test case
Created attachment 28160 [details]
collapse the last sixth divs from the test case and delete them
Here: Kate Version 3.1.2 Using KDE 4.1.2 (KDE 4.1.2) (KDEmod) in ArchLinux i686: With the testcase file I can reproduce this bug. (btw, some arrows remain in the same position ("down") even when I collapse it, I don't know if this is a related bug ) The backtrace is similar to the one on bug 161113 Created attachment 29313 [details]
Simpler testcase
Here's a simpler testcase, its only 14 bytes :)
1- Open with kate.
2- Fold
3- Ctrl+A (to select all)
4- Press delete or backspace
Strage i didn't get the same backtrace, here's the problem: ==4175== Invalid read of size 4 ==4175== at 0x7B290D2: KateCodeFoldingTree::removeOpening(KateCodeFoldingNode*, unsigned) (katecodefolding.cpp:553) ==4175== by 0x7B2964D: KateCodeFoldingTree::cleanupUnneededNodes(unsigned) (katecodefolding.cpp:1296) ==4175== by 0x7B29909: KateCodeFoldingTree::lineHasBeenRemoved(unsigned) (katecodefolding.cpp:1058) ==4175== by 0x7ABCFCA: KateBuffer::removeLine(int) (katebuffer.cpp:882) ==4175== by 0x7AB2E7D: KateDocument::editRemoveLine(int, Kate::EditSource) (katedocument.cpp:1567) ==4175== by 0x7AB4608: KateDocument::removeText(KTextEditor::Range const&, bool) (katedocument.cpp:824) ==4175== by 0x7B346E3: KateView::removeSelectedText() (kateview.cpp:1685) ==4175== by 0x7AB141F: KateDocument::backspace(KateView*, KTextEditor::Cursor const&) (katedocument.cpp:4129) ==4175== by 0x7B45A13: KateViewInternal::doBackspace() (kateviewinternal.cpp:802) ==4175== by 0x7B33D1A: KateView::backspace() (kateview.cpp:2447) ==4175== by 0x7B39920: KateView::qt_metacall(QMetaObject::Call, int, void**) (kateview.moc:357) ==4175== by 0x4FAB2AA: QMetaObject::activate(QObject*, int, int, void**) (qobject.cpp:3028) ==4175== Address 0x6bf83a0 is 0 bytes inside a block of size 32 free'd ==4175== at 0x402266C: operator delete(void*) (vg_replace_malloc.c:342) ==4175== by 0x7B291DE: KateCodeFoldingTree::removeOpening(KateCodeFoldingNode*, unsigned) (katecodefolding.cpp:577) ==4175== by 0x7B2964D: KateCodeFoldingTree::cleanupUnneededNodes(unsigned) (katecodefolding.cpp:1296) ==4175== by 0x7B2A0C8: KateCodeFoldingTree::updateLine(unsigned, QVector<int>*, bool*, bool, bool) (katecodefolding.cpp:530) ==4175== by 0x7ABFFA4: KateBuffer::doHighlight(int, int, bool) (katebuffer.cpp:1261) ==4175== by 0x7AC248D: KateBuffer::ensureHighlighted(int) (katebuffer.cpp:775) ==4175== by 0x7B2852F: KateCodeFoldingTree::toggleRegionVisibility(unsigned) (katecodefolding.cpp:1362) ==4175== by 0x7B29131: KateCodeFoldingTree::removeOpening(KateCodeFoldingNode*, unsigned) (katecodefolding.cpp:549) ==4175== by 0x7B2964D: KateCodeFoldingTree::cleanupUnneededNodes(unsigned) (katecodefolding.cpp:1296) ==4175== by 0x7B29909: KateCodeFoldingTree::lineHasBeenRemoved(unsigned) (katecodefolding.cpp:1058) ==4175== by 0x7ABCFCA: KateBuffer::removeLine(int) (katebuffer.cpp:882) ==4175== by 0x7AB2E7D: KateDocument::editRemoveLine(int, Kate::EditSource) (katedocument.cpp:1567) removeOpening calls toggleRegionVisibility which causes another removeOpening call which will read a freed pointer @Sergio: I can confirm the crash using the steps you provided (in KDE4.1.3), however it seems to be a different bug (different assert but related situation) . I couldn't find any duplicate of the backtrace you provided. I'm going to test it later in 4.2svn. If it's also in there, you can post a new bug report. I'm marking the original bug report as duplicate of bug 161113 (same backtrace and situation) :) *** This bug has been marked as a duplicate of bug 161113 *** |