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

Andreas Hartmetz ahartmetz at gmail.com
Sun Jan 11 22:39:02 GMT 2009


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