Bug 429030

Summary: Segfaults on startup if KConfigGui::sessionConfig() returns nullptr
Product: [Applications] kiten Reporter: Frédéric Brière <fbriere>
Component: generalAssignee: Joseph Kerian <jkerian>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Simple patch

Description Frédéric Brière 2020-11-12 20:25:17 UTC
Created attachment 133269 [details]
Simple patch

[Originally submitted as https://bugs.debian.org/974597]

kiten invariably segfaults on startup for me:

#0  0x00007f3833a898ff in KConfigBase::hasGroup (this=0x0,
    group=group@entry=0x561e19ce44a3 "app") at ./src/core/kconfigbase.cpp:22
#1  0x0000561e19cd660a in Kiten::finishInit (this=0x561e1b286560)
    at ./app/kiten.cpp:297

This is due to KConfigGui::sessionConfig() no longer creating a session
config when the application is not actually being restored from an
earlier session, and returning nullptr instead.  Hence the segfault.

Patch attached.
Comment 1 Frédéric Brière 2020-11-12 21:08:35 UTC
My apologies, I just realized this has already been fixed in https://invent.kde.org/education/kiten/commit/0f2de843e84c9c342eaf226c46dd971b427cd92e.

Sorry for the noise.