Bug 333517 - Kate crashes when you try to replace characters in large files
Summary: Kate crashes when you try to replace characters in large files
Status: RESOLVED FIXED
Alias: None
Product: frameworks-ktexteditor
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.53.0
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 343979 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-04-16 18:27 UTC by Jose
Modified: 2019-01-20 12:47 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.54.0


Attachments
A CSV file with lots of TABS characters (1.55 MB, application/zip)
2014-04-16 18:43 UTC, Jose
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jose 2014-04-16 18:27:22 UTC
If you try to replace all the TAB characters with a semicolon character, on a CSV file with 14 Mb of data and lots of TAB characters, it crashes.

Reproducible: Always

Steps to Reproduce:
1. Open a CSV file with 14 Mb of data and lots of TAB characters.
2. Try to replace all the TAB characters with semicolon characters.
3. Kate consumes all the memory and finally it crashes.
Actual Results:  
Kate consumes all the memory and finally it crashes. Consequently, the whole system became so slow that it seems to be frozen.

Expected Results:  
Kate replaces TAB characters with semicolons quickly.
Comment 1 Jose 2014-04-16 18:43:07 UTC
Created attachment 86130 [details]
A CSV file with lots of TABS characters
Comment 2 Christoph Feck 2014-05-04 18:38:49 UTC
Reproducible. There is no backtrace, because it is OOM killed eventually.
Comment 3 Dominik Haumann 2016-04-05 19:58:10 UTC
*** Bug 343979 has been marked as a duplicate of this bug. ***
Comment 4 Christoph Cullmann 2018-12-08 21:38:01 UTC
With this patch: https://phabricator.kde.org/D17441 at least with something below 3 GB it does work ;=)
Comment 5 Christoph Cullmann 2018-12-09 17:04:42 UTC
Git commit 2138e1d27c83eeaa8e9f12527cfdec84ccd37f60 by Christoph Cullmann.
Committed on 09/12/2018 at 17:02.
Pushed by cullmann into branch 'master'.

improve range handling, no allocations for common updates

CHANGELOG: Improve performance of small editing actions, e.g. fixing large replace all actions.

Differential Revision: https://phabricator.kde.org/D17441

M  +42   -21   src/buffer/katetextblock.cpp
M  +5    -0    src/buffer/katetextrange.cpp
M  +26   -2    src/buffer/katetextrange.h

https://commits.kde.org/ktexteditor/2138e1d27c83eeaa8e9f12527cfdec84ccd37f60
Comment 6 Christoph Cullmann 2019-01-20 12:47:52 UTC
Git commit 7cf6644e8017e6b04898f2d68a9db766d1d95f44 by Christoph Cullmann, on behalf of loh tar.
Committed on 20/01/2019 at 12:46.
Pushed by cullmann into branch 'master'.

SearchBar: Add Cancel button to stop long running tasks

Summary:
Without this patch could it happens that Kate run an almost endless S&R
job which could lead up to an unusable system due to a run out of memory
with no possibility to cancel the job other than kill Kate, See...
Related: bug 244424

Test Plan:
Before
{F6466371}

New waiting for action
{F6466378}

New while running job
{F6466380}

Reviewers: #ktexteditor, #vdg, cullmann

Reviewed By: #ktexteditor, cullmann

Subscribers: dhaumann, anthonyfieroni, brauch, cullmann, abetts, kwrite-devel, kde-frameworks-devel, #ktexteditor

Tags: #kate, #frameworks

Differential Revision: https://phabricator.kde.org/D17459

M  +144  -75   src/search/katesearchbar.cpp
M  +42   -7    src/search/katesearchbar.h
M  +170  -156  src/search/searchbarpower.ui

https://commits.kde.org/ktexteditor/7cf6644e8017e6b04898f2d68a9db766d1d95f44