Hello Synthea,
just tried to reproduce the crash.

One note first, if you follow the advice in the following link
the backtrace could be much more meaningful for the maintainer
when at least for the crashing application, better for all
the shared objects in the backtrace the debugging symbols are installed.

https://wiki.debian.org/HowToGetABacktrace


I was able to reproduce the issue by following these steps:

- Start kate
- Save the current file or open an existing one
- Menu Projects - Go To



Thread 1 "kate" received signal SIGSEGV, Segmentation fault.
QStackedWidget::currentWidget (this=0x61006c0070002f) at 
widgets/qstackedwidget.cpp:231
231     widgets/qstackedwidget.cpp: Datei oder Verzeichnis nicht gefunden.
(gdb) bt
#0  QStackedWidget::currentWidget (this=0x61006c0070002f) at 
widgets/qstackedwidget.cpp:231
#1  0x00007fffe0f4cad4 in KateProjectPluginView::slotProjectIndex 
(this=0x555555a56260) at ./addons/project/kateprojectpluginview.cpp:499
#2  0x00007fffe0f69e55 in KateProjectPluginView::qt_static_metacall 
(_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized 
out>) at 
./obj-x86_64-linux-gnu/addons/project/kateprojectplugin_automoc.dir/moc_kateprojectplu_NJKBYJVJBCTYAZ.cpp:170
#3  0x00007ffff3c295e9 in QMetaObject::activate 
(sender=sender@entry=0x555555a536b0, signalOffset=<optimized out>, 
local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fffffffd340) 
at kernel/qobject.cpp:3740
#4  0x00007ffff3c29f07 in QMetaObject::activate 
(sender=sender@entry=0x555555a536b0, m=m@entry=0x7ffff4e89f60 
<QAction::staticMetaObject>, local_signal_index=local_signal_index@entry=1, 
argv=argv@entry=0x7fffffffd340) at kernel/qobject.cpp:3602
#5  0x00007ffff49aa1c2 in QAction::triggered (this=this@entry=0x555555a536b0, 
_t1=<optimized out>) at .moc/moc_qaction.cpp:369
#6  0x00007ffff49acbb0 in QAction::activate (this=0x555555a536b0, 
event=<optimized out>) at kernel/qaction.cpp:1170
#7  0x00007ffff4b1c1ca in QMenuPrivate::activateCausedStack 
(this=this@entry=0x555555a86c90, causedStack=..., 
action=action@entry=0x555555a536b0, action_e=action_e@entry=QAction::Trigger, 
self=self@entry=true) at widgets/qmenu.cpp:1140
#8  0x00007ffff4b23854 in QMenuPrivate::activateAction 
(this=this@entry=0x555555a86c90, action=action@entry=0x555555a536b0, 
action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at 
widgets/qmenu.cpp:1217
#9  0x00007ffff4b24826 in QMenu::mouseReleaseEvent (this=<optimized out>, 
e=0x7fffffffd990) at widgets/qmenu.cpp:2680
#10 0x00007ffff49f8278 in QWidget::event (this=this@entry=0x555555a460d0, 
event=event@entry=0x7fffffffd990) at kernel/qwidget.cpp:9161
#11 0x00007ffff4b26b53 in QMenu::event (this=0x555555a460d0, e=0x7fffffffd990) 
at widgets/qmenu.cpp:2799
#12 0x00007ffff49b0b8c in QApplicationPrivate::notify_helper (this=<optimized 
out>, receiver=0x555555a460d0, e=0x7fffffffd990) at kernel/qapplication.cpp:3799
#13 0x00007ffff49b91fd in QApplication::notify (this=<optimized out>, 
receiver=0x555555a460d0, e=0x7fffffffd990) at kernel/qapplication.cpp:3273
#14 0x00007ffff3bfd9e0 in QCoreApplication::notifyInternal2 
(receiver=receiver@entry=0x555555a460d0, event=event@entry=0x7fffffffd990) at 
kernel/qcoreapplication.cpp:988
#15 0x00007ffff49b78ad in QCoreApplication::sendEvent (event=<optimized out>, 
receiver=<optimized out>) at 
../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#16 QApplicationPrivate::sendMouseEvent 
(receiver=receiver@entry=0x555555a460d0, event=event@entry=0x7fffffffd990, 
alienWidget=0x0, alienWidget@entry=0x555555a460d0, nativeWidget=0x555555a460d0, 
buttonDown=buttonDown@entry=0x7ffff4eb8cb0 <qt_button_down>, 
lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:2771
#17 0x00007ffff4a12d16 in QWidgetWindow::handleMouseEvent 
(this=this@entry=0x555555ab9370, event=event@entry=0x7fffffffddb0) at 
kernel/qwidgetwindow.cpp:511
#18 0x00007ffff4a15313 in QWidgetWindow::event (this=0x555555ab9370, 
event=0x7fffffffddb0) at kernel/qwidgetwindow.cpp:239
#19 0x00007ffff49b0b8c in QApplicationPrivate::notify_helper (this=<optimized 
out>, receiver=0x555555ab9370, e=0x7fffffffddb0) at kernel/qapplication.cpp:3799
#20 0x00007ffff49b8341 in QApplication::notify (this=0x7fffffffe420, 
receiver=0x555555ab9370, e=0x7fffffffddb0) at kernel/qapplication.cpp:3556
#21 0x00007ffff3bfd9e0 in QCoreApplication::notifyInternal2 
(receiver=receiver@entry=0x555555ab9370, event=event@entry=0x7fffffffddb0) at 
kernel/qcoreapplication.cpp:988
#22 0x00007ffff4415b03 in QCoreApplication::sendSpontaneousEvent 
(event=0x7fffffffddb0, receiver=0x555555ab9370) at 
../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:234
#23 QGuiApplicationPrivate::processMouseEvent (e=0x555555d6b1e0) at 
kernel/qguiapplication.cpp:1903
#24 0x00007ffff4417685 in QGuiApplicationPrivate::processWindowSystemEvent 
(e=e@entry=0x555555d6b1e0) at kernel/qguiapplication.cpp:1687
#25 0x00007ffff43f561b in QWindowSystemInterface::sendWindowSystemEvents 
(flags=...) at kernel/qwindowsysteminterface.cpp:659
#26 0x00007fffe4eb64c0 in userEventSourceDispatch (source=<optimized out>) at 
eventdispatchers/qeventdispatcher_glib.cpp:76
#27 0x00007fffee3917f7 in g_main_dispatch (context=0x7fffdc0016f0) at 
././glib/gmain.c:3203
#28 g_main_context_dispatch (context=context@entry=0x7fffdc0016f0) at 
././glib/gmain.c:3856
#29 0x00007fffee391a60 in g_main_context_iterate 
(context=context@entry=0x7fffdc0016f0, block=block@entry=1, 
dispatch=dispatch@entry=1, self=<optimized out>) at ././glib/gmain.c:3929
#30 0x00007fffee391b0c in g_main_context_iteration (context=0x7fffdc0016f0, 
may_block=may_block@entry=1) at ././glib/gmain.c:3990
#31 0x00007ffff3c5204f in QEventDispatcherGlib::processEvents 
(this=0x5555558930a0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#32 0x00007ffff3bfb9ca in QEventLoop::exec (this=this@entry=0x7fffffffe150, 
flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#33 0x00007ffff3c0413c in QCoreApplication::exec () at 
kernel/qcoreapplication.cpp:1261
#34 0x000055555559b009 in main (argc=<optimized out>, argv=<optimized out>) at 
./kate/main.cpp:576


(gdb) print/x m_stackedProjectInfoViews
$2 = 0x61006c0070002f
(gdb) print *m_stackedProjectInfoViews
Cannot access memory at address 0x61006c0070002f

(gdb) list
494
495     void KateProjectPluginView::slotProjectIndex()
496     {
497         const QString word = currentWord();
498         if (!word.isEmpty()) {
499             auto tabView = 
qobject_cast<QTabWidget*>(m_stackedProjectInfoViews->currentWidget());
500             if (tabView) {
501                 tabView->setCurrentIndex(1);
502             }
503             m_mainWindow->showToolView(m_toolInfoView);


It looks like variable stackedProjectInfoViews got never initialized,
therefore invalid memory is tried to be accessed.

The only place where this variable is set is 
KateProjectPluginView::viewForProject,
which is never executed.


This looks very similar to upstream bugs [1] and [2],
which got a fix in [3].


Could also not observe a crash in current kate 18.04.0-1 in
buster/testing following the same steps.


Kind regards,
Bernhard


[1] https://bugs.kde.org/show_bug.cgi?id=371976
[2] https://bugs.kde.org/show_bug.cgi?id=369008
[3] 
https://cgit.kde.org/kate.git/commit/addons/project/kateprojectpluginview.cpp?id=8666aaab8eac67a2e377d80275e1c6a2860b5a6f

Reply via email to