Bug 452282 - Kate crashes on saving settings after editing extensions for filetype
Summary: Kate crashes on saving settings after editing extensions for filetype
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 21.12.3
Platform: Neon Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords: drkonqi
: 453755 454291 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-04-05 05:39 UTC by poomklao
Modified: 2022-05-24 05:39 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description poomklao 2022-04-05 05:39:57 UTC
Application: kate (21.12.3)

Qt Version: 5.15.3
Frameworks Version: 5.92.0
Operating System: Linux 5.13.0-39-generic x86_64
Windowing System: X11
Distribution: KDE neon User - 5.24
DrKonqi: 5.24.4 [KCrashBackend]

-- Information about the crash:
- What I was doing when the application crashed:
Just added a new extension for Kate to open with the Java filetype. The crash happens when I press Save.

- Custom settings of the application:
I am editing a Java file in Java mode at the time.

The crash can be reproduced every time.

-- Backtrace:
Application: Kate (kate), signal: Segmentation fault

[New LWP 24246]
[New LWP 24248]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007f11aae639cf in __GI___poll (fds=0x7ffc2a7f5cf8, nfds=1, timeout=1000) at ../sysdeps/unix/sysv/linux/poll.c:29
__preamble__
[Current thread is 1 (Thread 0x7f11a6e109c0 (LWP 24244))]

Thread 3 (Thread 0x7f11911a6700 (LWP 24248)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5618bccb7eb8) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5618bccb7e68, cond=0x5618bccb7e90) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x5618bccb7e90, mutex=0x5618bccb7e68) at pthread_cond_wait.c:638
#3  0x00007f118a63a5eb in ?? () from /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#4  0x00007f118a63a1eb in ?? () from /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
#5  0x00007f11a9d39609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#6  0x00007f11aae70163 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7f1193e6f700 (LWP 24246)):
#0  0x00007f11aae639cf in __GI___poll (fds=0x7f118c016500, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f11a931f36e in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f11a931f4a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f11ab43465b in QEventDispatcherGlib::processEvents (this=0x7f118c000b60, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007f11ab3d887b in QEventLoop::exec (this=this@entry=0x7f1193e6ebb0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:141
#5  0x00007f11ab1f2442 in QThread::exec (this=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#6  0x00007f11ac492f4b in ?? () from /lib/x86_64-linux-gnu/libQt5DBus.so.5
#7  0x00007f11ab1f3623 in QThreadPrivate::start (arg=0x7f11ac516d80) at thread/qthread_unix.cpp:331
#8  0x00007f11a9d39609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#9  0x00007f11aae70163 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7f11a6e109c0 (LWP 24244)):
[KCrash Handler]
#4  QLineEdit::text (this=0x0) at widgets/qlineedit.cpp:312
#5  0x00007f11ad2eb665 in KateModeMenuList::reloadItems (this=0x5618bd0f2a00) at ./src/mode/katemodemenulist.cpp:193
#6  0x00007f11ad2dd2a7 in KateModeManager::update (this=this@entry=0x5618bbf420f0) at ./src/view/kateview.h:1035
#7  0x00007f11ad2de2f3 in KateModeManager::save (this=0x5618bbf420f0, v=...) at ./src/mode/katemodemanager.cpp:221
#8  0x00007f11ad2e065a in ModeConfigPage::apply (this=0x5618bd7f5a20) at ./src/utils/kateglobal.h:242
#9  0x00007f11ad28b0a5 in KateSaveConfigTab::apply (this=0x5618bd8eaa40) at ./src/dialogs/katedialogs.cpp:971
#10 0x00005618ba08bc21 in KateConfigDialog::slotApply (this=0x5618bd60d160) at ./kate/kateconfigdialog.cpp:384
#11 0x00007f11ab410dfe in QtPrivate::QSlotObjectBase::call (a=0x7ffc2a7f7510, r=0x5618bd60d160, this=0x5618bdc7d660) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#12 doActivate<false> (sender=0x5618bd61fca0, signal_index=9, argv=0x7ffc2a7f7510) at kernel/qobject.cpp:3886
#13 0x00007f11ab40a1c7 in QMetaObject::activate (sender=sender@entry=0x5618bd61fca0, m=m@entry=0x7f11ac436600 <QAbstractButton::staticMetaObject>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7ffc2a7f7510) at kernel/qobject.cpp:3946
#14 0x00007f11ac0163f6 in QAbstractButton::clicked (this=this@entry=0x5618bd61fca0, _t1=<optimized out>) at .moc/moc_qabstractbutton.cpp:308
#15 0x00007f11ac01661e in QAbstractButtonPrivate::emitClicked (this=0x5618bd6228f0) at widgets/qabstractbutton.cpp:415
#16 0x00007f11ac017af3 in QAbstractButtonPrivate::click (this=0x5618bd6228f0) at widgets/qabstractbutton.cpp:408
#17 0x00007f11ac017cb5 in QAbstractButton::mouseReleaseEvent (this=0x5618bd61fca0, e=0x7ffc2a7f7ad0) at widgets/qabstractbutton.cpp:1044
#18 0x00007f11abf60d76 in QWidget::event (this=0x5618bd61fca0, event=0x7ffc2a7f7ad0) at kernel/qwidget.cpp:8677
#19 0x00007f11ac018ee3 in QAbstractButton::event (this=this@entry=0x5618bd61fca0, e=e@entry=0x7ffc2a7f7ad0) at widgets/qabstractbutton.cpp:1001
#20 0x00007f11ac0bc893 in QPushButton::event (this=0x5618bd61fca0, e=0x7ffc2a7f7ad0) at widgets/qpushbutton.cpp:718
#21 0x00007f11abf1ddc3 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x5618bd61fca0, e=0x7ffc2a7f7ad0) at kernel/qapplication.cpp:3637
#22 0x00007f11abf26dc7 in QApplication::notify(QObject*, QEvent*) () at kernel/qapplication.cpp:3081
#23 0x00007f11ab3d9d7a in QCoreApplication::notifyInternal2 (receiver=0x5618bd61fca0, event=0x7ffc2a7f7ad0) at ../../include/QtCore/5.15.3/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:332
#24 0x00007f11abf260c7 in QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x5618bd61fca0, event=event@entry=0x7ffc2a7f7ad0, alienWidget=alienWidget@entry=0x5618bd61fca0, nativeWidget=0x5618bd60d160, buttonDown=<optimized out>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at kernel/qapplication.cpp:2619
#25 0x00007f11abf7bf64 in QWidgetWindow::handleMouseEvent (this=0x5618bdc75150, event=0x7ffc2a7f7f50) at /usr/include/c++/9/bits/atomic_base.h:413
#26 0x00007f11abf7f284 in QWidgetWindow::event (event=0x7ffc2a7f7f50, this=0x5618bdc75150) at kernel/qwidgetwindow.cpp:300
#27 QWidgetWindow::event (this=0x5618bdc75150, event=0x7ffc2a7f7f50) at kernel/qwidgetwindow.cpp:239
#28 0x00007f11abf1ddc3 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x5618bdc75150, e=0x7ffc2a7f7f50) at kernel/qapplication.cpp:3637
#29 0x00007f11abf26bd8 in QApplication::notify(QObject*, QEvent*) () at kernel/qapplication.cpp:3161
#30 0x00007f11ab3d9d7a in QCoreApplication::notifyInternal2 (receiver=0x5618bdc75150, event=0x7ffc2a7f7f50) at ../../include/QtCore/5.15.3/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:332
#31 0x00007f11ab7bf578 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at kernel/qguiapplication.cpp:2282
#32 0x00007f11ab7c0be5 in QGuiApplicationPrivate::processWindowSystemEvent (e=0x5618be024810) at kernel/qguiapplication.cpp:2002
#33 0x00007f11ab7987bc in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#34 0x00007f1199a171ce in xcbSourceDispatch (source=<optimized out>) at qxcbeventdispatcher.cpp:105
#35 0x00007f11a931f17d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#36 0x00007f11a931f400 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#37 0x00007f11a931f4a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#38 0x00007f11ab434642 in QEventDispatcherGlib::processEvents (this=0x5618bbe6f6e0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#39 0x00007f11ab3d887b in QEventLoop::exec (this=this@entry=0x7ffc2a7f82f0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:141
#40 0x00007f11ac12a40d in QDialog::exec (this=0x5618bd60d160) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#41 0x00005618ba02f9b5 in KateMainWindow::showPluginConfigPage (id=0, configpageinterface=0x0, this=0x5618bbfdc810) at ./kate/katemainwindow.cpp:893
#42 KateMainWindow::showPluginConfigPage (this=0x5618bbfdc810, configpageinterface=0x0, id=0) at ./kate/katemainwindow.cpp:882
#43 0x00005618ba070794 in KateMainWindow::qt_static_metacall (_o=0x5618bbfdc810, _c=<optimized out>, _id=<optimized out>, _a=0x7ffc2a7f84f0) at ./obj-x86_64-linux-gnu/kate/kate-lib_autogen/EWIEGA46WW/moc_katemainwindow.cpp:412
#44 0x00007f11ab410e30 in doActivate<false> (sender=0x5618bc58e3a0, signal_index=4, argv=0x7ffc2a7f84f0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:395
#45 0x00007f11ab40a1c7 in QMetaObject::activate (sender=sender@entry=0x5618bc58e3a0, m=m@entry=0x7f11ac4311c0 <QAction::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7ffc2a7f84f0) at kernel/qobject.cpp:3946
#46 0x00007f11abf178e6 in QAction::triggered (this=this@entry=0x5618bc58e3a0, _t1=<optimized out>) at .moc/moc_qaction.cpp:376
#47 0x00007f11abf19fb8 in QAction::activate (this=0x5618bc58e3a0, event=<optimized out>) at kernel/qaction.cpp:1161
#48 0x00007f11ac0a5362 in QMenuPrivate::activateCausedStack (this=this@entry=0x5618bc3ee490, causedStack=..., action=action@entry=0x5618bc58e3a0, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1384
#49 0x00007f11ac0acaae in QMenuPrivate::activateAction (this=this@entry=0x5618bc3ee490, action=action@entry=0x5618bc58e3a0, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1461
#50 0x00007f11ac0add42 in QMenu::mouseReleaseEvent (this=0x5618bc433fe0, e=0x7ffc2a7f8bd0) at widgets/qmenu.cpp:2967
#51 0x00007f11abf60d76 in QWidget::event (this=this@entry=0x5618bc433fe0, event=event@entry=0x7ffc2a7f8bd0) at kernel/qwidget.cpp:8677
#52 0x00007f11ac0b034b in QMenu::event (this=0x5618bc433fe0, e=0x7ffc2a7f8bd0) at widgets/qmenu.cpp:3089
#53 0x00007f11abf1ddc3 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x5618bc433fe0, e=0x7ffc2a7f8bd0) at kernel/qapplication.cpp:3637
#54 0x00007f11abf26dc7 in QApplication::notify(QObject*, QEvent*) () at kernel/qapplication.cpp:3081
#55 0x00007f11ab3d9d7a in QCoreApplication::notifyInternal2 (receiver=0x5618bc433fe0, event=0x7ffc2a7f8bd0) at ../../include/QtCore/5.15.3/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:332
#56 0x00007f11abf260c7 in QApplicationPrivate::sendMouseEvent (receiver=0x5618bc433fe0, event=event@entry=0x7ffc2a7f8bd0, alienWidget=0x0, nativeWidget=0x5618bc433fe0, buttonDown=<optimized out>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at kernel/qapplication.cpp:2619
#57 0x00007f11abf7c9fe in QWidgetWindow::handleMouseEvent (this=0x7f119400f7d0, event=0x7ffc2a7f9050) at /usr/include/c++/9/bits/atomic_base.h:413
#58 0x00007f11abf7f284 in QWidgetWindow::event (event=0x7ffc2a7f9050, this=0x7f119400f7d0) at kernel/qwidgetwindow.cpp:300
#59 QWidgetWindow::event (this=0x7f119400f7d0, event=0x7ffc2a7f9050) at kernel/qwidgetwindow.cpp:239
#60 0x00007f11abf1ddc3 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x7f119400f7d0, e=0x7ffc2a7f9050) at kernel/qapplication.cpp:3637
#61 0x00007f11abf26bd8 in QApplication::notify(QObject*, QEvent*) () at kernel/qapplication.cpp:3161
#62 0x00007f11ab3d9d7a in QCoreApplication::notifyInternal2 (receiver=0x7f119400f7d0, event=0x7ffc2a7f9050) at ../../include/QtCore/5.15.3/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:332
#63 0x00007f11ab7bf578 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at kernel/qguiapplication.cpp:2282
#64 0x00007f11ab7c0be5 in QGuiApplicationPrivate::processWindowSystemEvent (e=0x5618bd60d680) at kernel/qguiapplication.cpp:2002
#65 0x00007f11ab7987bc in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#66 0x00007f1199a171ce in xcbSourceDispatch (source=<optimized out>) at qxcbeventdispatcher.cpp:105
#67 0x00007f11a931f17d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#68 0x00007f11a931f400 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#69 0x00007f11a931f4a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#70 0x00007f11ab434642 in QEventDispatcherGlib::processEvents (this=0x5618bbe6f6e0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#71 0x00007f11ab3d887b in QEventLoop::exec (this=this@entry=0x7ffc2a7f93f0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:141
#72 0x00007f11ab3e0a24 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#73 0x00005618ba0242c5 in main (argc=<optimized out>, argv=<optimized out>) at ./kate/main.cpp:700
[Inferior 1 (process 24244) detached]

Possible duplicates by query: bug 344767, bug 344700, bug 335065, bug 294037, bug 283122.

Reported using DrKonqi
Comment 1 Nate Graham 2022-04-06 17:50:42 UTC
#5  0x00007f11ad2eb665 in KateModeMenuList::reloadItems (this=0x5618bd0f2a00) at ./src/mode/katemodemenulist.cpp:193
#6  0x00007f11ad2dd2a7 in KateModeManager::update (this=this@entry=0x5618bbf420f0) at ./src/view/kateview.h:1035
#7  0x00007f11ad2de2f3 in KateModeManager::save (this=0x5618bbf420f0, v=...) at ./src/mode/katemodemanager.cpp:221
#8  0x00007f11ad2e065a in ModeConfigPage::apply (this=0x5618bd7f5a20) at ./src/utils/kateglobal.h:242
#9  0x00007f11ad28b0a5 in KateSaveConfigTab::apply (this=0x5618bd8eaa40) at ./src/dialogs/katedialogs.cpp:971
#10 0x00005618ba08bc21 in KateConfigDialog::slotApply (this=0x5618bd60d160) at ./kate/kateconfigdialog.cpp:384
Comment 2 Waqar Ahmed 2022-04-06 20:57:07 UTC
Git commit c057955fc5a0233a08c26b09d5d7a4a2ddf1755b by Waqar Ahmed.
Committed on 06/04/2022 at 20:56.
Pushed by waqar into branch 'master'.

Fix crash when ModeMenuList wasn't init but we try to reload it

M  +5    -0    src/mode/katemodemenulist.cpp

https://invent.kde.org/frameworks/ktexteditor/commit/c057955fc5a0233a08c26b09d5d7a4a2ddf1755b
Comment 3 Waqar Ahmed 2022-05-14 08:07:21 UTC
*** Bug 453755 has been marked as a duplicate of this bug. ***
Comment 4 Waqar Ahmed 2022-05-24 05:39:52 UTC
*** Bug 454291 has been marked as a duplicate of this bug. ***