[Kde-pim] [Patch]KMail crashes in the configure filters dialog (trunk)
Frank Osterfeld
frank.osterfeld at gmx.de
Fri Mar 30 18:31:29 BST 2007
Hi,
On Friday 30 March 2007, Thomas McGuire wrote:
> Hi,
>
> KMail crashes when using Settings->Configure filters.
So does korganizer at startup, for the same reason (when creating calendar
resource).
> The reason is an error in kdepimlibs/kresources, introduced by commit
> 643999. A KConfigGroup without a master is created in factory.h, which is
> invalid and leads to the crash.
Yes, KConfig* was replaced with KConfigGroup(0, 0) which is not a good idea
for the reasons you mentioned. One can't do anything with a KConfigGroup
without valid parent, and nearly every call will result in a crash. So I
would also add the asserts in KConfigGroup.
> This patch fixes that by using a pointer again.
- Resource *resource( const QString& type, const KConfigGroup &group =
KConfigGroup(0,0) );
+ Resource *resource( const QString& type, const KConfigGroup *group = 0 );
I would rather omit the default value and add a second method:
- Resource *resource( const QString& type, const KConfigGroup &group =
KConfigGroup(0,0) );
+ Resource *resource( const QString& type, const KConfigGroup &group);
+ Resource *resource( const QString& type);
That avoids the unnecessary pointer.
> Because there are changes in KPluginFactoryBase, knotes needs to be
> adjusted as well. That patch is also attached.
So whole KDE-PIM compiles with the changes, especially the ones in resource.h?
> I also tried adding asserts to KConfigGroup to detect further errors of
> this kind, however this breaks the build of kdepim, because kode is used in
> the build process and triggers that assert. My guess is that this is an
> error in kode.
> Because the build breaks, the kdelibs part should probably not (yet?) be
> commited.
> Please review the patch and commit. I don't have a SVN account.
Can someone of the resource framework's main developers gives his comments and
OK?
Frank
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20070330/391f7203/attachment.sig>
-------------- next part --------------
_______________________________________________
kde-pim mailing list
kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
More information about the kde-pim
mailing list