Crash in KConfig at kdelibs/kdecore/config/kconfig.cpp

Ben Cooksley sourtooth at gmail.com
Sun Jan 11 23:27:03 GMT 2009


I use KConfigGroup entirely through KDesktopFile. I use the methods
desktopGroup() and actionGroup(QString) to retrieve the action.
therefore I have never had to touch KConfig directly.

regards,

Ben Cooksley.

On 1/12/09, Andreas Hartmetz <ahartmetz at gmail.com> wrote:
> On Sunday 11 January 2009 20:52:41 Ben Cooksley wrote:
>> I made some more changes to my code and managed to avoid crashing in
>> KConfigGroup. the secret is to never pointerise KConfigGroup, it can't
>> handle it. It will crash, no way around it.
>>
> That does not sound right.
> The most likely error when dealing with KConfigGroup is to forget to keep
> its
> KConfig parent object around. A KConfigGroup will crash if its parent is
> destroyed. In some cases you don't have to care about, e.g. because the
> KConfig instance is a global variable or otherwise very long-lived. In some
> cases you do have to care about it.
> Does that apply to your use case? :)
>
> Cheers,
> Andreas
>




More information about the kde-core-devel mailing list