Bug 429030 - Segfaults on startup if KConfigGui::sessionConfig() returns nullptr
Summary: Segfaults on startup if KConfigGui::sessionConfig() returns nullptr
Status: RESOLVED FIXED
Alias: None
Product: kiten
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Debian testing Linux
: NOR crash
Target Milestone: ---
Assignee: Joseph Kerian
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-12 20:25 UTC by Frédéric Brière
Modified: 2020-11-12 21:08 UTC (History)
0 users

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


Attachments
Simple patch (1.27 KB, patch)
2020-11-12 20:25 UTC, Frédéric Brière
Details

Note You need to log in before you can comment on or make changes to this bug.
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.