https://bugs.kde.org/show_bug.cgi?id=472230
Bug ID: 472230 Summary: Kate crashed when switching files with Ctrl+Tab Classification: Applications Product: kate Version: 23.04.3 Platform: Archlinux OS: Linux Status: REPORTED Keywords: drkonqi Severity: crash Priority: NOR Component: general Assignee: kwrite-bugs-n...@kde.org Reporter: auberg...@outlook.com.au Target Milestone: --- Application: kate (23.04.3) Qt Version: 5.15.10 Frameworks Version: 5.108.0 Operating System: Linux 6.4.2-zen1-1-zen x86_64 Windowing System: X11 Distribution: Arch Linux DrKonqi: 5.27.6 [KCrashBackend] -- Information about the crash: BACKGROUND I was editing a hitherto unsaved file, compiling various copy-pasted lines from my systemd journal to help me debug a recurring issue I have. I saved the first file as a .txt, edited it a bit more, then saved it once more. STEPS TO REPRODUCE Method A 1. Create and save the file as described above. 2. Use Ctrl+N to create a new file. 3. Use Alt+Tab to repeatedly switch between Kate and another application, pasting one block of text into Kate each time you switch to it. 4. Without saving the second file, press Ctrl+Tab to switch to the first file. Method B 1. Open Kate. Use Ctrl+O to open a plain text document, like the one above. 2. Use Ctrl+N to create a new file. 3. Have a number (I had 17) of text blocks of varying length on your clipboard. 4. Open the KDE Clipboard plasmoid. Use the relevant button to keep it open, even when it loses focus. 5. Click on the lowest (oldest/least recently used) block in the Clipboard plasmoid. Click in the Kate window and press Ctrl+V, then you can type a bit (e.g., pressing Enter to insert space between the pasted blocks). Repeat until you have pasted all blocks in the clipboard history. 6. Without saving the second file, press Ctrl+Tab to switch to the first file. EXPECTED BEHAVIOUR Kate shows the first file. ACTUAL BEHAVIOUR Kate immediately crashed without showing the first file. I don't know what would happen if I held Ctrl+Tab for longer, but I would guess that the crash occurred when I let go of both keys rather than when I pressed them. NOTES I have had trouble reproducing this bug. After it originally occurred (method A), I restarted Kate and used procedure B to reproduce it successfully. However, in attempts since then, I have failed to reproduce the bug. Things I Did That Might Have Stuffed Things Up (workarounds?) I copied the entire file after assembling it in Kate so I could reassemble it easily after the crash. I also tried copying each block out-of-order, messing up their chronological sorting, and killing a number of processes I found with the command `kate -b --tempfile` before relaunching Kate. The crash has not reoccurred since then. The crash can be reproduced sometimes. -- Backtrace: Application: Kate (kate), signal: Segmentation fault Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = <optimized out>} [KCrash Handler] #6 std::__uniq_ptr_impl<QTLWExtra, std::default_delete<QTLWExtra> >::_M_ptr() const (this=0x28, this=<optimized out>) at /usr/include/c++/13.1.1/bits/unique_ptr.h:199 #7 std::unique_ptr<QTLWExtra, std::default_delete<QTLWExtra> >::get() const (this=0x28, this=<optimized out>) at /usr/include/c++/13.1.1/bits/unique_ptr.h:470 #8 std::unique_ptr<QTLWExtra, std::default_delete<QTLWExtra> >::operator bool() const (this=0x28) at /usr/include/c++/13.1.1/bits/unique_ptr.h:487 #9 QWidget::windowIcon() const (this=<optimized out>) at kernel/qwidget.cpp:5976 #10 0x00007f7efbf0c3c7 in detail::FilenameListItem::icon() const (this=<optimized out>) at /usr/src/debug/kate/kate-23.04.3/addons/tabswitcher/tabswitcherfilesmodel.cpp:31 #11 detail::TabswitcherFilesModel::data(QModelIndex const&, int) const (this=<optimized out>, index=<optimized out>, role=<optimized out>) at /usr/src/debug/kate/kate-23.04.3/addons/tabswitcher/tabswitcherfilesmodel.cpp:219 #12 0x00007f7f10002dce in QModelIndex::data(int) const (arole=1, this=0x7ffe36a68bf0) at ../../include/QtCore/../../src/corelib/itemmodels/qabstractitemmodel.h:460 #13 QStyledItemDelegate::initStyleOption(QStyleOptionViewItem*, QModelIndex const&) const (this=0x556743dc8980, option=0x7ffe36a68aa0, index=...) at itemviews/qstyleditemdelegate.cpp:302 #14 0x00007f7f10006d43 in QStyledItemDelegate::sizeHint(QStyleOptionViewItem const&, QModelIndex const&) const (this=0x556743dc8980, option=..., index=...) at itemviews/qstyleditemdelegate.cpp:410 #15 0x00007f7f10053575 in QTreeView::indexRowSizeHint(QModelIndex const&) const (this=<optimized out>, index=<optimized out>) at itemviews/qtreeview.cpp:3005 #16 0x00007f7f10053745 in QTreeViewPrivate::itemHeight(int) const (item=0, this=0x556743b96220) at itemviews/qtreeview.cpp:3482 #17 QTreeViewPrivate::itemHeight(int) const (this=this@entry=0x556743b96220, item=item@entry=2) at itemviews/qtreeview.cpp:3470 #18 0x00007f7f100577ac in QTreeViewPrivate::updateScrollBars() (this=0x556743b96220) at itemviews/qtreeview.cpp:3722 #19 0x00007f7f10057ae8 in QTreeView::updateGeometries() (this=0x556743d51920) at itemviews/qtreeview.cpp:2844 #20 0x00007f7f0ffdb7e1 in QAbstractItemView::doItemsLayout() (this=0x556743d51920) at itemviews/qabstractitemview.cpp:1232 #21 0x00007f7f1004cb63 in QTreeView::doItemsLayout() (this=0x556743d51920) at itemviews/qtreeview.cpp:2103 #22 0x00007f7f10054a42 in QAbstractItemViewPrivate::executePostedLayout() const (this=0x556743b96220) at ../../include/QtWidgets/5.15.10/QtWidgets/private/../../../../../src/widgets/itemviews/qabstractitemview_p.h:94 #23 QAbstractItemViewPrivate::executePostedLayout() const (this=0x556743b96220) at ../../include/QtWidgets/5.15.10/QtWidgets/private/../../../../../src/widgets/itemviews/qabstractitemview_p.h:226 #24 QTreeView::sizeHintForColumn(int) const (this=0x556743d51920, column=0) at itemviews/qtreeview.cpp:2867 #25 0x00007f7efbf0a9e5 in TabSwitcherTreeView::sizeHintWidth() const (this=0x556743d51920) at /usr/src/debug/kate/kate-23.04.3/addons/tabswitcher/tabswitchertreeview.cpp:28 #26 TabSwitcherPluginView::updateViewGeometry() (this=0x55674385b6d0) at /usr/src/debug/kate/kate-23.04.3/addons/tabswitcher/tabswitcher.cpp:252 #27 TabSwitcherPluginView::walk(int, int) (this=this@entry=0x55674385b6d0, from=from@entry=0, to=<optimized out>) at /usr/src/debug/kate/kate-23.04.3/addons/tabswitcher/tabswitcher.cpp:206 #28 0x00007f7efbf0ad8c in TabSwitcherPluginView::walkForward() (this=0x55674385b6d0) at /usr/src/debug/kate/kate-23.04.3/addons/tabswitcher/tabswitcher.cpp:227 #29 0x00007f7f0f0d06a7 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffe36a69200, r=<optimized out>, this=0x556743da01f0, this=<optimized out>, r=<optimized out>, a=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398 #30 doActivate<false>(QObject*, int, void**) (sender=0x556743dc9560, signal_index=4, argv=0x7ffe36a69200) at kernel/qobject.cpp:3925 #31 0x00007f7f0fd6bbb7 in QAction::triggered(bool) (this=this@entry=0x556743dc9560, _t1=<optimized out>) at .moc/moc_qaction.cpp:376 #32 0x00007f7f0fd7160b in QAction::activate(QAction::ActionEvent) (this=0x556743dc9560, event=<optimized out>) at kernel/qaction.cpp:1161 #33 0x00007f7f0fd716de in QAction::event(QEvent*) (e=<optimized out>, this=<optimized out>) at kernel/qaction.cpp:1086 #34 QAction::event(QEvent*) (this=<optimized out>, e=<optimized out>) at kernel/qaction.cpp:1075 #35 0x00007f7f0fd7893f in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x556743dc9560, e=0x7ffe36a69390) at kernel/qapplication.cpp:3640 #36 0x00007f7f0f09b778 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x556743dc9560, event=0x7ffe36a69390) at kernel/qcoreapplication.cpp:1064 #37 0x00007f7f0f09b7e3 in QCoreApplication::sendEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1462 #38 0x00007f7f0f577016 in QShortcutMap::dispatchEvent(QKeyEvent*) (this=this@entry=0x556743098e58, e=e@entry=0x7ffe36a69450) at kernel/qshortcutmap.cpp:675 #39 0x00007f7f0f577405 in QShortcutMap::tryShortcut(QKeyEvent*) (this=0x556743098e58, e=0x7ffe36a69450) at kernel/qshortcutmap.cpp:343 #40 0x00007f7f0f52be38 in QWindowSystemInterface::handleShortcutEvent(QWindow*, unsigned long, int, QFlags<Qt::KeyboardModifier>, unsigned int, unsigned int, unsigned int, QString const&, bool, unsigned short) (window=<optimized out>, timestamp=14884617, keyCode=16777217, modifiers=..., nativeScanCode=23, nativeVirtualKey=65289, nativeModifiers=4, text=..., autorepeat=false, count=1) at kernel/qwindowsysteminterface.cpp:477 #41 0x00007f7f0f545542 in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) (e=0x7ffe36a695f0) at kernel/qguiapplication.cpp:2398 #42 0x00007f7f0969a995 in QIBusPlatformInputContext::filterEventFinished(QDBusPendingCallWatcher*) (this=<optimized out>, call=0x556744e444e0) at /usr/src/debug/qt5-base/qtbase/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp:517 #43 0x00007f7f0f0d06a7 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffe36a69780, r=<optimized out>, this=0x556744e1edd0, this=<optimized out>, r=<optimized out>, a=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398 #44 doActivate<false>(QObject*, int, void**) (sender=0x556744e444e0, signal_index=3, argv=0x7ffe36a69780) at kernel/qobject.cpp:3925 #45 0x00007f7f0fbd6ad4 in QDBusPendingCallWatcher::finished(QDBusPendingCallWatcher*) (this=<optimized out>, _t1=<optimized out>) at .moc/moc_qdbuspendingcall.cpp:158 #46 0x00007f7f0f0c31e4 in QObject::event(QEvent*) (this=0x556744e444e0, e=0x556743b4db20) at kernel/qobject.cpp:1347 #47 0x00007f7f0fd7893f in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x556744e444e0, e=0x556743b4db20) at kernel/qapplication.cpp:3640 #48 0x00007f7f0f09b778 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x556744e444e0, event=0x556743b4db20) at kernel/qcoreapplication.cpp:1064 #49 0x00007f7f0f0a06db in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x556743077580) at kernel/qcoreapplication.cpp:1821 #50 0x00007f7f0f0e6748 in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x5567431dc910) at kernel/qeventdispatcher_glib.cpp:277 #51 0x00007f7f0cd0fa31 in g_main_dispatch (context=0x7f7f04000ee0) at ../glib/glib/gmain.c:3460 #52 g_main_context_dispatch (context=0x7f7f04000ee0) at ../glib/glib/gmain.c:4200 #53 0x00007f7f0cd6ccc9 in g_main_context_iterate.isra.0 (context=context@entry=0x7f7f04000ee0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4276 #54 0x00007f7f0cd0d0e2 in g_main_context_iteration (context=0x7f7f04000ee0, may_block=1) at ../glib/glib/gmain.c:4343 #55 0x00007f7f0f0ea5cc in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x5567431e1a50, flags=...) at kernel/qeventdispatcher_glib.cpp:423 #56 0x00007f7f0f09a484 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffe36a69be0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69 #57 0x00007f7f0f09b923 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121 #58 0x00007f7f0f53bf12 in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1870 #59 0x00007f7f0fd76cda in QApplication::exec() () at kernel/qapplication.cpp:2832 #60 0x0000556742a8a60e in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kate/kate-23.04.3/apps/kate/main.cpp:609 [Inferior 1 (process 65633) detached] Reported using DrKonqi -- You are receiving this mail because: You are watching all bug changes.