gap-dev-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gap-dev-discuss] exception when quitting Cynthiune


From: Andreas Schik
Subject: Re: [Gap-dev-discuss] exception when quitting Cynthiune
Date: Fri, 04 May 2012 11:01:05 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120412 Thunderbird/11.0.1

Hi,

Am 03.05.2012 19:54, schrieb Philippe Roussel:
> Le 03/05/2012 19:15, Sebastian Reitenbach a écrit :
>> Hi,
>>
>> quitting Cynthiune, I usually saw the following exception on the console:
>>
>> 2012-05-03 18:57:00.203 Cynthiune[11772] Problem posting
notification: <NSException: 0x7cb257a4> NAME:NSInvalidArgumentException
REASON:GSDictionary(instance) does not recognize setObject:forKey:
INFO:(null)
>>
>> Which happens in line 258 of GeneralPreferences.m
>>
>> Below my patch to fix the problem, which works for me.
>> I'd appreciate if someone could take a look and let me know if there
might be problems with it.
> The patch makes sense and should be applied in my opinion.
>
> The thing is, I'm not sure I understand why the current code doesn't
> work. Can someone show me the light ?
yes, I can.
The call to [preference objectForKey: @"WindowsInformation"]; usually
does not return a mutable object (here an NSMutableDictionary). This
used to be different in former versions of GNUstep. I think, GNUstep has
been adjusted to changes in MacOS. I stumbled across that in Burn, too.
The code will probabyl work the very first time it is executed, i.e.
when there are no defaults stored, yet. In that case you actually put an
NSMutableDictionary into the preferences dictionary (line 143 of
GeneralPreference.m). But later, when preference gets loaded from the
user defaults it contains only immutable objects.
BTW, preferences is created correctly in line 160, but this does not
cascade down the line of embedded dictionaries.


--

Grüße / Cheers
Andreas Schik

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]