Bug 497618 - Replacing newlines in Kate/Kwrite/KTextEditor is broken
Summary: Replacing newlines in Kate/Kwrite/KTextEditor is broken
Status: RESOLVED DUPLICATE of bug 494826
Alias: None
Product: kate
Classification: Applications
Component: kwrite (show other bugs)
Version: 24.12.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-17 18:02 UTC by Thomas Baag
Modified: 2024-12-17 18:07 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
kwrite crash backtrace (21.11 KB, text/plain)
2024-12-17 18:02 UTC, Thomas Baag
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Baag 2024-12-17 18:02:45 UTC
Created attachment 176715 [details]
kwrite crash backtrace

SUMMARY

Kate and Kwrite are crashing after using search/replace with "escape sequences" and replacing newlines. 

STEPS TO REPRODUCE
1. Open Kwrite
2. Hold down enter until you have like 200 lines
    (About two times the height of the screen in the scroll bar for me)
3. Press CTRL+R to open Replace widget
4. Set it to "Escape Sequences"
5. Search for "\n" and replace with "\t"

OBSERVED RESULT
It renders the replaced text and triggers a segmentation fault.

EXPECTED RESULT
It should just search and replace as it used to do back in the days and not crash afterwards.

SOFTWARE/OS VERSIONS
Operating System: NixOS 25.05
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.12.2-zen1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 1700X Eight-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2

ADDITIONAL INFORMATION
Backtrace attached
Comment 1 Thomas Baag 2024-12-17 18:06:23 UTC
When it crashes it always does in Kate::TextBlock::startLine.
Comment 2 Waqar Ahmed 2024-12-17 18:07:58 UTC

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