Not sure where to post this, please move/delete if this is the wrong place.
I’ve encountered a reproducible crash using Kate 24.08.1 on Void Linux.
When pasting while in insert/overtype mode, if new lines need to be created, while the cursor is on the first character of a line, the program crashes.
I’ve tried and failed to get a backtrace.
I’m running void linux, gdb says kate’s missing debug symbols, and trying to attach to the pid freezes the whole thing.
Being a relatively inexperienced user, I’m at the end of my wit.
Wanted to post a bug report, but don’t want to bug them with an incomplete useless one.
So I thought I’d still post here in case someone wants to test it, or help me file a proper one.
Hi - first thing’s first, major kudos for wanting to make sure a bug report is as helpful as possible! If you want to proceed down the debugging path, it might help to check out Void Linux’s information on debugging its packaged software: Repositories - Void Linux Handbook
Basically, to debug a program in a Void Linux package, you need to install the -dbg version of the package, then check for dependencies that might be needed to debug (that wouldn’t otherwise be needed to just run the finished/compiled executable) and install those.
Now, for what it’s worth, it might also be helpful to check and see if you can reproduce the crash on a fully up-to-date version of Kate - 24.08.1 isn’t extremely old, but it is a couple months old and two more bug-fix versions have been released since then, with 24.08.3 being the current one.
I’m neither a current nor former Void Linux user so I’m not as familiar myself, but I would guess that installing the Flatpak version of Kate would be the easiest way to get an up-to-date version to work with:
The crash is still present in the nightly build.
I also tried it on an endeavourOS (arch based) live usb, and it’s there too.
I installed the -dbg package and gdb can now read the symbols but I still can’t get a backtrace.
Here’s how it goes:
‘’’
$gdb kate
Reading symbols from kate…
Reading symbols from /usr/lib/debug//usr/bin/kate…
(gdb) run
Starting program: /usr/bin/kate
[Thread debugging using libthread_db enabled]
Using host libthread_db library “/usr/lib64/libthread_db.so.1”.
[Detaching after fork from child process 7746]
[Inferior 1 (process 7743) exited normally]
Here I crash the process
(gdb) backtrace
No stack.
(gdb)
‘’’
Running it with run --nofork doesn’t start the application at all.
I tried to follow the KDE debugging guide, but I think it assumes a level of computer literacy that I don’t have, and I see no obvious path to fill the gaps.
Do you have an idea where to go from here?
Should I just file the report without a backtrace?
Is it possible kate was still running in the background while you started GDB? In that case it may have just activated the existing instance and exited.
This is definitely pretty advanced stuff - as jbb said, double-check that Kate isn’t already running, but then also, I’ve had the same issue trying to use --nofork - instead, what worked for my machine was:
$ gdb kate
…
(gdb) set follow-fork-mode child
(gdb) run
For what it’s worth - I think it would be helpful if you’re able to get a backtrace, as I did what it sounds like you’re doing:
Have one more than one line’s worth of text in the clipboard
Press Insert to go into “OVERWRITE” mode
Go to the start of a line
Paste
And I can’t reproduce a crash by doing that, so there must be some combination of events that’s happening differently on your device somehow?
pasting will need to create new lines (exemple: the file currently has only tine lines, and I try to copy 5 lines from line 8).
(I hope I described it without ambiguity)
It’s possible that it’s device related but I think somehow unlikely, I tried different distros, and two computers (laptops) and still got the crash.
I tried ‘set follow-fork-mode child’ and got a backtrace:
“”"
Thread 2.1 “kate” received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffff102fd80 (LWP 3324)]
__pthread_kill_implementation (threadid=, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
warning: 44 ./nptl/pthread_kill.c: No such file or directory
(gdb) backtrace #0 __pthread_kill_implementation (threadid=, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44 #1 0x00007ffff5ea468f in __pthread_kill_internal (signo=6, threadid=) at ./nptl/pthread_kill.c:78 #2 0x00007ffff5e55822 in __GI_raise (sig=sig@entry=6) at …/sysdeps/posix/raise.c:26 #3 0x00007ffff5e3e4af in __GI_abort () at ./stdlib/abort.c:79 #4 0x00007ffff64b7c08 in qAbort() () from /usr/lib/libQt6Core.so.6 #5 0x00007ffff64f9400 in ?? () from /usr/lib/libQt6Core.so.6 #6 0x00007ffff64b8975 in QMessageLogger::fatal(char const*, …) const () from /usr/lib/libQt6Core.so.6 #7 0x00007ffff5aa6e86 in ?? () from /usr/lib/libKF6TextEditor.so.6 #8 0x00007ffff5aaa032 in Kate::TextBuffer::insertText(KTextEditor::Cursor, QString const&) () from /usr/lib/libKF6TextEditor.so.6 #9 0x00007ffff5b1d4fa in KTextEditor::DocumentPrivate::editInsertText(int, int, QString const&, bool) () from /usr/lib/libKF6TextEditor.so.6 #10 0x00007ffff5b1ee9d in KTextEditor::DocumentPrivate::insertText(KTextEditor::Cursor, QString const&, bool) () from /usr/lib/libKF6TextEditor.so.6 #11 0x00007ffff5b2671e in KTextEditor::DocumentPrivate::paste(KTextEditor::ViewPrivate*, QString const&) () from /usr/lib/libKF6TextEditor.so.6 #12 0x00007ffff5be3a53 in KTextEditor::ViewPrivate::paste(QString const*) () from /usr/lib/libKF6TextEditor.so.6 #13 0x00007ffff65b61ce in ?? () from /usr/lib/libQt6Core.so.6 #14 0x00007ffff70e5522 in QAction::triggered(bool) () from /usr/lib/libQt6Gui.so.6 #15 0x00007ffff70e7e91 in QAction::activate(QAction::ActionEvent) () from /usr/lib/libQt6Gui.so.6 #16 0x00007ffff70e8e90 in QAction::event(QEvent*) () from /usr/lib/libQt6Gui.so.6 #17 0x00007ffff7582231 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt6Widgets.so.6 #18 0x00007ffff65626d0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt6Core.so.6 #19 0x00007ffff70f7cbf in QShortcutMap::dispatchEvent(QKeyEvent*) () from /usr/lib/libQt6Gui.so.6 #20 0x00007ffff70f84a7 in QShortcutMap::tryShortcut(QKeyEvent*) () from /usr/lib/libQt6Gui.so.6 #21 0x00007ffff6e095b0 in QWindowSystemInterface::handleShortcutEvent(QWindow*, unsigned long, int, QFlagsQt::KeyboardModifier, unsigned int, unsigned int, unsigned int, QString const&, bool, unsigned short) () from /usr/lib/libQt6Gui.so.6 #22 0x00007ffff6dab102 in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) () from /usr/lib/libQt6Gui.so.6 #23 0x00007ffff6e0455c in QWindowSystemInterface::sendWindowSystemEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/libQt6Gui.so.6 #24 0x00007ffff0fce43a in ?? () from /usr/lib/qt6/plugins/platforms/…/…/…/…/lib/libQt6XcbQpa.so.6 #25 0x00007ffff4d5efe4 in ?? () from /usr/lib/libglib-2.0.so.0 #26 0x00007ffff4d620e7 in ?? () from /usr/lib/libglib-2.0.so.0 #27 0x00007ffff4d627cc in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #28 0x00007ffff67c133c in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/libQt6Core.so.6 #29 0x00007ffff656e173 in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/libQt6Core.so.6 #30 0x00007ffff6569f86 in QCoreApplication::exec() () from /usr/lib/libQt6Core.so.6 #31 0x000055555555b064 in main (argc=, argv=) at …/apps/kate/main.cpp:537
“”"
We can continue this here or I’ll file a bug report
Yep sounds like a crash report would help there - and I might be missing a step trying to reproduce, so if it’s possible to capture a screencast/screen recording of the exact steps using Spectacle, that might help make sure that others can reproduce too.