Public bug reported:

Kate crashed when entering Vi mode on Kubnutu 26.04. I don't remember
this happening in 24.04.

I encountered the crash while trying to extract a column from text.

# Steps

1. Create a Untitled document
2. Paste at least one long line e.g. `Get:1 http://ddebs.ubuntu.com 
resolute/universe amd64 libkf6texteditor6-dbgsym amd64 6.24.0-0ubuntu1 [32.1 
MB]` without backticks. It doesn't happen with short lines like "Hello"
3. Press Ctrl+Alt+V or the shortcut to enter Vi mode

$ lsb_release -rd
Description:    Ubuntu 26.04 LTS
Release:        26.04

$ apt-cache policy kate
kate:
  Installed: 4:25.12.3-0ubuntu1
  Candidate: 4:25.12.3-0ubuntu1
  Version table:
 *** 4:25.12.3-0ubuntu1 500
        500 https://gpl.savoirfairelinux.net/pub/mirrors/ubuntu 
resolute/universe amd64 Packages
        100 /var/lib/dpkg/status
$ apt-cache policy libkf6texteditor6
libkf6texteditor6:
  Installed: 6.24.0-0ubuntu1
  Candidate: 6.24.0-0ubuntu1
  Version table:
 *** 6.24.0-0ubuntu1 500
        500 https://gpl.savoirfairelinux.net/pub/mirrors/ubuntu 
resolute/universe amd64 Packages
        100 /var/lib/dpkg/status

# Expected behavior

It should not crash

# Actual behavior


