https://bugs.kde.org/show_bug.cgi?id=427242

            Bug ID: 427242
           Summary: deleteEntry called on invalid group
           Product: frameworks-kxmlgui
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: crash
          Priority: NOR
         Component: general
          Assignee: kdelibs-b...@kde.org
          Reporter: sit...@kde.org
  Target Milestone: ---

ab43b986f3de20ff15b6438e56bfe29428bee3b1 introduced

> +    d->autoSaveGroup.deleteEntry("RestorePositionForNextInstance");

autoSaveGroup can conceivably be a default constructed group, which is an
invalid group without dptr by the looks of it

kconfiggroup.cpp:
> KConfigGroup::KConfigGroup() : d()

This leads to, e.g., konsole crashing just about every time when closing any of
the instance's windows because the kconfiggroup is invalid.
Supposedly this should either use a different ctor for the group or guard calls
to the group.

(gdb) bt
#0  0x00007f872f34c188 in KConfigGroup::config (this=0x557b35522048) at
./src/core/kconfiggroup.cpp:618
#1  0x00007f872f34f01f in KConfigGroup::deleteEntry
(this=this@entry=0x557b35522048, key=key@entry=0x7f872f8bcae0
"RestorePositionForNextInstance", flags=flags@entry=...) at
./src/core/kconfiggroup.cpp:1145
#2  0x00007f872f8649e8 in KMainWindow::closeEvent (this=0x557b35520fd0,
e=0x7ffd30aec370) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qflags.h:121
#3  0x00007f872ee21db6 in QWidget::event(QEvent*) () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#4  0x00007f872ef3aa18 in QMainWindow::event(QEvent*) () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5                                    
#5  0x00007f872f864e6b in KMainWindow::event (this=this@entry=0x557b35520fd0,
ev=ev@entry=0x7ffd30aec370) at ./src/kmainwindow.cpp:907
#6  0x00007f872f8afafb in KXmlGuiWindow::event (this=0x557b35520fd0,
ev=0x7ffd30aec370) at ./src/kxmlguiwindow.cpp:109
#7  0x00007f872eddecc3 in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#8  0x00007f872ede7c70 in QApplication::notify(QObject*, QEvent*) () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#9  0x00007f872ff316aa in QCoreApplication::notifyInternal2
(receiver=0x557b35520fd0, event=0x7ffd30aec370) at
../../include/QtCore/5.15.0/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:325
#10 0x00007f872ee1d17e in
QWidgetPrivate::close_helper(QWidgetPrivate::CloseMode) () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#11 0x00007f872ff685ae in QtPrivate::QSlotObjectBase::call (a=0x7ffd30aec460,
r=0x557b35520fd0, this=0x557b35597140) at
../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#12 doActivate<false> (sender=0x557b3556d390, signal_index=3,
argv=0x7ffd30aec460) at kernel/qobject.cpp:3886
#13 0x00007f872ff685ae in QtPrivate::QSlotObjectBase::call (a=0x7ffd30aec5a0,
r=0x557b3556d390, this=0x557b35595c70) at
../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#14 doActivate<false> (sender=0x557b355240f0, signal_index=11,
argv=0x7ffd30aec5a0) at kernel/qobject.cpp:3886
#15 0x00007f872f961f03 in
Konsole::TabbedViewContainer::empty(Konsole::TabbedViewContainer*) () from
/usr/lib/x86_64-linux-gnu/libkonsoleprivate.so.20
#16 0x00007f872f9e68aa in Konsole::TabbedViewContainer::viewDestroyed(QObject*)
() from /usr/lib/x86_64-linux-gnu/libkonsoleprivate.so.20
#17 0x00007f872ff685ae in QtPrivate::QSlotObjectBase::call (a=0x7ffd30aec6f0,
r=0x557b355240f0, this=0x557b3567b140) at
../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#18 doActivate<false> (sender=0x557b3570fd90, signal_index=0,
argv=0x7ffd30aec6f0) at kernel/qobject.cpp:3886
#19 0x00007f872ff61977 in QMetaObject::activate (sender=<optimized out>,
m=m@entry=0x7f873020fbe0 <QObject::staticMetaObject>,
local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffd30aec6f0)
at kernel/qobject.cpp:3946
#20 0x00007f872ff61a33 in QObject::destroyed (this=<optimized out>,
_t1=<optimized out>) at .moc/moc_qobject.cpp:219
#21 0x00007f872ee1d8eb in QWidget::~QWidget() () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007f872f967735 in ?? () from
/usr/lib/x86_64-linux-gnu/libkonsoleprivate.so.20
#23 0x00007f872ff5eec3 in QObject::event (this=0x557b3570fd90,
e=0x557b35679160) at kernel/qobject.cpp:1301
#24 0x00007f872ee21d5d in QWidget::event(QEvent*) () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#25 0x00007f872eed2062 in QFrame::event(QEvent*) () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#26 0x00007f872eddecc3 in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#27 0x00007f872ede7c70 in QApplication::notify(QObject*, QEvent*) () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#28 0x00007f872ff316aa in QCoreApplication::notifyInternal2
(receiver=0x557b3570fd90, event=0x557b35679160) at
../../include/QtCore/5.15.0/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:325
#29 0x00007f872ff33fa1 in QCoreApplicationPrivate::sendPostedEvents
(receiver=0x0, event_type=0, data=0x557b3533d5e0) at
kernel/qcoreapplication.cpp:1815
#30 0x00007f872ff8c837 in postEventSourceDispatch (s=0x557b354823e0) at
kernel/qeventdispatcher_glib.cpp:277
#31 0x00007f872daf1fbd in g_main_context_dispatch () from
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007f872daf2240 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#33 0x00007f872daf22e3 in g_main_context_iteration () from
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#34 0x00007f872ff8be92 in QEventDispatcherGlib::processEvents
(this=0x557b35488d20, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#35 0x00007f872ff301bb in QEventLoop::exec (this=this@entry=0x7ffd30aecdd0,
flags=..., flags@entry=...) at
../../include/QtCore/../../src/corelib/global/qflags.h:141
#36 0x00007f872ff38354 in QCoreApplication::exec () at
../../include/QtCore/../../src/corelib/global/qflags.h:121
#37 0x00007f873030901f in kdemain () from
/usr/lib/x86_64-linux-gnu/libkdeinit5_konsole.so
#38 0x00007f872fab60b3 in __libc_start_main (main=0x557b3493b320, argc=6,
argv=0x7ffd30aed098, init=<optimized out>, fini=<optimized out>,
rtld_fini=<optimized out>, stack_end=0x7ffd30aed088) at ../csu/libc-start.c:308
#39 0x0000557b3493b35e in _start ()
(gdb) p d
$1 = {d = 0x0}

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to