Bug 465345

Summary: Kate Freezes when I go into 'vi-mode' and then do a search and type in the Dollar sign: $
Product: [Applications] kate Reporter: Zubin Singh Parihar <zparihar>
Component: Vi Input ModeAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: major CC: christoph, inb-bugzilla-1e1cff
Priority: NOR    
Version First Reported In: 21.12.3   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Zubin Singh Parihar 2023-02-05 22:59:11 UTC
SUMMARY
Kate Freezes when I go into 'vi-mode' and then do a search and type in the Dollar sign:  $


STEPS TO REPRODUCE
1.  Open a text file in 'kate'
2.  Change the Input Modes to 'vi-mode'
Click 'Edit' --> 'Input Modes' --> 'vi-mode'

(this allows kate to act like a vim editor - this is where the bug is)

3.  Make sure you are not in Insert mode 
(you can press 'esc' to ensure you are not in Insert mode)

4.  Do a search using the vim shortcut '/'

5.  Now immediately type the dollar sign: '$'

At this point, the kate editor freezes and starts leaking memory like a mofo!!!


(alternatively you could also click 'Edit --> Find' or 'Ctrl + F' while in 'vi-mode' and it does the same thing)



OBSERVED RESULT
a. Kate freezes
b. When i run 'top' I see the Memory being used by Kate increasing very rapidly


EXPECTED RESULT
a. Kate should be able to search for the '$' string


SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  Kubuntu 22.04.1 LTS
(available in About System)
KDE Plasma Version: 5.24.7
KDE Frameworks Version:  5.92.0
Qt Version: 5.15.3

KATE Version: 21.12.3

ADDITIONAL INFORMATION
Linux Kernel 5.15.0-58-generic
Comment 1 Ben Bonacci 2023-02-12 02:22:10 UTC
I'm using Kate with version 22.12.2 and I couldn't reproduce the issue, so I'm assuming this bug got fixed in a later version. Until the package in the Ubuntu jammy repositories gets updated, you may want to try out the AppImage or Snap package for Kate in the meantime.