Bug 483363 - Kate has crashed after using rename (F2) context menu option
Summary: Kate has crashed after using rename (F2) context menu option
Status: REOPENED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 24.02.0
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords: drkonqi, qt6
Depends on:
Blocks:
 
Reported: 2024-03-12 17:54 UTC by rjx_
Modified: 2024-04-16 04:16 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
screenshot (21.77 KB, image/png)
2024-03-12 17:57 UTC, rjx_
Details
a test python script (1.67 KB, text/x-python)
2024-03-23 17:43 UTC, rjx_
Details
a new crash dump (45.17 KB, text/vnd.kde.kcrash-report)
2024-03-23 17:44 UTC, rjx_
Details
a different dump (22.80 KB, text/vnd.kde.kcrash-report)
2024-03-23 17:46 UTC, rjx_
Details
faulty katerc (5.97 KB, text/plain)
2024-03-31 08:38 UTC, rjx_
Details
crash dump kf 6.1 + patch (60.03 KB, text/vnd.kde.kcrash-report)
2024-04-16 04:15 UTC, rjx_
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rjx_ 2024-03-12 17:54:55 UTC
Application: kate (24.02.0)

Qt Version: 6.6.2
Frameworks Version: 6.0.0
Operating System: Linux 6.7.9-zen1-1-zen x86_64
Windowing System: Wayland
Distribution: Arch Linux
DrKonqi: 6.0.1 [CoredumpBackend]

-- Information about the crash:
I was simply trying to rename two (selected) instances of a variable/argument in a python script, but after clicking OK kate crashed.
Additional info: i have python LSP and Build & Run plugins loaded, if that matters.

The reporter is unsure if this crash is reproducible.

