Bug 450003 - Kate crashed while I was typing
Summary: Kate crashed while I was typing
Status: RESOLVED UPSTREAM
Alias: None
Product: kwayland
Classification: Frameworks and Libraries
Component: client (show other bugs)
Version: 5.91.0
Platform: Neon Linux
: NOR crash
Target Milestone: ---
Assignee: Martin Flöser
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2022-02-11 11:53 UTC by Patrick Silva
Modified: 2023-03-15 11:28 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2022-02-11 11:53:35 UTC
Application: kate (22.03.70)

Qt Version: 5.15.3
Frameworks Version: 5.91.0
Operating System: Linux 5.11.0-40-generic x86_64
Windowing System: Wayland
Distribution: KDE neon Unstable Edition
DrKonqi: 5.24.80 [CoredumpBackend]

-- Information about the crash:
- What I was doing when the application crashed:
I was typing and Kate crashed at some point. Possibly the crash was triggered by the popup that suggests previously typed words.

The crash does not seem to be reproducible.

-- Backtrace:
Application: Kate (kate), signal: Aborted
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = 0x0}
[New LWP 15963]
[New LWP 15965]
[New LWP 15966]
[New LWP 15967]
[New LWP 15968]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/bin/kate -b --tempfile'.
Program terminated with signal SIGABRT, Aborted.
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
[Current thread is 1 (Thread 0x7f5b1f2159c0 (LWP 15963))]
__preamble__

[Current thread is 1 (Thread 0x7f5b1f2159c0 (LWP 15963))]

