Bug 476312 - Kate crashed after saving settings
Summary: Kate crashed after saving settings
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords: drkonqi
: 480755 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-10-30 03:59 UTC by jyrfkis7z
Modified: 2024-02-03 16:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jyrfkis7z 2023-10-30 03:59:36 UTC
Application: kate (23.08.2)

Qt Version: 5.15.11
Frameworks Version: 5.111.0
Operating System: Linux 6.5.9-arch2-1 x86_64
Windowing System: X11
Distribution: "Arch Linux"
DrKonqi: 5.27.9 [KCrashBackend]

-- Information about the crash:
I opened Configure and disabled "Show welcome view for new windows" and changed "Maximum number of entries in recent file list" from 10 to 0. After applying the settings, Kate crashed.

The reporter is unsure if this crash is reproducible.

-- Backtrace:
Application: Kate (kate), signal: Segmentation fault
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = <optimized out>}
[KCrash Handler]
#6  0x00007f2776397de8 in KRecentFilesActionPrivate::removeAction(__gnu_cxx::__normal_iterator<KRecentFilesActionPrivate::RecentActionInfo*, std::vector<KRecentFilesActionPrivate::RecentActionInfo, std::allocator<KRecentFilesActionPrivate::RecentActionInfo> > >) (this=0x55f4d50de320, it=...) at /usr/src/debug/kconfigwidgets5/kconfigwidgets-5.111.0/src/krecentfilesaction.cpp:103
#7  0x00007f2776397e5f in KRecentFilesAction::setMaxItems(int) (this=this@entry=0x55f4d50d23a0, maxItems=<optimized out>) at /usr/src/debug/kconfigwidgets5/kconfigwidgets-5.111.0/src/krecentfilesaction.cpp:126
#8  0x00007f277884f45f in KateMainWindow::showPluginConfigPage(KTextEditor::Plugin*, int) (this=0x55f4d4cd9f70, configpageinterface=0x0, id=0) at /usr/src/debug/kate/kate-23.08.2/apps/lib/katemainwindow.cpp:1008
#9  0x00007f27772d1253 in doActivate<false>(QObject*, int, void**) (sender=0x55f4d5117670, signal_index=4, argv=0x7fffefb98c80) at kernel/qobject.cpp:3937
#10 0x00007f2777f6bbb7 in QAction::triggered(bool) (this=this@entry=0x55f4d5117670, _t1=<optimized out>) at .moc/moc_qaction.cpp:376
#11 0x00007f2777f7160b in QAction::activate(QAction::ActionEvent) (this=0x55f4d5117670, event=<optimized out>) at kernel/qaction.cpp:1161
#12 0x00007f27780f42cb in QMenuPrivate::activateCausedStack(QVector<QPointer<QWidget> > const&, QAction*, QAction::ActionEvent, bool) (this=this@entry=0x55f4d50b8b00, causedStack=..., action=action@entry=0x55f4d5117670, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1384
#13 0x00007f27780f43ed in QMenuPrivate::activateAction(QAction*, QAction::ActionEvent, bool) (this=0x55f4d50b8b00, action=0x55f4d5117670, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:1461
#14 0x00007f2777faf1a1 in QWidget::event(QEvent*) (this=0x55f4d50ea8f0, event=0x7fffefb99280) at kernel/qwidget.cpp:8671
#15 0x00007f2777f788ff in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=this@entry=0x55f4d4955d90, receiver=receiver@entry=0x55f4d50ea8f0, e=e@entry=0x7fffefb99280) at kernel/qapplication.cpp:3640
#16 0x00007f2777f7ddaf in QApplication::notify(QObject*, QEvent*) (this=<optimized out>, receiver=0x55f4d50ea8f0, e=0x7fffefb99280) at kernel/qapplication.cpp:3084
#17 0x00007f277729c168 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x55f4d50ea8f0, event=0x7fffefb99280) at kernel/qcoreapplication.cpp:1064
#18 0x00007f277729c1f3 in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1474
#19 0x00007f2777f7c0ea in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) (receiver=0x55f4d50ea8f0, event=0x7fffefb99280, alienWidget=<optimized out>, nativeWidget=0x55f4d50ea8f0, buttonDown=<optimized out>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at kernel/qapplication.cpp:2622
#20 0x00007f2777fcd984 in QWidgetWindow::handleMouseEvent(QMouseEvent*) (this=this@entry=0x55f4d5b99d30, event=event@entry=0x7fffefb995e0) at kernel/qwidgetwindow.cpp:580
#21 0x00007f2777fcebd7 in QWidgetWindow::event(QEvent*) (this=0x55f4d5b99d30, event=0x7fffefb995e0) at kernel/qwidgetwindow.cpp:300
#22 0x00007f2777f788ff in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x55f4d5b99d30, e=0x7fffefb995e0) at kernel/qapplication.cpp:3640
#23 0x00007f277729c168 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x55f4d5b99d30, event=0x7fffefb995e0) at kernel/qcoreapplication.cpp:1064
#24 0x00007f277729c1f3 in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1474
#25 0x00007f277774194c in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) (e=0x55f4d5b40de0) at kernel/qguiapplication.cpp:2285
#26 0x00007f277772a6e5 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#27 0x00007f277132f5e0 in xcbSourceDispatch(GSource*, GSourceFunc, gpointer) (source=<optimized out>) at /usr/src/debug/qt5-base/qtbase/src/plugins/platforms/xcb/qxcbeventdispatcher.cpp:105
#28 0x00007f2774f0df69 in g_main_dispatch (context=0x7f276c000ec0) at ../glib/glib/gmain.c:3476
#29 0x00007f2774f6c327 in g_main_context_dispatch_unlocked (context=0x7f276c000ec0) at ../glib/glib/gmain.c:4284
#30 g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x7f276c000ec0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4349
#31 0x00007f2774f0c162 in g_main_context_iteration (context=0x7f276c000ec0, may_block=1) at ../glib/glib/gmain.c:4414
#32 0x00007f27772eaf7c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x55f4d4a9a430, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#33 0x00007f277729ae74 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffefb99980, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#34 0x00007f277729c313 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#35 0x00007f277773bf02 in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1870
#36 0x00007f2777f76cda in QApplication::exec() () at kernel/qapplication.cpp:2832
#37 0x000055f4d3b9760e in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kate/kate-23.08.2/apps/kate/main.cpp:609
[Inferior 1 (process 5074) detached]

