Summary: | [testcase] Kate crash related to Code Folding with certain highlighters (python, R) | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | Sönke Hahn <shahn> |
Component: | folding | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | alanjprescott, andresbajotierra, bernddude, kde, rodseth, roger.bunivot, scilec, shentey, thomas.friedrichsmeier |
Priority: | VHI | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Unlisted Binaries | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Testcase (R syntax)
New crash information added by DrKonqi |
Description
Sönke Hahn
2009-11-10 12:18:03 UTC
From bug 229379: -- Information about the crash: The text windows was split in three part. I was moving the right lift o f the middle windows part when kate crashed. I was using kate for python code editing, the python plugin was installed, in the consol a ipython was started, with this option: ipython -pylab -wthread The folding marker were not a their good place. Backtrace: #5 size (this=0x1539f00, node=0x2485e50, line=451) at /usr/include/QtCore/qvector.h:124 #6 findChild (this=0x1539f00, node=0x2485e50, line=451) at /usr/src/debug/kdelibs-4.4.0/kate/syntax/katecodefolding.h:85 #7 KateCodeFoldingTree::removeOpening (this=0x1539f00, node=0x2485e50, line=451) at /usr/src/debug/kdelibs-4.4.0/kate/syntax/katecodefolding.cpp:554 #8 0x00007fc6ae6374ae in KateCodeFoldingTree::cleanupUnneededNodes (this=0x1539f00, line=451) at /usr/src/debug/kdelibs-4.4.0/kate/syntax/katecodefolding.cpp:1321 #9 0x00007fc6ae637c3c in KateCodeFoldingTree::updateLine (this=0x1539f00, line=<value optimized out>, regionChanges=0x7fff0afc3900, updated=<value optimized out>, changed=<value optimized out>, colsChanged=<value optimized out>) at /usr/src/debug/kdelibs-4.4.0/kate/syntax/katecodefolding.cpp:530 #10 0x00007fc6ae5d1400 in KateBuffer::doHighlight (this=<value optimized out>, startLine=<value optimized out>, endLine=<value optimized out>, invalidate=<value optimized out>) at /usr/src/debug/kdelibs-4.4.0/kate/document/katebuffer.cpp:1332 #11 0x00007fc6ae5d364c in KateBuffer::editEnd (this=0x1539eb0) at /usr/src/debug/kdelibs-4.4.0/kate/document/katebuffer.cpp:538 #12 0x00007fc6ae5b85cc in KateDocument::editEnd (this=0x152c230) at /usr/src/debug/kdelibs-4.4.0/kate/document/katedocument.cpp:975 #13 0x00007fc6ae5ba8c5 in KateDocument::typeChars (this=0x152c230, view=<value optimized out>, chars=...) at /usr/src/debug/kdelibs-4.4.0/kate/document/katedocument.cpp:2743 #14 0x00007fc6ae653db7 in KateViewInternal::keyPressEvent (this=0x173b2a0, e=0x7fff0afc44c0) at /usr/src/debug/kdelibs-4.4.0/kate/view/kateviewinternal.cpp:2456 #15 0x00007fc6ae653022 in KateViewInternal::eventFilter (this=0x173b2a0, obj=0x173b2a0, e=0x7fff0afc44c0) at /usr/src/debug/kdelibs-4.4.0/kate/view/kateviewinternal.cpp:2259 ... *** Bug 229379 has been marked as a duplicate of this bug. *** *** Bug 231223 has been marked as a duplicate of this bug. *** Created attachment 43941 [details]
Testcase (R syntax)
An RKWard user gave me reproducable instructions to trigger a crash with this backtrace. I've reduced those to the attached testcase. Basically:
1) Load this file. Do NOT edit anything. Highlighting should be "R Script", automatically.
2) Collapse the top level folding (Ctrl+Shift+-)
3) Type "('" on line 7 (without the double quotes, with the single quote) -> CRASH
4) Next time around, type the "('" on line 30 -> no crash
5) Delete the two chars again, and try step 3, now -> no crash
Some further notes:
- Typing a round bracket ('(') is important. A single or double quote alone is not enough. Note that in the R highlighter, round brackets trigger a new context (but I don't know, whether that is the relevant aspect, here).
- A certain minimum number (~60) of lines between the inserted text and the folded region is important. The lines need not necessarily be empty.
- I tried to produce an equivalent testcase for C-highlighting, but this did not trigger the crash.
Tested in KDE 4.3.4 and 4.4.80 (SVN rev. 1129152), each in kwrite, and the katepart in RKWard. All give the same result and known backtrace.
can reproduce... still not easy to fix. regarding Thomas observation , it does actually seem that no "new" open bracket "(" is required, i am the one who wrote the original script which crashed and i just had a case crashing where i added a ' into and existing function call facet_wrap(~HeadSN) [before] to facet(~HeadSN,scale='free') as soon as i typed the first quote the system crashed *** Bug 241349 has been marked as a duplicate of this bug. *** *** Bug 241059 has been marked as a duplicate of this bug. *** Who can provide a small test case using the QTest framework? I've added a test case called "bug213964". It should always crash the test. The crash appears to be caused by node->parentNode being equal to 1 (i.e clearly not a valid pointer to another node) at line 544 of katecodefolding.cpp As to why that's the case..I'm not sure. SVN commit 1140437 by cullmann: contributed patch for bug 213964, crash in code folding author: Stefan Schenk BUG: 213964 M +7 -3 katecodefolding.cpp M +3 -0 katecodefolding.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1140437 Created attachment 48500 [details]
New crash information added by DrKonqi
Kate crashed as I was editing a (folded) PHP script and entering a double quote (").
I had several PHP files open at the time, some folded and some not, and all were from a remote host opened using the fish:// protocol
I had already noticed odd behaviour when entering a single quote (') in that after entering a single quote the cursor moved to the left of the quote so that further keystrokes entered the file in front of the quote.
This did not happen in all the open files, only in the one being edited at the time of the crash
|