Created attachment 168908 [details] Process 8633 (kate) of user 1000 dumped core. SUMMARY Kate will crash immediately when opening the file. Note that this file is not actually meant to be readable by Kate, but Dolphin identified it as a text file for me so I tried opening it. The "file" command identifies the file as an IFF file, it's from an old video game "Urban Assault". All the *.BAS files that come with this game seem to cause a crash, I have uploaded one that has a small filesize for testing. STEPS TO REPRODUCE 1. Try opening the file "xc.BAS" 2. Kate should crash OBSERVED RESULT Kate crashing. EXPECTED RESULT Kate not crashing and perhaps showing a warning that the file is not a text file. SOFTWARE/OS VERSIONS Linux: 6.8.6 KDE Plasma Version: 6.0.4 KDE Frameworks Version: 6.1.0 Qt Version: 6.7.0
Created attachment 168909 [details] An example of a file that's causing the crash
Git commit 990d5a34a699b61bbf321b4081afc9deb2f00f9b by Christoph Cullmann. Committed on 27/04/2024 at 18:42. Pushed by cullmann into branch 'master'. fix crashs and OOM on load with encoding failures Related: bug 486195 M +51 -0 autotests/src/katetextbuffertest.cpp M +1 -0 src/buffer/katetextloader.h https://invent.kde.org/frameworks/ktexteditor/-/commit/990d5a34a699b61bbf321b4081afc9deb2f00f9b
Thanks for the report, was easy to reproduce, fixed and added some test to avoid regressions.
*** Bug 486623 has been marked as a duplicate of this bug. ***
*** Bug 486762 has been marked as a duplicate of this bug. ***