-- Backtrace:
Application: Kate (kate), signal: Aborted
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = <optimized out>}
Downloading separate debug info for /usr/bin/kate...
[New LWP 23838]
[New LWP 23840]
[New LWP 23839]
[New LWP 23843]
[New LWP 23841]
[New LWP 23842]
Downloading separate debug info for /usr/lib/libkateprivate.so.24.02.0...
Downloading separate debug info for /usr/lib/libb2.so.1...
Downloading separate debug info for /usr/lib/liblzma.so.5...
Downloading separate debug info for /usr/lib/libplist-2.0.so.4...
Downloading separate debug info for /usr/lib/libpsl.so.5...
Downloading separate debug info for /usr/lib/libvorbisfile.so.3...
Downloading separate debug info for /usr/lib/libunistring.so.5...
Downloading separate debug info for /usr/lib/libvorbis.so.0...
Downloading separate debug info for /usr/lib/libogg.so.0...
Downloading separate debug info for /usr/lib/libvorbisenc.so.2...
Downloading separate debug info for /usr/lib/libhunspell-1.7.so.0...
Downloading separate debug info for /usr/lib/qt6/plugins/kf6/ktexteditor/katesearchplugin.so...
Downloading separate debug info for /usr/lib/qt6/plugins/kf6/ktexteditor/externaltoolsplugin.so...
Downloading separate debug info for /usr/lib/qt6/plugins/kf6/ktexteditor/katekonsoleplugin.so...
Downloading separate debug info for /usr/lib/qt6/plugins/kf6/ktexteditor/lspclientplugin.so...
Downloading separate debug info for /usr/lib/qt6/plugins/kf6/ktexteditor/tabswitcherplugin.so...
Downloading separate debug info for /usr/lib/qt6/plugins/kf6/ktexteditor/textfilterplugin.so...
Downloading separate debug info for /usr/lib/qt6/plugins/kf6/ktexteditor/katebuildplugin.so...
Downloading separate debug info for /usr/lib/qt6/plugins/kf6/ktexteditor/katexmltoolsplugin.so...
Downloading separate debug info for /usr/lib/libdeflate.so.0...
Downloading separate debug info for /usr/lib/qt6/plugins/imageformats/../../../libmng.so.2...
Downloading separate debug info for /usr/lib/libKF6NewStuffWidgets.so.6...
Downloading separate debug info for /usr/lib/qt6/plugins/kf6/kwindowsystem/KF6WindowSystemKWaylandPlugin.so...
Downloading separate debug info for system-supplied DSO at 0x7ffefe5dc000...
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `/usr/bin/kate -b --tempfile'.
Program terminated with signal SIGABRT, Aborted.
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
44	      return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
[Current thread is 1 (Thread 0x7c033b638e80 (LWP 23838))]

Cannot QML trace cores :(
Downloading source file /usr/src/debug/kate/kate-24.02.0/apps/kate/main.cpp...
Downloading source file /usr/src/debug/kate/kate-24.02.0/addons/lspclient/lspclientserver.cpp...
Downloading source file /usr/src/debug/kate/kate-24.02.0/addons/lspclient/lspclientpluginview.cpp...
Downloading source file /usr/src/debug/kate/kate-24.02.0/addons/lspclient/lspclientutils.cpp...
Downloading source file /usr/src/debug/ktexteditor/ktexteditor-6.0.0/src/utils/document.cpp...
Downloading source file /usr/src/debug/ktexteditor/ktexteditor-6.0.0/src/document/katedocument.cpp...
Downloading source file /usr/src/debug/ktexteditor/ktexteditor-6.0.0/src/view/kateview.cpp...
Downloading source file /usr/src/debug/ktexteditor/ktexteditor-6.0.0/src/view/kateviewinternal.cpp...
Downloading source file /usr/src/debug/ktexteditor/ktexteditor-6.0.0/src/render/katelayoutcache.cpp...
Downloading source file /usr/src/debug/ktexteditor/ktexteditor-6.0.0/src/render/katelinelayout.h...
Downloading source file /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/gui/text/qtextlayout.cpp...
Downloading source file /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/gui/text/qtextengine.cpp...
Downloading source file /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/gui/text/qtextengine_p.h...
Downloading source file /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/tools/qscopedpointer.h...
Downloading source file /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/gui/text/qtextformat.cpp...
Downloading source file /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/tools/qlist.h...
Downloading source file /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/tools/qarraydatapointer.h...
Downloading source file /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/tools/qarraydataops.h...
Downloading source file /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/tools/qshareddata.h...
Downloading source file /usr/src/debug/glibc/glibc/malloc/malloc.c...
Downloading source file /usr/src/debug/glibc/glibc/libio/../sysdeps/posix/libc_fatal.c...
[Current thread is 1 (Thread 0x7c033b638e80 (LWP 23838))]

Thread 6 (Thread 0x7c0331a006c0 (LWP 23842)):
#0  0x00007c0340ea5ebe in __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x63c097ecc898) at futex-internal.c:57
#1  __futex_abstimed_wait_common (futex_word=futex_word@entry=0x63c097ecc898, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0, cancel=cancel@entry=true) at futex-internal.c:87
#2  0x00007c0340ea5f3f in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x63c097ecc898, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at futex-internal.c:139
#3  0x00007c0340ea8750 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x63c097ecc840, cond=0x63c097ecc870) at pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x63c097ecc870, mutex=0x63c097ecc840) at pthread_cond_wait.c:618
#5  0x00007c0331c8685c in cnd_wait () at ../mesa-24.0.2/src/c11/impl/threads_posix.c:135
#6  util_queue_thread_func () at ../mesa-24.0.2/src/util/u_queue.c:290
#7  0x00007c0331c9e82c in impl_thrd_routine () at ../mesa-24.0.2/src/c11/impl/threads_posix.c:67
#8  0x00007c0340ea955a in start_thread (arg=<optimized out>) at pthread_create.c:447
#9  0x00007c0340f26a3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

Thread 5 (Thread 0x7c0338a006c0 (LWP 23841)):
#0  0x00007c0340f190bf in __GI___poll (fds=fds@entry=0x7c03389ffb70, nfds=nfds@entry=2, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007c033c153b18 in poll (__timeout=-1, __nfds=2, __fds=0x7c03389ffb70) at /usr/include/bits/poll2.h:39
#2  QtWaylandClient::EventThread::run (this=0x63c097df8600) at /usr/src/debug/qt6-wayland/qtwayland-everywhere-src-6.6.2/src/client/qwaylanddisplay.cpp:184
#3  0x00007c03416a0bd3 in operator() (__closure=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/thread/qthread_unix.cpp:324
#4  (anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > (t=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/thread/qthread_unix.cpp:260
#5  QThreadPrivate::start (arg=0x63c097df8600) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/thread/qthread_unix.cpp:283
#6  0x00007c0340ea955a in start_thread (arg=<optimized out>) at pthread_create.c:447
#7  0x00007c0340f26a3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

Thread 4 (Thread 0x7c03310006c0 (LWP 23843)):
#0  0x00007c0340ea5ebe in __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x63c097eb42e0) at futex-internal.c:57
#1  __futex_abstimed_wait_common (futex_word=futex_word@entry=0x63c097eb42e0, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0, cancel=cancel@entry=true) at futex-internal.c:87
#2  0x00007c0340ea5f3f in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x63c097eb42e0, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at futex-internal.c:139
#3  0x00007c0340ea8750 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x63c097eb4288, cond=0x63c097eb42b8) at pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x63c097eb42b8, mutex=0x63c097eb4288) at pthread_cond_wait.c:618
#5  0x00007c0331c8685c in cnd_wait () at ../mesa-24.0.2/src/c11/impl/threads_posix.c:135
#6  util_queue_thread_func () at ../mesa-24.0.2/src/util/u_queue.c:290
#7  0x00007c0331c9e82c in impl_thrd_routine () at ../mesa-24.0.2/src/c11/impl/threads_posix.c:67
#8  0x00007c0340ea955a in start_thread (arg=<optimized out>) at pthread_create.c:447
#9  0x00007c0340f26a3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

Thread 3 (Thread 0x7c033aa006c0 (LWP 23839)):
#0  0x00007c0340f190bf in __GI___poll (fds=0x63c097d5e4b0, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007c033f96c2f6 in g_main_context_poll_unlocked (priority=2147483647, n_fds=2, fds=0x63c097d5e4b0, timeout=<optimized out>, context=0x7c0334000c80) at ../glib/glib/gmain.c:4653
#2  g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x7c0334000c80, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4344
#3  0x00007c033f90c162 in g_main_context_iteration (context=0x7c0334000c80, may_block=1) at ../glib/glib/gmain.c:4414
#4  0x00007c03417739c4 in QEventDispatcherGlib::processEvents (this=0x7c0334000b70, flags=...) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventdispatcher_glib.cpp:393
#5  0x00007c0341543d6e in QEventLoop::processEvents (flags=..., this=0x7c033a9ffb30) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventloop.cpp:100
#6  QEventLoop::exec (this=0x7c033a9ffb30, flags=...) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventloop.cpp:182
#7  0x00007c034162106f in QThread::exec (this=this@entry=0x7c0342471b80 <_ZZN13QGlobalStaticIN14QtGlobalStatic6HolderIN12_GLOBAL__N_116Q_QGS__q_managerEEEE8instanceEvE6holder.lto_priv.0>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/global/qflags.h:74
#8  0x00007c03423e99df in QDBusConnectionManager::run (this=0x7c0342471b80 <_ZZN13QGlobalStaticIN14QtGlobalStatic6HolderIN12_GLOBAL__N_116Q_QGS__q_managerEEEE8instanceEvE6holder.lto_priv.0>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/dbus/qdbusconnection.cpp:131
#9  0x00007c03416a0bd3 in operator() (__closure=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/thread/qthread_unix.cpp:324
#10 (anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > (t=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/thread/qthread_unix.cpp:260
#11 QThreadPrivate::start (arg=0x7c0342471b80 <_ZZN13QGlobalStaticIN14QtGlobalStatic6HolderIN12_GLOBAL__N_116Q_QGS__q_managerEEEE8instanceEvE6holder.lto_priv.0>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/thread/qthread_unix.cpp:283
#12 0x00007c0340ea955a in start_thread (arg=<optimized out>) at pthread_create.c:447
#13 0x00007c0340f26a3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

Thread 2 (Thread 0x7c03394006c0 (LWP 23840)):
#0  0x00007c0340ea5ebe in __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x63c097dd48c0) at futex-internal.c:57
#1  __futex_abstimed_wait_common (futex_word=futex_word@entry=0x63c097dd48c0, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0, cancel=cancel@entry=true) at futex-internal.c:87
#2  0x00007c0340ea5f3f in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x63c097dd48c0, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at futex-internal.c:139
#3  0x00007c0340ea8750 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x63c097dd4870, cond=0x63c097dd4898) at pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x63c097dd4898, mutex=0x63c097dd4870) at pthread_cond_wait.c:618
#5  0x00007c03416a3c10 in QWaitConditionPrivate::wait (deadline=..., this=0x63c097dd4870) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/thread/qwaitcondition_unix.cpp:103
#6  QWaitCondition::wait (this=this@entry=0x63c097d5e690, mutex=mutex@entry=0x63c097d5e688, deadline=...) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/thread/qwaitcondition_unix.cpp:181
#7  0x00007c033c153a98 in QtWaylandClient::EventThread::waitForReading (this=0x63c097d5e650) at /usr/src/debug/qt6-wayland/qtwayland-everywhere-src-6.6.2/src/client/qwaylanddisplay.cpp:218
#8  QtWaylandClient::EventThread::run (this=0x63c097d5e650) at /usr/src/debug/qt6-wayland/qtwayland-everywhere-src-6.6.2/src/client/qwaylanddisplay.cpp:179
#9  0x00007c03416a0bd3 in operator() (__closure=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/thread/qthread_unix.cpp:324
#10 (anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > (t=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/thread/qthread_unix.cpp:260
#11 QThreadPrivate::start (arg=0x63c097d5e650) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/thread/qthread_unix.cpp:283
#12 0x00007c0340ea955a in start_thread (arg=<optimized out>) at pthread_create.c:447
#13 0x00007c0340f26a3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

Thread 1 (Thread 0x7c033b638e80 (LWP 23838)):
[KCrash Handler]
#5  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#6  0x00007c0340eab393 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#7  0x00007c0340e5a6c8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#8  0x00007c0340e424b8 in __GI_abort () at abort.c:79
#9  0x00007c0340e43395 in __libc_message_impl (fmt=fmt@entry=0x7c0340fbb2ea "%s\n") at ../sysdeps/posix/libc_fatal.c:132
#10 0x00007c0340eb52a7 in malloc_printerr (str=str@entry=0x7c0340fbe4b0 "free(): invalid next size (normal)") at malloc.c:5772
#11 0x00007c0340eb733c in _int_free_merge_chunk (av=av@entry=0x7c0340ff6ac0 <main_arena>, p=0x63c099846170, size=224) at malloc.c:4684
#12 0x00007c0340eb7669 in _int_free (av=0x7c0340ff6ac0 <main_arena>, p=<optimized out>, have_lock=<optimized out>, have_lock@entry=0) at malloc.c:4646
#13 0x00007c0340eb9e93 in __GI___libc_free (mem=<optimized out>) at malloc.c:3398
#14 0x00007c0341e2c8a5 in QArrayDataPointer<(anonymous namespace)::Property>::~QArrayDataPointer (this=0x63c0990d8628, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/tools/qarraydatapointer.h:104
#15 QArrayDataPointer<(anonymous namespace)::Property>::~QArrayDataPointer (this=0x63c0990d8628, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/tools/qarraydatapointer.h:100
#16 QList<(anonymous namespace)::Property>::~QList (this=0x63c0990d8628, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/tools/qlist.h:70
#17 QTextFormatPrivate::~QTextFormatPrivate (this=0x63c0990d8620, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/gui/text/qtextformat.cpp:146
#18 QSharedDataPointer<QTextFormatPrivate>::~QSharedDataPointer (this=0x63c09961e120, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/tools/qshareddata.h:56
#19 QSharedDataPointer<QTextFormatPrivate>::~QSharedDataPointer (this=0x63c09961e120, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/tools/qshareddata.h:56
#20 QTextFormat::~QTextFormat (this=0x63c09961e120, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/gui/text/qtextformat.cpp:924
#21 std::_Destroy<QTextFormat> (__pointer=0x63c09961e120) at /usr/include/c++/13.2.1/bits/stl_construct.h:151
#22 std::_Destroy_aux<false>::__destroy<QTextFormat*> (__last=0x63c09961e160, __first=0x63c09961e120) at /usr/include/c++/13.2.1/bits/stl_construct.h:163
#23 std::_Destroy<QTextFormat*> (__last=0x63c09961e160, __first=<optimized out>) at /usr/include/c++/13.2.1/bits/stl_construct.h:196
#24 std::destroy<QTextFormat*> (__last=0x63c09961e160, __first=<optimized out>) at /usr/include/c++/13.2.1/bits/stl_construct.h:253
#25 QtPrivate::QGenericArrayOps<QTextFormat>::destroyAll (this=0x63c099825a40) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/tools/qarraydataops.h:397
#26 QArrayDataPointer<QTextFormat>::~QArrayDataPointer (this=0x63c099825a40, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/tools/qarraydatapointer.h:103
#27 QArrayDataPointer<QTextFormat>::~QArrayDataPointer (this=0x63c099825a40, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/tools/qarraydatapointer.h:100
#28 QList<QTextFormat>::~QList (this=0x63c099825a40, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/tools/qlist.h:70
#29 QTextFormatCollection::~QTextFormatCollection (this=0x63c099825a40, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/gui/text/qtextformat.cpp:3949
#30 0x00007c0341e1ac12 in QScopedPointerDeleter<QTextFormatCollection>::cleanup (pointer=0x63c099825a40) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/tools/qscopedpointer.h:16
#31 QScopedPointer<QTextFormatCollection, QScopedPointerDeleter<QTextFormatCollection> >::~QScopedPointer (this=0x63c09985aaf0, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/tools/qscopedpointer.h:81
#32 QTextEngine::SpecialData::~SpecialData (this=0x63c09985aaa0, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/gui/text/qtextengine_p.h:574
#33 QTextEngine::~QTextEngine (this=0x63c099839af0, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/gui/text/qtextengine.cpp:1815
#34 0x00007c0341e3bc40 in QTextLayout::~QTextLayout (this=this@entry=0x63c0997a95c0, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/gui/text/qtextlayout.cpp:365
#35 0x00007c0340b52c8f in std::default_delete<QTextLayout>::operator() (this=<optimized out>, __ptr=0x63c0997a95c0) at /usr/include/c++/13.2.1/bits/unique_ptr.h:93
#36 std::default_delete<QTextLayout>::operator() (__ptr=0x63c0997a95c0, this=<optimized out>) at /usr/include/c++/13.2.1/bits/unique_ptr.h:93
#37 std::unique_ptr<QTextLayout, std::default_delete<QTextLayout> >::~unique_ptr (this=0x63c09973b2e0, this=<optimized out>) at /usr/include/c++/13.2.1/bits/unique_ptr.h:404
#38 KateLineLayout::~KateLineLayout (this=0x63c09973b280, this=<optimized out>) at /usr/src/debug/ktexteditor/ktexteditor-6.0.0/src/render/katelinelayout.h:28
#39 std::default_delete<KateLineLayout>::operator() (this=<optimized out>, __ptr=0x63c09973b280) at /usr/include/c++/13.2.1/bits/unique_ptr.h:99
#40 std::default_delete<KateLineLayout>::operator() (__ptr=0x63c09973b280, this=<optimized out>) at /usr/include/c++/13.2.1/bits/unique_ptr.h:93
#41 std::unique_ptr<KateLineLayout, std::default_delete<KateLineLayout> >::~unique_ptr (this=0x63c09920f5e8, this=<optimized out>) at /usr/include/c++/13.2.1/bits/unique_ptr.h:404
#42 std::pair<int, std::unique_ptr<KateLineLayout, std::default_delete<KateLineLayout> > >::~pair (this=0x63c09920f5e0, this=<optimized out>) at /usr/include/c++/13.2.1/bits/stl_pair.h:187
#43 std::destroy_at<std::pair<int, std::unique_ptr<KateLineLayout, std::default_delete<KateLineLayout> > > > (__location=0x63c09920f5e0) at /usr/include/c++/13.2.1/bits/stl_construct.h:88
#44 std::_Destroy<std::pair<int, std::unique_ptr<KateLineLayout, std::default_delete<KateLineLayout> > > > (__pointer=0x63c09920f5e0) at /usr/include/c++/13.2.1/bits/stl_construct.h:149
#45 std::_Destroy_aux<false>::__destroy<std::pair<int, std::unique_ptr<KateLineLayout, std::default_delete<KateLineLayout> > >*> (__last=<optimized out>, __first=0x63c09920f5e0) at /usr/include/c++/13.2.1/bits/stl_construct.h:163
#46 std::_Destroy<std::pair<int, std::unique_ptr<KateLineLayout, std::default_delete<KateLineLayout> > >*> (__last=<optimized out>, __first=<optimized out>) at /usr/include/c++/13.2.1/bits/stl_construct.h:196
#47 std::_Destroy<std::pair<int, std::unique_ptr<KateLineLayout, std::default_delete<KateLineLayout> > >*, std::pair<int, std::unique_ptr<KateLineLayout, std::default_delete<KateLineLayout> > > > (__last=<optimized out>, __first=<optimized out>) at /usr/include/c++/13.2.1/bits/alloc_traits.h:947
#48 std::vector<std::pair<int, std::unique_ptr<KateLineLayout, std::default_delete<KateLineLayout> > >, std::allocator<std::pair<int, std::unique_ptr<KateLineLayout, std::default_delete<KateLineLayout> > > > >::_M_erase_at_end (__pos=0x63c09920f3f0, this=0x63c0992d2dc8) at /usr/include/c++/13.2.1/bits/stl_vector.h:1934
#49 std::vector<std::pair<int, std::unique_ptr<KateLineLayout, std::default_delete<KateLineLayout> > >, std::allocator<std::pair<int, std::unique_ptr<KateLineLayout, std::default_delete<KateLineLayout> > > > >::clear (this=0x63c0992d2dc8) at /usr/include/c++/13.2.1/bits/stl_vector.h:1603
#50 KateLineLayoutMap::clear (this=0x63c0992d2dc8) at /usr/src/debug/ktexteditor/ktexteditor-6.0.0/src/render/katelayoutcache.cpp:30
#51 KateLayoutCache::clear (this=0x63c0992d2db0) at /usr/src/debug/ktexteditor/ktexteditor-6.0.0/src/render/katelayoutcache.cpp:460
#52 0x00007c0340b9f5fc in KateViewInternal::tagAll (this=0x63c09927c010) at /usr/src/debug/ktexteditor/ktexteditor-6.0.0/src/view/kateviewinternal.cpp:4630
#53 KateViewInternal::editEnd (tagFrom=<optimized out>, editTagLineEnd=33, editTagLineStart=0, this=0x63c09927c010) at /usr/src/debug/ktexteditor/ktexteditor-6.0.0/src/view/kateviewinternal.cpp:4571
#54 KTextEditor::ViewPrivate::editEnd (this=0x63c099326740, editTagLineStart=0, editTagLineEnd=33, tagFrom=<optimized out>) at /usr/src/debug/ktexteditor/ktexteditor-6.0.0/src/view/kateview.cpp:2519
#55 0x00007c0340adb2b0 in KTextEditor::DocumentPrivate::editEnd (this=0x63c097f07700) at /usr/src/debug/ktexteditor/ktexteditor-6.0.0/src/document/katedocument.cpp:1024
#56 0x00007c0340c24cd6 in KTextEditor::Document::EditingTransaction::finish (this=this@entry=0x7ffefe56d828) at /usr/src/debug/ktexteditor/ktexteditor-6.0.0/src/utils/document.cpp:66
#57 0x00007c0340c24cee in KTextEditor::Document::EditingTransaction::~EditingTransaction (this=0x7ffefe56d828, this=<optimized out>) at /usr/src/debug/ktexteditor/ktexteditor-6.0.0/src/utils/document.cpp:74
#58 0x00007c03311afceb in applyEdits (doc=0x63c097f07700, snapshot=<optimized out>, edits=<optimized out>) at /usr/src/debug/kate/kate-24.02.0/addons/lspclient/lspclientutils.cpp:48
#59 0x00007c033115cbf2 in LSPClientPluginViewImpl::applyEdits (edits=..., snapshot=0x63c0997e9eb0, doc=<optimized out>) at /usr/src/debug/kate/kate-24.02.0/addons/lspclient/lspclientpluginview.cpp:1678
#60 LSPClientPluginViewImpl::applyEdits (edits=..., snapshot=<optimized out>, url=..., this=0x63c098e78ea0) at /usr/src/debug/kate/kate-24.02.0/addons/lspclient/lspclientpluginview.cpp:1690
#61 LSPClientPluginViewImpl::applyWorkspaceEdit (this=0x63c098e78ea0, edit=<optimized out>, snapshot=0x63c0997e9eb0) at /usr/src/debug/kate/kate-24.02.0/addons/lspclient/lspclientpluginview.cpp:1703
#62 0x00007c033118939c in std::function<void (LSPApplyWorkspaceEditResponse const&)>::operator()(LSPApplyWorkspaceEditResponse const&) const (__args#0=..., this=0x63c0998004f0) at /usr/include/c++/13.2.1/bits/std_function.h:591
#63 operator() (m=<optimized out>, __closure=0x63c0998004e0) at /usr/src/debug/kate/kate-24.02.0/addons/lspclient/lspclientserver.cpp:2098
#64 std::__invoke_impl<void, make_handler<LSPWorkspaceEdit>(ReplyHandler<LSPWorkspaceEdit>&, const QObject*, utils::identity<std::function<LSPWorkspaceEdit(const rapidjson::GenericValue<rapidjson::UTF8<> >&)> >::type)::<lambda(const GenericReplyType&)>&, const rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&> (__f=...) at /usr/include/c++/13.2.1/bits/invoke.h:61
#65 std::__invoke_r<void, make_handler<LSPWorkspaceEdit>(ReplyHandler<LSPWorkspaceEdit>&, const QObject*, utils::identity<std::function<LSPWorkspaceEdit(const rapidjson::GenericValue<rapidjson::UTF8<> >&)> >::type)::<lambda(const GenericReplyType&)>&, const rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&> (__fn=...) at /usr/include/c++/13.2.1/bits/invoke.h:111
#66 std::_Function_handler<void(const rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&), make_handler<LSPWorkspaceEdit>(ReplyHandler<LSPWorkspaceEdit>&, const QObject*, utils::identity<std::function<LSPWorkspaceEdit(const rapidjson::GenericValue<rapidjson::UTF8<> >&)> >::type)::<lambda(const GenericReplyType&)> >::_M_invoke(const std::_Any_data &, const rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> > &) (__functor=<optimized out>, __args#0=<optimized out>) at /usr/include/c++/13.2.1/bits/std_function.h:290
#67 0x00007c033117eaf8 in std::function<void (LSPApplyWorkspaceEditResponse const&)>::operator()(LSPApplyWorkspaceEditResponse const&) const (__args#0=<optimized out>, this=0x7ffefe56de30) at /usr/include/c++/13.2.1/bits/std_function.h:591
#68 LSPClientServer::LSPClientServerPrivate::readStandardOutput (this=0x63c099583a00) at /usr/src/debug/kate/kate-24.02.0/addons/lspclient/lspclientserver.cpp:1525
#69 0x00007c0341590ca9 in QtPrivate::QSlotObjectBase::call (a=0x7ffefe56e000, r=0x63c099583ae0, this=0x63c0995836e0, this=<optimized out>, r=<optimized out>, a=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobjectdefs_impl.h:433
#70 doActivate<false> (sender=0x63c099583ae0, signal_index=14, argv=0x7ffefe56e000) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobject.cpp:4039
#71 0x00007c03416f642f in QProcess::readyReadStandardOutput (_t1=..., this=<optimized out>) at /usr/src/debug/qt6-base/build/src/corelib/Core_autogen/include/moc_qprocess.cpp:523
#72 QProcessPrivate::tryReadFromChannel (this=0x63c099583c50, channel=0x63c099583e10) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/io/qprocess.cpp:1152
#73 0x00007c03416fdb35 in QProcessPrivate::_q_canReadStandardError (this=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/io/qprocess.cpp:1171
#74 QProcess::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=0x7ffefe56e1d0) at /usr/src/debug/qt6-base/build/src/corelib/Core_autogen/include/moc_qprocess.cpp:405
#75 0x00007c0341590fab in doActivate<false> (sender=0x63c0993f7030, signal_index=3, argv=0x7ffefe56e1d0) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobject.cpp:4051
#76 0x00007c0341598530 in QSocketNotifier::activated (_t3=..., _t2=<optimized out>, _t1=..., this=0x63c0993f7030) at /usr/src/debug/qt6-base/build/src/corelib/Core_autogen/include/moc_qsocketnotifier.cpp:231
#77 QSocketNotifier::event (this=0x63c0993f7030, e=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qsocketnotifier.cpp:326
#78 0x00007c03426f438b in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x63c0993f7030, e=0x7ffefe56e2d0) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/widgets/kernel/qapplication.cpp:3296
#79 0x00007c0341539818 in QCoreApplication::notifyInternal2 (receiver=0x63c0993f7030, event=0x7ffefe56e2d0) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qcoreapplication.cpp:1121
#80 0x00007c03417754d1 in QCoreApplication::sendEvent (event=0x7ffefe56e2d0, receiver=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qcoreapplication.cpp:1539
#81 socketNotifierSourceDispatch (source=0x63c097e2f970) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventdispatcher_glib.cpp:73
#82 0x00007c033f90df69 in g_main_dispatch (context=0x7c0334000ef0) at ../glib/glib/gmain.c:3476
#83 0x00007c033f96c3a7 in g_main_context_dispatch_unlocked (context=0x7c0334000ef0) at ../glib/glib/gmain.c:4284
#84 g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x7c0334000ef0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4349
#85 0x00007c033f90c162 in g_main_context_iteration (context=0x7c0334000ef0, may_block=1) at ../glib/glib/gmain.c:4414
#86 0x00007c03417739ea in QEventDispatcherGlib::processEvents (this=0x63c097d72cc0, flags=...) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventdispatcher_glib.cpp:395
#87 0x00007c0341543d6e in QEventLoop::processEvents (flags=..., this=0x7ffefe56e570) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventloop.cpp:100
#88 QEventLoop::exec (this=0x7ffefe56e570, flags=...) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qeventloop.cpp:182
#89 0x00007c034153c2b8 in QCoreApplication::exec () at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/global/qflags.h:74
#90 0x00007c03426f0f0a in QApplication::exec () at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/widgets/kernel/qapplication.cpp:2574
#91 0x000063c095f79eb4 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kate/kate-24.02.0/apps/kate/main.cpp:529

Reported using DrKonqi
Comment 1 rjx_ 2024-03-12 17:57:44 UTC
Created attachment 167053 [details]
screenshot

A screenshot of exactly what i was trying to do, maybe that helps.
Comment 2 Waqar Ahmed 2024-03-18 19:11:59 UTC
Can't reproduce
Comment 3 Nick 2024-03-19 08:59:58 UTC
Hi - would you mind providing the precise steps you take to configure Kate to enable the F2 functionality in order to allow me to try to duplicate this?

So far I can enable the Build and Run plugin but am struggling to work out how to enable Python LSP. As such I cannot find the rename option.

Thanks
Nick
Comment 4 rjx_ 2024-03-23 17:43:05 UTC
Created attachment 167668 [details]
a test python script

Hello, sorry for the late answer, but right now the behavior of replace is pretty weird on my end so i were not sure what to report.

In kate 24.02.1 + Qt 6.6.2 at first i could not easily reproduce the crash, but after playing around with LSP replace some more i noticed the following bugs/inconsistencies:
    * A crash *can* be reproduced, but under some very specific circumstances (it's honestly finicky to reproduce hence such silly specificity):
       - in attached python script, select/double click "street", then try to replace it with anything (i tried alphanumeric gibberish), then it will crash - unreliably so, you might need to try a few times or input different words, however.
       - Another(?) one - is when you select "kwargs.get" and try to replace it with some nonsense, like "darks".
        Might need a few tries too, but usually it's instant.
    * sometimes replacing "kwargs.get" with gibberish unexpectedly opens other scripts (in the path? loaded by LSP? not sure, this is weird. one example of such file is "/usr/lib/python3.11/site-packages/jedi/third_party/typeshed/stdlib/3/typing.pyi") and replaces some *different* keywords with said gibberish in them... i really don't get this behavior.

Some of those are apparently quirks of LSP plugin/handling, for example it weren't clear for me initially that "Replace (F2)" is not a generic replace, and that it only works for active, non commented code (not even for the content of strings, for example).
Comment 5 rjx_ 2024-03-23 17:44:40 UTC
Created attachment 167669 [details]
a new crash dump
Comment 6 rjx_ 2024-03-23 17:46:21 UTC
Created attachment 167670 [details]
a different dump
Comment 7 rjx_ 2024-03-23 18:10:35 UTC
(In reply to Nick from comment #3)
> Hi - would you mind providing the precise steps you take to configure Kate
> to enable the F2 functionality in order to allow me to try to duplicate this?
> 
> So far I can enable the Build and Run plugin but am struggling to work out
> how to enable Python LSP. As such I cannot find the rename option.
> 
> Thanks
> Nick

Sorry, i overlooked your comment at first.
You need to enable LSP plugin in kate's plugins, then replace would become available (from either right click menu or LSP Client toolbar item).
You will need some LSP server(s) installed too, i assume. Check what your distro provides, mine got clang (for c++), python-lsp-server and rust. I have not confirmed it with other servers aside from the python one, but you may be able to reproduce those bugs with them too, hopefully.
Comment 8 Nick 2024-03-24 20:33:53 UTC
Hi

Thanks for all the additional info. Ive' managed to get Kate set-up with python LSP now by installing the following package on Neon:

sudo pkcon install python3-pylsp

I have also run through your (very detailed!) instructions to duplicate this sing your test Python script but so far I'm not able to. Conscious you believe this is an intermittent problem so I will keep trying. Meanwhile I'm hoping if anyone else reading this might give it a go too in case other's are able to duplicate it. Thanks.
Comment 9 rjx_ 2024-03-25 16:18:48 UTC
(In reply to Nick from comment #8)
> Hi
> 
> Thanks for all the additional info. Ive' managed to get Kate set-up with
> python LSP now by installing the following package on Neon:
> 
> sudo pkcon install python3-pylsp
> 
> I have also run through your (very detailed!) instructions to duplicate this
> sing your test Python script but so far I'm not able to. Conscious you
> believe this is an intermittent problem so I will keep trying. Meanwhile I'm
> hoping if anyone else reading this might give it a go too in case other's
> are able to duplicate it. Thanks.

Thank you for testing, it's much appreciated.
Unfortunately from the looks of it this could be either a distro specific bug (which i am not sure it is), or just require a more up to date system software/libraries which can possibly influence the crashes as well.

Some further discoveries:
After testing with clang's LSP server on some random C files, i were not able to crash kate with it.
Granted, that's either clang being too strict or something weird going on here as well, for trying to replace random things - anything aside from arbitrary text values like variable names/strings - would lead to Replace not replacing anything at all.

Seems like either a python-lsp-server[1] bug, kate crashing via not handling some of it's wonkiness well, or both.
I assume that in order to reproduce this one might need to spin a VM with Arch or some other recentish distro (Fedora 40?) with python-lsp-server 1.10.0 at the very least (that's what Arch got atm).
Otherwise, i am a bit out of ideas as to what's actually the issue here.

[1] https://github.com/python-lsp/python-lsp-server
Comment 10 Waqar Ahmed 2024-03-30 20:00:47 UTC
> sometimes replacing "kwargs.get" with gibberish unexpectedly opens other scripts (in the path? loaded by LSP? not sure, this is weird. one example of such file is "/usr/lib/python3.11/site-packages/jedi/third_party/typeshed/stdlib/3/typing.pyi") and replaces some *different* keywords with said gibberish in them... i really don't get this behavior.

It tries to replace all references I guess

I have been unable to reproduce the crash so far with kate (master) + pylsp v1.10.1 with given steps

The server seems super slow to rename stuff, so that might trigger a crash in Kate given we have tons of pointers around these things.
Comment 11 rjx_ 2024-03-30 21:36:24 UTC
Quick update:
After trying various things (removing optional dependencies for py-lsp for example), i isolated the case to my ~/.config/katerc - migrated from the old Qt 5 version of kate - being the culprit here.
Will try to isolate it to some (set of?) settings or sanitize a bit and attach the config here, but a tad later.
Comment 12 rjx_ 2024-03-31 08:38:52 UTC
Created attachment 167980 [details]
faulty katerc

Unfortunately i do not have enough time to properly debug my katerc atm, but since kate w/ the sanitized version of the config still reproducibly crashes for me i am attaching it here in hopes that someone will figure this out.

P.S. Thanks in advance to everyone involved (and all KDE bug triagers in general), y'all are awesome 🫡.
Comment 13 Bug Janitor Service 2024-04-07 19:40:59 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/678
Comment 14 Christoph Cullmann 2024-04-07 20:49:56 UTC
Git commit 5c4bc8d34f8c774350a90ba36961ed1a38b73fbc by Christoph Cullmann.
Committed on 07/04/2024 at 19:40.
Pushed by waqar into branch 'master'.

fix textInsertedRange signal for insertText behind last line

wrong signal e.g. will trigger crash in word counting

#5  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#6  0x00007accf9cab393 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#7  0x00007accf9c5a6c8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#8  0x00007accf9c424b8 in __GI_abort () at abort.c:79
#9  0x00007accf9c43395 in __libc_message_impl (fmt=fmt@entry=0x7accf9dbb2ea "%s\n") at ../sysdeps/posix/libc_fatal.c:132
#10 0x00007accf9cb52a7 in malloc_printerr (str=str@entry=0x7accf9db906b "free(): invalid pointer") at malloc.c:5772
#11 0x00007accf9cb75b4 in _int_free (av=<optimized out>, p=<optimized out>, have_lock=have_lock@entry=0) at malloc.c:4507
#12 0x00007accf9cb9e93 in __GI___libc_free (mem=mem@entry=0x603abc195fa0) at malloc.c:3398
#13 0x00007accf9eaeaba in operator delete (ptr=ptr@entry=0x603abc195fa0) at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/del_op.cc:49
#14 0x00007accf9eaeaca in operator delete (ptr=ptr@entry=0x603abc195fa0) at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/del_ops.cc:33
#15 0x00007accf99e5da9 in std::__new_allocator<int>::deallocate (this=0x603abc0a8f60, __n=<optimized out>, __p=0x603abc195fa0) at /usr/include/c++/13.2.1/bits/new_allocator.h:168
#16 std::allocator<int>::deallocate (__n=<optimized out>, __p=0x603abc195fa0, this=0x603abc0a8f60, this=<optimized out>, __p=<optimized out>, __n=<optimized out>) at /usr/include/c++/13.2.1/bits/allocator.h:210
#17 std::allocator_traits<std::allocator<int> >::deallocate (__n=<optimized out>, __p=0x603abc195fa0, __a=..., __a=<optimized out>, __p=<optimized out>, __n=<optimized out>) at /usr/include/c++/13.2.1/bits/alloc_traits.h:516
#18 std::_Vector_base<int, std::allocator<int> >::_M_deallocate (__n=<optimized out>, __p=0x603abc195fa0, this=0x603abc0a8f60, this=<optimized out>, __p=<optimized out>, __n=<optimized out>) at /usr/include/c++/13.2.1/bits/stl_vector.h:387
#19 std::vector<int, std::allocator<int> >::_M_fill_insert (__x=<optimized out>, __n=<optimized out>, __position=Python Exception <class 'gdb.error'>: value has been optimized out
, this=0x603abc0a8f60) at /usr/include/c++/13.2.1/bits/vector.tcc:621
#20 std::vector<int, std::allocator<int> >::insert (__x=<optimized out>, __n=<optimized out>, __position=Python Exception <class 'gdb.error'>: value has been optimized out
, this=0x603abc0a8f60) at /usr/include/c++/13.2.1/bits/stl_vector.h:1437
#21 WordCounter::textInserted (this=0x603abc0a8f50, range=...) at /usr/src/debug/ktexteditor/ktexteditor-6.0.0/src/view/wordcounter.cpp:43
#22 0x00007accfa390ca9 in QtPrivate::QSlotObjectBase::call (a=0x7ffeb0f0f780, r=0x603abc0a8f50, this=0x603abc0a8b80, this=<optimized out>, r=<optimized out>, a=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobjectdefs_impl.h:433
#23 doActivate<false> (sender=0x7accec014ce0, signal_index=40, argv=0x7ffeb0f0f780) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/corelib/kernel/qobject.cpp:4039
#24 0x00007accf98fe6a1 in KTextEditor::DocumentPrivate::textInsertedRange (this=<optimized out>, _t1=<optimized out>, _t2=...) at /usr/src/debug/ktexteditor/build/src/KF6TextEditor_autogen/include/moc_katedocument.cpp:1269
#25 0x00007accf98ddae2 in KTextEditor::DocumentPrivate::insertText (this=0x7accec014ce0, position=..., text=..., block=<optimized out>) at /usr/src/debug/ktexteditor/ktexteditor-6.0.0/src/document/katedocument.cpp:779
#26 0x00007accf98f778a in KTextEditor::DocumentPrivate::replaceText (this=0x7accec014ce0, range=..., s=..., block=<optimized out>) at /usr/src/debug/ktexteditor/ktexteditor-6.0.0/src/include/ktexteditor/range.h:155
#27 0x00007accf0187a0b in applyEdits (doc=0x7accec014ce0, snapshot=<optimized out>, edits=<optimized out>) at /usr/src/debug/kate/kate-24.02.1/addons/lspclient/lspclientutils.cpp:46

M  +19   -0    autotests/src/katedocument_test.cpp
M  +1    -0    autotests/src/katedocument_test.h
M  +9    -1    src/document/katedocument.cpp

https://invent.kde.org/frameworks/ktexteditor/-/commit/5c4bc8d34f8c774350a90ba36961ed1a38b73fbc
Comment 15 rjx_ 2024-04-16 04:15:33 UTC
Created attachment 168576 [details]
crash dump kf 6.1 + patch

I am afraid kate's still crashing for me after the patch [1] :\
Here's a fresh crash dump, with:
Qt: 6.7.0
kf: 6.1.0 (+patch)
kate: 24.02.2

[1] https://gitlab.archlinux.org/archlinux/packaging/packages/ktexteditor/-/commit/d0302d9de43b1e81d99b76c60f9cfe5f5f8bde52