[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Crash in KConfig at kdelibs/kdecore/config/kconfig.cpp
From:       Andreas Hartmetz <ahartmetz () gmail ! com>
Date:       2009-01-11 22:39:02
Message-ID: 200901112339.02702.ahartmetz () gmail ! com
[Download RAW message or body]

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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic