Created attachment 176065 [details] Screen recording showcasing the crash SUMMARY Kate crashes when pasting in overwrite mode (if pasting creates additional lines and the cursor is on the first character of a line) STEPS TO REPRODUCE 1. Open or create file using Kate 2. Copy several lines of text 3. Set Kate to Overwrite mode 4. Place the cursor on the first character of one of the last lines of the file 5. If pasting forces Kate to create additional lines, the program will crash OBSERVED RESULT Crash to desktop EXPECTED RESULT Pasting lines and not crashing to desktop SOFTWARE/OS VERSIONS Linux/KDE Plasma: KDE Plasma Version: 6.2.0 KDE Frameworks Version: 6.7.0 Qt Version: 6.7.2 X11 Reproduced it on two different Laptops, using Void Linux and EndeavourOS. The crash is present on Kate 24.08.1 and on the nightly Appimage (kate-master-8492-linux-gcc-x86_64.AppImage)
Can reproduce. Will take a look.
Git commit dee786898a0d6077884c3f4c425c923ceca0937e by Christoph Cullmann. Committed on 23/11/2024 at 17:52. Pushed by cullmann into branch 'master'. don't crash on insert at lastLine + 1 easy to trigger with overwrite paste M +19 -0 autotests/src/kateview_test.cpp M +1 -0 autotests/src/kateview_test.h M +1 -1 src/document/katedocument.cpp https://invent.kde.org/frameworks/ktexteditor/-/commit/dee786898a0d6077884c3f4c425c923ceca0937e
Thanks for the precise bug report, added a test, too, that we don't regress.