Bug 386112 - kate crashes on new line insert
Summary: kate crashes on new line insert
Status: RESOLVED DUPLICATE of bug 384404
Alias: None
Product: kate
Classification: Applications
Component: part (show other bugs)
Version: 17.04.1
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-23 14:49 UTC by Matteo Croce
Modified: 2017-11-05 11:04 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
minimal test case (19 bytes, text/x-csrc)
2017-10-23 14:49 UTC, Matteo Croce
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matteo Croce 2017-10-23 14:49:11 UTC
Created attachment 108525 [details]
minimal test case

kate crashes when creating a new line by pressing Enter.
Here is a minimal test case, adding a line after the last one makes it crash:

Thread 1 "kate" received signal SIGSEGV, Segmentation fault.
0x00007fffc5ed2ca6 in ?? ()
(gdb) bt
#0  0x00007fffc5ed2ca6 in  ()
#1  0x00007fffc3487510 in  ()
#2  0x0003200000000000 in  ()
#3  0x0000000000000000 in  ()
Comment 1 Matteo Croce 2017-10-23 15:55:38 UTC
Bug only happens when highlighting syntax is C
Comment 2 Lucas Vinicius Hartmann 2017-10-25 13:35:52 UTC
Confirmed on Kate 17.04.1, Fedora Linux 26 x86_64, but with different symptoms.

Loading the minimal test case I verified:

With syntax highlight and auto indent:
- Move the cursor to the end of lines 2 or 3 and hit enter: BUG.
- Move the cursor to the end of line 1 and hit enter: WORKS.
- Move the cursor to the middle of any line and hit enter: WORKS.

With NO syntax highlight, but with auto indent:
- Move the cursor to the end of lines 2 or 3 and hit enter: BUG.
- Move the cursor to the end of line 1 and hit enter: BUG.
- Move the cursor to the middle of any line and hit enter: WORKS.

With syntax highlight, NO auto indent:
- All cases WORK.

Similar effect on kdevelop, but I did not test so thoroughly.
Comment 3 Sven Brauch 2017-11-05 10:32:46 UTC
Update Qt to version 5.9+. KTextEditor 5.38 is broken with Qt 5.7 and 5.8.
Comment 4 Dominik Haumann 2017-11-05 11:04:59 UTC
This is a regression in the indentation in the KTextEditor framework 5.38 and 5.39. This regression was introduced since we switched from the Qt Script to the Qt QML javascript implementation. Unfortunately, the Qt QML implementation still had issues which we did not catch early enough.

The good news is that if you upgrade your Qt version to Qt >= 5.9.1, then this crash is fixed. A workaround will also be available with KDE Frameworks 5.40 which should prevent the crash.

Sorry for the inconvenience!

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