Bug 352585

Summary: Segfault on clicking folding-marker area with syntax highlighting enabled.
Product: [Applications] kate Reporter: pbs3141
Component: partAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: crash    
Priority: NOR    
Version: 5.0.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:

Description pbs3141 2015-09-11 19:47:17 UTC
Kate and kwrite both segfault on clicking the "code folding markers" area with syntax highlighting enabled - subject to certain other, seemingly arbitrary, conditions, which I have documented in the 'steps to reproduce' section

Reproducible: Always

Steps to Reproduce:
1. Open new instance of kwrite or kate.
2. Ensure that the "code folding markers" area is shown.
3. Change syntax highlighting to anything but 'None', e.g. 'C++'.
4. Click on the grey folding-marker area anywhere *below the last line* of text (i.e. the empty first line).

Actual Results:  
Crash! Segfault!

Expected Results:  
Nothing should happen.

- Segfault occurs in libKF5TextEditor.so.5.13.0, at KateBuffer::computeFoldingRangeForStartLine(int).
- This is probably the same crash as in bug 339894 but with different causes.

Some other notes:
- Step 2 is not optional; it won't crash without syntax highlighting enabled.
- The bug disappears after you have managed click the grey area once without a crash.
Comment 1 Dominik Haumann 2015-10-09 11:57:58 UTC
Fixed 5 days ago

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