Thread 5 (Thread 0x7f5b0c979700 (LWP 15968)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x561693f78888) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x561693f78838, cond=0x561693f78860) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x561693f78860, mutex=0x561693f78838) at pthread_cond_wait.c:647
#3  0x00007f5b0cd525eb in cnd_wait (mtx=0x561693f78838, cond=0x561693f78860) at ../include/c11/threads_posix.h:155
#4  util_queue_thread_func (input=input@entry=0x561693fc1fa0) at ../src/util/u_queue.c:294
#5  0x00007f5b0cd521eb in impl_thrd_routine (p=<optimized out>) at ../include/c11/threads_posix.h:87
#6  0x00007f5b220f9609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007f5b231f9293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 4 (Thread 0x7f5b1cebd700 (LWP 15967)):
#0  0x00007f5b231ecaff in __GI___poll (fds=0x7f5b14004a60, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f5b216e736e in g_main_context_poll (priority=<optimized out>, n_fds=2, fds=0x7f5b14004a60, timeout=<optimized out>, context=0x7f5b14000c20) at ../../../glib/gmain.c:4346
#2  g_main_context_iterate (context=context@entry=0x7f5b14000c20, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:4042
#3  0x00007f5b216e74a3 in g_main_context_iteration (context=0x7f5b14000c20, may_block=may_block@entry=1) at ../../../glib/gmain.c:4108
#4  0x00007f5b237ba9f2 in QEventDispatcherGlib::processEvents (this=0x7f5b14000b60, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#5  0x00007f5b2375ec9b in QEventLoop::exec (this=this@entry=0x7f5b1cebcbb0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:141
#6  0x00007f5b23578362 in QThread::exec (this=this@entry=0x7f5b24896d80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#7  0x00007f5b24812f4b in QDBusConnectionManager::run (this=0x7f5b24896d80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:179
#8  0x00007f5b23579543 in QThreadPrivate::start (arg=0x7f5b24896d80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:331
#9  0x00007f5b220f9609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#10 0x00007f5b231f9293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7f5b1d6be700 (LWP 15966)):
#0  __lll_lock_wait (futex=futex@entry=0x5616914d2408, private=0) at lowlevellock.c:52
#1  0x00007f5b220fc0a3 in __GI___pthread_mutex_lock (mutex=0x5616914d2408) at ../nptl/pthread_mutex_lock.c:80
#2  0x00007f5b2146a15c in wl_display_cancel_read (display=0x5616914d2320) at ../src/wayland-client.c:1712
#3  0x00007f5b214f5b65 in QtWaylandClient::EventThread::run (this=0x5616914ebf50) at qwaylanddisplay.cpp:222
#4  0x00007f5b23579543 in QThreadPrivate::start (arg=0x5616914ebf50) at thread/qthread_unix.cpp:331
#5  0x00007f5b220f9609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#6  0x00007f5b231f9293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7f5b1debf700 (LWP 15965)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5616914d0f80) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5616914d0f30, cond=0x5616914d0f58) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x5616914d0f58, mutex=0x5616914d0f30) at pthread_cond_wait.c:647
#3  0x00007f5b2357f6db in QWaitConditionPrivate::wait (deadline=..., this=0x5616914d0f30) at thread/qwaitcondition_unix.cpp:146
#4  QWaitCondition::wait (this=this@entry=0x5616914ed770, mutex=mutex@entry=0x5616914ed768, deadline=...) at thread/qwaitcondition_unix.cpp:225
#5  0x00007f5b214f5a1d in QtWaylandClient::EventThread::waitForReading (this=0x5616914ed730) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qdeadlinetimer.h:68
#6  QtWaylandClient::EventThread::run (this=0x5616914ed730) at qwaylanddisplay.cpp:206
#7  0x00007f5b23579543 in QThreadPrivate::start (arg=0x5616914ed730) at thread/qthread_unix.cpp:331
#8  0x00007f5b220f9609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#9  0x00007f5b231f9293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7f5b1f2159c0 (LWP 15963)):
[KCrash Handler]
#3  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#4  0x00007f5b230fc859 in __GI_abort () at abort.c:79
#5  0x00007f5b230fc729 in __assert_fail_base (fmt=0x7f5b0dc20492 <error: Cannot access memory at address 0x7f5b0dc20492>, assertion=0x7f5b2146e247 "proxy->refcount > 0", file=0x7f5b2146e22f "../src/wayland-client.c", line=230, function=<optimized out>) at assert.c:92
#6  0x00007f5b2310df36 in __GI___assert_fail (assertion=assertion@entry=0x7f5b2146e247 "proxy->refcount > 0", file=file@entry=0x7f5b2146e22f "../src/wayland-client.c", line=line@entry=230, function=function@entry=0x7f5b2146e358 <__PRETTY_FUNCTION__.11156> "wl_proxy_unref") at assert.c:101
#7  0x00007f5b2146892c in wl_proxy_unref (proxy=<optimized out>) at ../src/wayland-client.c:230
#8  0x00007f5b21468eb0 in proxy_destroy (proxy=0x5616940609b0) at ../src/wayland-client.c:514
#9  wl_proxy_destroy (proxy=0x5616940609b0) at ../src/wayland-client.c:534
#10 0x00007f5b214f90e4 in wl_callback_destroy (wl_callback=<optimized out>) at ../../include/QtWaylandClient/5.15.3/QtWaylandClient/private/../../../../../src/client/wayland-wayland-client-protocol.h:1154
#11 QtWaylandClient::QWaylandWindow::reset (this=this@entry=0x561694105790) at qwaylandwindow.cpp:255
#12 0x00007f5b215036f9 in QtWaylandClient::QWaylandWindow::setVisible (this=0x561694105790, visible=<optimized out>) at qwaylandwindow.cpp:444
#13 0x00007f5b23b4f9eb in QWindowPrivate::setVisible (this=0x56169410e050, visible=visible@entry=false) at kernel/qwindow.cpp:408
#14 0x00007f5b242fb9a1 in QWidgetWindow::setNativeWindowVisibility (this=this@entry=0x56169412cdf0, visible=visible@entry=false) at kernel/qwidgetwindow.cpp:215
#15 0x00007f5b242d514f in QWidgetPrivate::hide_sys (this=this@entry=0x561693f22aa0) at kernel/qwidget.cpp:8009
#16 0x00007f5b242dce28 in QWidgetPrivate::hide_helper (this=this@entry=0x561693f22aa0) at kernel/qwidget.cpp:7937
#17 0x00007f5b242e1970 in QWidgetPrivate::setVisible (this=0x561693f22aa0, visible=<optimized out>) at kernel/qwidget.cpp:8133
#18 0x00007f5b25610020 in ?? () from /lib/x86_64-linux-gnu/libKF5TextEditor.so.5
#19 0x00007f5b237971be in QtPrivate::QSlotObjectBase::call (a=0x7ffe3b8272d0, r=0x561693f229f0, this=0x561694117400) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#20 doActivate<false> (sender=0x561693f22cc0, signal_index=6, argv=0x7ffe3b8272d0) at kernel/qobject.cpp:3886
#21 0x00007f5b23790587 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7f5b239fb020 <QAbstractItemModel::staticMetaObject>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7ffe3b8272d0) at kernel/qobject.cpp:3946
#22 0x00007f5b23701f5a in QAbstractItemModel::layoutChanged (this=<optimized out>, _t1=..., _t2=<optimized out>) at .moc/moc_qabstractitemmodel.cpp:571
#23 0x00007f5b2561ef98 in KateCompletionModel::setCurrentCompletion(KTextEditor::CodeCompletionModel*, QString const&) () from /lib/x86_64-linux-gnu/libKF5TextEditor.so.5
#24 0x00007f5b256120a1 in KateCompletionWidget::cursorPositionChanged() () from /lib/x86_64-linux-gnu/libKF5TextEditor.so.5
#25 0x00007f5b237971be in QtPrivate::QSlotObjectBase::call (a=0x7ffe3b827550, r=0x561693f229f0, this=0x561693f4bcb0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#26 doActivate<false> (sender=0x561691c0bc80, signal_index=13, argv=0x7ffe3b827550) at kernel/qobject.cpp:3886
#27 0x00007f5b255e0e0b in KTextEditor::View::cursorPositionChanged(KTextEditor::View*, KTextEditor::Cursor const&) () from /lib/x86_64-linux-gnu/libKF5TextEditor.so.5
#28 0x00007f5b2571bdd3 in KateViewInternal::updateCursor(KTextEditor::Cursor, bool, bool, bool) () from /lib/x86_64-linux-gnu/libKF5TextEditor.so.5
#29 0x00007f5b25720a52 in KateViewInternal::editEnd(int, int, bool) () from /lib/x86_64-linux-gnu/libKF5TextEditor.so.5
#30 0x00007f5b2565a773 in KTextEditor::DocumentPrivate::editEnd() () from /lib/x86_64-linux-gnu/libKF5TextEditor.so.5
#31 0x00007f5b2565fde8 in KTextEditor::DocumentPrivate::typeChars(KTextEditor::ViewPrivate*, QString) () from /lib/x86_64-linux-gnu/libKF5TextEditor.so.5
#32 0x00007f5b25717a29 in KateViewInternal::keyPressEvent(QKeyEvent*) () from /lib/x86_64-linux-gnu/libKF5TextEditor.so.5
#33 0x00007f5b2571ba33 in KateViewInternal::eventFilter(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libKF5TextEditor.so.5
#34 0x00007f5b2375ff03 in QCoreApplicationPrivate::sendThroughObjectEventFilters (event=<optimized out>, receiver=<optimized out>) at kernel/qcoreapplication.cpp:1190
#35 QCoreApplicationPrivate::sendThroughObjectEventFilters (receiver=receiver@entry=0x56169190d270, event=event@entry=0x7ffe3b827e00) at kernel/qcoreapplication.cpp:1179
#36 0x00007f5b2429edb2 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x56169190d270, e=0x7ffe3b827e00) at kernel/qapplication.cpp:3626
#37 0x00007f5b242a8366 in QApplication::notify(QObject*, QEvent*) () at kernel/qapplication.cpp:2994
#38 0x00007f5b2376019a in QCoreApplication::notifyInternal2 (receiver=0x56169190d270, event=0x7ffe3b827e00) at ../../include/QtCore/5.15.3/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:332
#39 0x00007f5b2430021e in QWidgetWindow::event (event=0x7ffe3b827e00, this=0x5616919543c0) at kernel/qwidgetwindow.cpp:293
#40 QWidgetWindow::event (this=0x5616919543c0, event=0x7ffe3b827e00) at kernel/qwidgetwindow.cpp:239
#41 0x00007f5b2429edc3 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x5616919543c0, e=0x7ffe3b827e00) at kernel/qapplication.cpp:3632
#42 0x00007f5b242a7bb8 in QApplication::notify(QObject*, QEvent*) () at kernel/qapplication.cpp:3156
#43 0x00007f5b2376019a in QCoreApplication::notifyInternal2 (receiver=0x5616919543c0, event=0x7ffe3b827e00) at ../../include/QtCore/5.15.3/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:332
#44 0x00007f5b23b4094b in QGuiApplicationPrivate::processKeyEvent (e=e@entry=0x5616941130f0) at kernel/qguiapplication.cpp:2414
#45 0x00007f5b23b45b2b in QGuiApplicationPrivate::processWindowSystemEvent (e=0x5616941130f0) at kernel/qguiapplication.cpp:2008
#46 0x00007f5b23b1d7ac in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel/qwindowsysteminterface.cpp:1169
#47 0x00007f5b21534e64 in userEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /lib/x86_64-linux-gnu/libQt5WaylandClient.so.5
#48 0x00007f5b216e717d in g_main_dispatch (context=0x5616914fe9d0) at ../../../glib/gmain.c:3309
#49 g_main_context_dispatch (context=context@entry=0x5616914fe9d0) at ../../../glib/gmain.c:3974
#50 0x00007f5b216e7400 in g_main_context_iterate (context=context@entry=0x5616914fe9d0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:4047
#51 0x00007f5b216e74a3 in g_main_context_iteration (context=0x5616914fe9d0, may_block=may_block@entry=1) at ../../../glib/gmain.c:4108
#52 0x00007f5b237baa0b in QEventDispatcherGlib::processEvents (this=0x5616914eb920, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#53 0x00007f5b2375ec9b in QEventLoop::exec (this=this@entry=0x7ffe3b828100, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:141
#54 0x00007f5b23766e44 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#55 0x0000561690d458b5 in ?? ()
#56 0x00007f5b230fe0b3 in __libc_start_main (main=0x561690d43500, argc=3, argv=0x7ffe3b828648, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe3b828638) at ../csu/libc-start.c:308
#57 0x0000561690d4708e in _start ()

Possible duplicates by query: bug 443387, bug 441545, bug 419428, bug 416315, bug 399617.

Reported using DrKonqi
Comment 1 Christoph Cullmann 2022-03-27 17:11:57 UTC
I can't see an error in our code.
This more looks like some underlying issue with Wayland.

David & Co., what to do best with such bugs?
Comment 2 Weng Xuetian 2022-11-27 21:05:02 UTC
Send a potential fix for this for qt : https://codereview.qt-project.org/c/qt/qtwayland/+/445585
Comment 3 Andreas Sturmlechner 2023-03-15 09:12:00 UTC
(In reply to Weng Xuetian from comment #2)
> Send a potential fix for this for qt :
> https://codereview.qt-project.org/c/qt/qtwayland/+/445585
This was merged, btw. But how feasible is it to backport to Qt 5.15?
Comment 4 David Edmundson 2023-03-15 11:28:21 UTC
I'd be surprised if it's related, as kate won't be rendering on other threads and that means the framecallback gets dispatched on the main thread too