```console
$ gdb --args kate -b
GNU gdb (Ubuntu 17.1-2ubuntu1) 17.1
Copyright (C) 2025 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from kate...

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.ubuntu.com>
Enable debuginfod for this session? (y or [n]) n
Debuginfod has been disabled.
To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.
(No debugging symbols found in kate)
(gdb) start
❌ Function "main" not defined.
Make breakpoint pending on future shared library load? (y or [n]) n
Starting program: /usr/bin/kate -b
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffec5ff6c0 (LWP 25475)]
[New Thread 0x7fffeaf586c0 (LWP 25476)]
[New Thread 0x7fffea7576c0 (LWP 25477)]
[New Thread 0x7fffe9bab6c0 (LWP 25478)]
[New Thread 0x7fffe8fff6c0 (LWP 25479)]
[New Thread 0x7fffcbfff6c0 (LWP 25480)]
[New Thread 0x7fffcb7fe6c0 (LWP 25481)]
[New Thread 0x7fffcaffd6c0 (LWP 25482)]
[New Thread 0x7fffca7fc6c0 (LWP 25483)]
[New Thread 0x7fffc9ffb6c0 (LWP 25484)]
[New Thread 0x7fffc97fa6c0 (LWP 25485)]
[New Thread 0x7fffc8ff96c0 (LWP 25486)]
[New Thread 0x7fffa7fff6c0 (LWP 25487)]
[New Thread 0x7fffa77fe6c0 (LWP 25488)]
[New Thread 0x7fffa6ffd6c0 (LWP 25489)]
[New Thread 0x7fffa67fc6c0 (LWP 25490)]
[Thread 0x7fffa67fc6c0 (LWP 25490) exited]
[Thread 0x7fffa6ffd6c0 (LWP 25489) exited]
[Thread 0x7fffa77fe6c0 (LWP 25488) exited]
[Thread 0x7fffa7fff6c0 (LWP 25487) exited]
[Thread 0x7fffc8ff96c0 (LWP 25486) exited]
[Thread 0x7fffc97fa6c0 (LWP 25485) exited]
[New Thread 0x7fffc97fa6c0 (LWP 25491)]
[New Thread 0x7fffc8ff96c0 (LWP 25492)]
[New Thread 0x7fffa7fff6c0 (LWP 25493)]
[New Thread 0x7fffa77fe6c0 (LWP 25494)]
[Detaching after vfork from child process 25501]
[Detaching after vfork from child process 25502]
[New Thread 0x7fffa69ff6c0 (LWP 25504)]
[Detaching after vfork from child process 25505]
[Detaching after vfork from child process 25506]
[New Thread 0x7fff96f1d6c0 (LWP 25507)]
[New Thread 0x7fff9671c6c0 (LWP 25508)]
[New Thread 0x7fff95f1b6c0 (LWP 25509)]
[New Thread 0x7fff9571a6c0 (LWP 25510)]
[New Thread 0x7fff94f196c0 (LWP 25513)]
[New Thread 0x7fff83fff6c0 (LWP 25514)]
[New Thread 0x7fff837fe6c0 (LWP 25515)]
[New Thread 0x7fff82ffd6c0 (LWP 25516)]

Thread 1 "kate" received signal SIGSEGV, Segmentation fault.
0x00007ffff6adbfb3 in QTextLine::width() const () from 
/usr/lib/x86_64-linux-gnu/libQt6Gui.so.6
(gdb) bt
#0  0x00007ffff6adbfb3 in QTextLine::width() const () at 
/usr/lib/x86_64-linux-gnu/libQt6Gui.so.6
#1  0x00007ffff5597256 in KateRenderer::cursorToX(KateTextLayout const&, 
KTextEditor::Cursor, bool) const [clone .isra.0]
    (this=this@entry=0x55555740c190, range=..., 
returnPastLine=returnPastLine@entry=false, pos=...) at 
/usr/src/kf6-ktexteditor-6.24.0-0ubuntu1/src/render/katerenderer.cpp:1374
#2  0x00007ffff5627801 in KateViewInternal::updateCursor (this=0x555556ffda60, 
newCursor=..., force=<optimized out>, center=true, calledExternally=true, 
scroll=<optimized out>)
    at 
/usr/src/kf6-ktexteditor-6.24.0-0ubuntu1/src/view/kateviewinternal.cpp:2672
#3  0x00007ffff55f05ea in KTextEditor::ViewPrivate::setCursorPositionInternal 
(this=0x5555573c1a50, position=..., calledExternally=<optimized out>)
    at /usr/src/kf6-ktexteditor-6.24.0-0ubuntu1/src/view/kateview.cpp:1860
#4  0x00007ffff56cc477 in KateViInputMode::activate (this=0x555556b50940) at 
/usr/src/kf6-ktexteditor-6.24.0-0ubuntu1/src/inputmode/kateviinputmode.cpp:74
#5  0x00007ffff55f10cf in KTextEditor::ViewPrivate::setInputMode 
(this=0x5555573c1a50, mode=KTextEditor::View::ViInputMode, 
rememberInConfig=true)
    at /usr/src/kf6-ktexteditor-6.24.0-0ubuntu1/src/view/kateview.cpp:1670
#6  0x00007ffff61ea525 in ??? () at /usr/lib/x86_64-linux-gnu/libQt6Core.so.6
#7  0x00007ffff6b8f2ea in QAction::triggered(bool) () at 
/usr/lib/x86_64-linux-gnu/libQt6Gui.so.6
#8  0x00007ffff6b96bb1 in QAction::activate(QAction::ActionEvent) () at 
/usr/lib/x86_64-linux-gnu/libQt6Gui.so.6
#9  0x00007ffff6b96cf2 in QAction::event(QEvent*) () at 
/usr/lib/x86_64-linux-gnu/libQt6Gui.so.6
#10 0x00007ffff73a0b7f in QApplicationPrivate::notify_helper(QObject*, QEvent*) 
() at /usr/lib/x86_64-linux-gnu/libQt6Widgets.so.6
#11 0x00007ffff6190098 in QCoreApplication::notifyInternal2(QObject*, QEvent*) 
() at /usr/lib/x86_64-linux-gnu/libQt6Core.so.6
#12 0x00007ffff6bacc23 in QShortcutMap::dispatchEvent(QKeyEvent*) () at 
/usr/lib/x86_64-linux-gnu/libQt6Gui.so.6
#13 0x00007ffff6ba6d53 in QShortcutMap::tryShortcut(QKeyEvent*) () at 
/usr/lib/x86_64-linux-gnu/libQt6Gui.so.6
#14 0x00007ffff6841e32 in QWindowSystemInterface::handleShortcutEvent(QWindow*, 
unsigned long, int, QFlags<Qt::KeyboardModifier>, unsigned int, unsigned int, 
unsigned int, QString const&, bool, unsigned short) () at 
/usr/lib/x86_64-linux-gnu/libQt6Gui.so.6
#15 0x00007ffff67d787e in 
QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*)
 () at /usr/lib/x86_64-linux-gnu/libQt6Gui.so.6
#16 0x00007ffff683a2dc in 
QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>)
 () at /usr/lib/x86_64-linux-gnu/libQt6Gui.so.6
#17 0x00007ffff6c826c4 in ??? () at /usr/lib/x86_64-linux-gnu/libQt6Gui.so.6
#18 0x00007ffff48d1b9b in ??? () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007ffff48d31d7 in ??? () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007ffff48d33c3 in g_main_context_iteration () at 
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007ffff640513d in 
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () 
at /usr/lib/x86_64-linux-gnu/libQt6Core.so.6
#22 0x00007ffff6198f5b in 
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at 
/usr/lib/x86_64-linux-gnu/libQt6Core.so.6
#23 0x00007ffff6192c87 in QCoreApplication::exec() () at 
/usr/lib/x86_64-linux-gnu/libQt6Core.so.6
#24 0x000055555555fa5c in ??? ()
#25 0x00007ffff582a601 in __libc_start_call_main 
(main=main@entry=0x55555555cf10, argc=argc@entry=2, 
argv=argv@entry=0x7fffffffd878) at ../sysdeps/nptl/libc_start_call_main.h:59
#26 0x00007ffff582a718 in __libc_start_main_impl
    (main=0x55555555cf10, argc=2, argv=0x7fffffffd878, init=<optimized out>, 
fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd868) at 
../csu/libc-start.c:360
#27 0x0000555555561945 in ??? ()
(gdb)
```

ProblemType: Bug
DistroRelease: Ubuntu 26.04
Package: kate 4:25.12.3-0ubuntu1
ProcVersionSignature: Ubuntu 7.0.0-28.28-generic 7.0.12
Uname: Linux 7.0.0-28-generic x86_64
ApportVersion: 2.34.0-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: KDE
Date: Tue Jul 21 09:38:47 2026
InstallationDate: Installed on 2022-11-05 (1354 days ago)
InstallationMedia: Ubuntu 22.10 "Kinetic Kudu" - Release amd64 (20221020)
SourcePackage: kate
UpgradeStatus: Upgraded to resolute on 2026-04-24 (89 days ago)

** Affects: kate (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug resolute third-party-packages wayland-session

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2161434

Title:
  Crash entering Vi mode with long lines

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/kate/+bug/2161434/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to