Summary: | Kate crashes when editing c++ files after mode change to "Normal" | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | Eugene Shalygin <eugene.shalygin+bugzilla.kde> |
Component: | part | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | franciscoadriansanchez, i.zaufi, l.jirkovsky, philippe.sigaud, ravishankar, samuel.d.flis |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kate/0b05dbdd0cef249a5ac551ad33edb2335ab0b607 | Version Fixed In: | 4.13.2 |
Sentry Crash Report: |
Description
Eugene Shalygin
2014-03-22 01:20:40 UTC
*** This bug has been marked as a duplicate of bug 328271 *** disagree: here the version is 4.12.95, i.e. after fix for #328271 has been applied. Shall I reopen this bug or ask for reopening #328271 ? It seem like not any inserted character leads to crash, but "." always does. Thread 1 (Thread 0x7f8136031780 (LWP 21480)): [KCrash Handler] #5 0x00007f813abdb209 in raise () from /lib64/libc.so.6 #6 0x00007f813abdc568 in abort () from /lib64/libc.so.6 #7 0x00007f813c188d74 in qt_message_output(QtMsgType, char const*) () from /usr/lib64/qt4/libQtCore.so.4 #8 0x00007f813c188ed9 in qt_message(QtMsgType, char const*, __va_list_tag*) () from /usr/lib64/qt4/libQtCore.so.4 #9 0x00007f813c1896e4 in qFatal(char const*, ...) () from /usr/lib64/qt4/libQtCore.so.4 #10 0x00007f8128ac996b in contextNum (n=0, this=0x13e7350) at /usr/src/debug/kde-base/katepart-4.12.95/katepart-4.12.95/part/syntax/katehighlight.h:275 #11 KateDocument::defStyleNum (this=0x3e6e180, line=<optimized out>, column=column@entry=21) at /usr/src/debug/kde-base/katepart-4.12.95/katepart-4.12.95/part/document/katedocument.cpp:5486 #12 0x00007f8128af2ef3 in KateScriptDocument::defStyleNum (this=this@entry=0x40df480, line=<optimized out>, column=column@entry=21) at /usr/src/debug/kde-base/katepart-4.12.95/katepart-4.12.95/part/script/katescriptdocument.cpp:51 #13 0x00007f8128af2f73 in KateScriptDocument::isString (this=this@entry=0x40df480, line=<optimized out>, column=column@entry=21) at /usr/src/debug/kde-base/katepart-4.12.95/katepart-4.12.95/part/script/katescriptdocument.cpp:83 #14 0x00007f8128af2fa9 in KateScriptDocument::isString (this=0x40df480, cursor=...) at /usr/src/debug/kde-base/katepart-4.12.95/katepart-4.12.95/part/script/katescriptdocument.cpp:89 #15 0x00007f8128a69e14 in KateScriptDocument::qt_static_metacall (_o=0x40df480, _c=21480, _c@entry=QMetaObject::InvokeMetaMethod, _id=91, _a=0x7fff7167eaf0) at /usr/src/debug/kde-base/katepart-4.12.95/katepart-4.12.95_build/part/moc_katescriptdocument.cpp:407 #16 0x00007f8128a69fc5 in KateScriptDocument::qt_metacall (this=0x40df480, _c=QMetaObject::InvokeMetaMethod, _id=91, _a=0x7fff7167eaf0) at /usr/src/debug/kde-base/katepart-4.12.95/katepart-4.12.95_build/part/moc_katescriptdocument.cpp:467 #17 0x00007f813227a25d in QScript::callQtMethod(QTJSC::ExecState*, QMetaMethod::MethodType, QObject*, QTJSC::ArgList const&, QMetaObject const*, int, bool) () from /usr/lib64/qt4/libQtScript.so.4 #18 0x00007f813227b409 in QScript::QtFunction::execute(QTJSC::ExecState*, QTJSC::JSValue, QTJSC::ArgList const&) () from /usr/lib64/qt4/libQtScript.so.4 #19 0x00007f813227b699 in QScript::QtFunction::call(QTJSC::ExecState*, QTJSC::JSObject*, QTJSC::JSValue, QTJSC::ArgList const&) () from /usr/lib64/qt4/libQtScript.so.4 #20 0x00007f81321819f8 in QTJSC::NativeFuncWrapper::operator()(QTJSC::ExecState*, QTJSC::JSObject*, QTJSC::JSValue, QTJSC::ArgList const&) const () from /usr/lib64/qt4/libQtScript.so.4 #21 0x00007f813215fbb0 in cti_op_call_NotJSFunction () from /usr/lib64/qt4/libQtScript.so.4 #22 0x00007f80a3414e90 in ?? () #23 0x0000000000000230 in ?? () #24 0x00007f80a1387480 in ?? () #25 0x00007f800000000d in ?? () #26 0xffff000000000002 in ?? () #27 0x00007f80a13853c0 in ?? () #28 0x0000000000000004 in ?? () #29 0x0000000000000000 in ?? () kate 3.13.0 (compiled from sources on gentoo) can't reproduce... can you confirm? Yes. It is my fault that the original bug description is incomplete: one has also set identation mode to C++/Boost. Therefore: 1. Open a C++ file 2. Check that the mode is "C++" 3. Check that identation mode is "C++/Boost" 2. Change mode to "Normal" 3. Try to insert "." confirm! brief investigation reveals that the problem is easy to reproduce for any indenter w/ 'indent-languages' property set and which calls isString(), isComment() or any other attributes related function. Setting mode to 'Normal' for that indenters should lead to switch indentation mode as well because no styles is available after that (so calling isString() for example leads to ASSERT at katehighlight.h:275). the bug fix is submitted to review board: https://git.reviewboard.kde.org/r/117678/ Same problem. Is the patch going to be accepted? *** Bug 334503 has been marked as a duplicate of this bug. *** Git commit 0b05dbdd0cef249a5ac551ad33edb2335ab0b607 by Alex Turbov. Committed on 13/05/2014 at 21:23. Pushed by turbov into branch 'master'. add "style" attribute to C++ syntax files, so C++ indenter will be disabled when mode set to "Normal", because latter calls isComment() and isString() and that leads to assert. M +1 -0 part/script/data/indentation/cppstyle.js M +2 -1 part/syntax/data/cpp.xml M +2 -1 part/syntax/data/isocpp.xml http://commits.kde.org/kate/0b05dbdd0cef249a5ac551ad33edb2335ab0b607 *** Bug 328271 has been marked as a duplicate of this bug. *** *** Bug 334248 has been marked as a duplicate of this bug. *** Git commit ff973d7f15a078759599c66d4c4731dbb455449d by Dominik Haumann, on behalf of Alex Turbov. Committed on 13/05/2014 at 21:23. Pushed by dhaumann into branch 'KDE/4.13'. add "style" attribute to C++ syntax files, so C++ indenter will be disabled backport: when mode set to "Normal", because latter calls isComment() and isString() and that leads to assert. @Alex: Hope I backported this correctly. CCMAIL: i.zaufi@gmail.com M +1 -0 part/script/data/indentation/cppstyle.js M +1 -0 part/syntax/data/cpp.xml http://commits.kde.org/kate/ff973d7f15a078759599c66d4c4731dbb455449d Still missing: proper port to ktexteditor.git. *** Bug 335368 has been marked as a duplicate of this bug. *** |