Bug 386394 - Crash in auto-indenter
Summary: Crash in auto-indenter
Status: RESOLVED DUPLICATE of bug 384404
Alias: None
Product: frameworks-ktexteditor
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.38.0
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-31 18:16 UTC by Matthew Woehlke
Modified: 2017-11-09 15:59 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Woehlke 2017-10-31 18:16:14 UTC
I'm experiencing a reproducible crash when trying to edit a Javascript file. GDB and the bug reporting wizard are having problems generating a stack trace. Valgrind reports:

    ==4284== Invalid read of size 8
    ==4284==    at 0x35816C79: ???
    ==4284==    by 0xA387305: ??? (in /usr/lib64/libQt5Qml.so.5.7.1)
    ==4284==    by 0xA3EF7D6: QV4::Runtime::callActivationProperty(QV4::ExecutionEngine*, int, QV4::CallData*) (in /usr/lib64/libQt5Qml.so.5.7.1)
    ==4284==    by 0x2F6CA9F1: ???
    ==4284==    by 0xA387305: ??? (in /usr/lib64/libQt5Qml.so.5.7.1)
    ==4284==    by 0xA3EF7D6: QV4::Runtime::callActivationProperty(QV4::ExecutionEngine*, int, QV4::CallData*) (in /usr/lib64/libQt5Qml.so.5.7.1)
    ==4284==    by 0x2F6C9DA0: ???
    ==4284==    by 0xA387305: ??? (in /usr/lib64/libQt5Qml.so.5.7.1)
    ==4284==    by 0xA2ED235: QJSValue::call(QList<QJSValue> const&) (in /usr/lib64/libQt5Qml.so.5.7.1)
    ==4284==    by 0x4F67E2D: KateIndentScript::indent(KTextEditor::ViewPrivate*, KTextEditor::Cursor const&, QChar, int) (kateindentscript.cpp:75)
    ==4284==    by 0x50258BD: KateAutoIndent::scriptIndent(KTextEditor::ViewPrivate*, KTextEditor::Cursor const&, QChar) (kateautoindent.cpp:278)
    ==4284==    by 0x5026935: KateAutoIndent::userTypedChar(KTextEditor::ViewPrivate*, KTextEditor::Cursor const&, QChar) (kateautoindent.cpp:453)
    ==4284==  Address 0xb5bd04d8 is not stack'd, malloc'd or (recently) free'd

To reproduce:

- Open https://raw.githubusercontent.com/Kitware/vaui/84ba21ecce5fb64388b1510b50c8cbb8c9bda3e1/web_external/Viewer/ImageViewerWidgetWrapper/VauiGeoJSImageViewer.js
- Move the caret to the end of line 36 (`var pendingNext = false;`)
- Press enter

Curiously, if I paste the file contents into an empty document and set HL to 'javascript', no crash...
Comment 1 Rex Dieter 2017-11-02 18:33:24 UTC
Likely a dup of bug #384404

(I'll mark it as such, holler and/or re-open if anyone feels otherwise)

*** This bug has been marked as a duplicate of bug 384404 ***