Summary: | Kate and KWrite both crash when editing a Javascript or CSS file | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-ktexteditor | Reporter: | Omar Plummer <omarplummer> |
Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED UPSTREAM | ||
Severity: | crash | CC: | andreluiztk875, cullmann, kde, kde, maarten, mwoehlke.floss, omarplummer, peter.ujfalusi, rdieter, rikmills, rjvbertin, rootkit85, s.wezel, simonandric5, swagfortress |
Priority: | VHI | Keywords: | drkonqi |
Version: | 5.37.0 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Omar Plummer
2017-09-05 23:03:52 UTC
Created upstream report https://bugreports.qt.io/browse/QTBUG-63045 I have a similar problem. It crashes when KateIndentScript::indent(KTextEditor::ViewPrivate*, KTextEditor::Cursor const&, QChar, int) is called corrupting the complete stacktrace. -> No useable information from gdb: #0 0x00007fffc8618c79 in ?? () #1 0x00007fffc7a5c510 in ?? () #2 0x0003200000000000 in ?? () #3 0x00007fffc7a5c3f8 in ?? () #4 0x8bd5bc327636e900 in ?? () #5 0x0000000000ebdcb0 in ?? () #6 0x00007fffc7a5c4b0 in ?? () #7 0x0000000000000000 in ?? () Via valgrind I got a better trace where the crash occurs: ==12345== at 0x301D0C79: ??? ==12345== by 0x87816E2: QV4::SimpleScriptFunction::call(QV4::Managed const*, QV4::CallData*) (in /usr/lib64/libQt5Qml.so.5.7.1) ==12345== by 0x87E4EAE: QV4::Runtime::callActivationProperty(QV4::ExecutionEngine*, int, QV4::CallData*) (in /usr/lib64/libQt5Qml.so.5.7.1) ==12345== by 0x301C49F1: ??? ==12345== by 0x87816E2: QV4::SimpleScriptFunction::call(QV4::Managed const*, QV4::CallData*) (in /usr/lib64/libQt5Qml.so.5.7.1) ==12345== by 0x87E4EAE: QV4::Runtime::callActivationProperty(QV4::ExecutionEngine*, int, QV4::CallData*) (in /usr/lib64/libQt5Qml.so.5.7.1) ==12345== by 0x21D59DA0: ??? ==12345== by 0x87816E2: QV4::SimpleScriptFunction::call(QV4::Managed const*, QV4::CallData*) (in /usr/lib64/libQt5Qml.so.5.7.1) ==12345== by 0x86E639C: QJSValue::call(QList<QJSValue> const&) (in /usr/lib64/libQt5Qml.so.5.7.1) ==12345== by 0x4F6976C: KateIndentScript::indent(KTextEditor::ViewPrivate*, KTextEditor::Cursor const&, QChar, int) (in /usr/lib64/libKF5TextEditor.so.5.38.0) ==12345== by 0x502B01D: KateAutoIndent::scriptIndent(KTextEditor::ViewPrivate*, KTextEditor::Cursor const&, QChar) (in /usr/lib64/libKF5TextEditor.so.5.38.0) ==12345== by 0x502C049: KateAutoIndent::userTypedChar(KTextEditor::ViewPrivate*, KTextEditor::Cursor const&, QChar) (in /usr/lib64/libKF5TextEditor.so.5.38.0) When reverting back to frameworks 5.37 the crash is gone It seems to be a bug in ktexteditor introduced in frameworks 5.38 Or it triggers an bug in Qt5 (QML component) System information: Application: kwrite (17.08.1) (Compiled from sources) Qt Version: 5.7.1 Frameworks Version: 5.38.0 Operating System: Linux 4.12.10-gentoo x86_64 Distribution: "NAME=Gentoo" I too am experiencing this bug when editing JavaScript in Kate with KTextEditor 5.38.0. I seem to be able to work around the bug by setting the indentation mode to "Normal" rather than "C Style," though this of course results in a degraded user experience. It crashes here regardless of what I have the indentation mode set to, even "None". Just ran into this as well -> marking as confirmed. :( Thanks for providing the infos in the upstream bug. Seeing this with backtrace as given in comment #2 in Kubuntu backports PPA for Zesty 17.04 with ktexteditor version 5.38 and Qt 5.7.1 Bug: https://bugs.launchpad.net/kubuntu-ppa/+bug/1718659 So far on brief testing, 5.38 with Qt 5.9.1 on Kubuntu 17.10 archive packages seem unaffected. I can confirm with Qt 5.9.1 the error is gone. Seems to be a problem in the QtQml component of older Qt 5 versions The issue is gone for me as well with Qt 5.9.2. *** Bug 385398 has been marked as a duplicate of this bug. *** Ouch, I'm stuck on Qt 5.8 for the time being. Do we know anything that would allow backporting the fix from 5.9? For anyone else affected by this: I've attached a patch that reverts KTextEditor to use QtScript here: https://bugs.kde.org/show_bug.cgi?id=385413 . Tweaking the function that triggers the bug would be more elegant of course, fixing older Qt versions even more (but hopeless as far as I can tell). You can try using the 5.8 branch. It has several bug-fixes that never got released as 5.8.1 was cancelled. This looks promising: https://codereview.qt-project.org/#/c/184564/ It certainly looks promising, but what makes you think it's related? Anyway, I'll try 5.8/head (i.e. all patches from v5.8.0..HEAD) and see what comes out of that. I already tried to cherry-pick some changes I found in the 5.9 branch but was so focussed on 5.9 it didn't occur to me to try just the latest 5.8 version. OK, so 184564 alone is not a fix. And applying all patches from the 5.8 branch head breaks the build at least in the aggregate source tree. Something about a change related to qml-debug in the configure (qmake) step. *** Bug 385399 has been marked as a duplicate of this bug. *** *** Bug 386394 has been marked as a duplicate of this bug. *** *** Bug 386050 has been marked as a duplicate of this bug. *** *** Bug 385117 has been marked as a duplicate of this bug. *** *** Bug 386112 has been marked as a duplicate of this bug. *** *** Bug 386064 has been marked as a duplicate of this bug. *** |