Reported using DrKonqi
Comment 1 Waqar Ahmed 2023-11-20 10:41:54 UTC
Git commit 6649b385c13af66833e217e41ac6e5bb75368528 by Waqar Ahmed.
Committed on 20/11/2023 at 11:40.
Pushed by waqar into branch 'master'.

KRecentFileActions: Fix use after free

Iterators are invalidated after erase.

M  +3    -1    src/krecentfilesaction.cpp

https://invent.kde.org/frameworks/kconfigwidgets/-/commit/6649b385c13af66833e217e41ac6e5bb75368528
Comment 2 Waqar Ahmed 2023-11-20 10:43:18 UTC
Git commit c0c4fcd53f8348c31e2770502ac43c89152b7545 by Waqar Ahmed.
Committed on 20/11/2023 at 11:42.
Pushed by waqar into branch 'kf5'.

KRecentFileActions: Fix use after free

Iterators are invalidated after erase.
(cherry picked from commit 6649b385c13af66833e217e41ac6e5bb75368528)

M  +3    -1    src/krecentfilesaction.cpp

https://invent.kde.org/frameworks/kconfigwidgets/-/commit/c0c4fcd53f8348c31e2770502ac43c89152b7545
Comment 3 Christoph Cullmann 2024-02-03 16:57:33 UTC
*** Bug 480755 has been marked as a duplicate of this bug. ***