discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Defaults being destroyed (Solved?)


From: Adam Fedor
Subject: Re: Defaults being destroyed (Solved?)
Date: Tue, 27 Aug 2002 10:01:31 -0600
User-agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.0.0) Gecko/20020610

Richard Frith-Macdonald wrote:

On Tuesday, August 27, 2002, at 01:27 PM, Stefan Urbanek wrote:

On 2002-08-27 11:31:43 +0100 Richard Frith-Macdonald <richard@brainstorm.co.uk> wrote:

Okay, after thousants of NSLog lines here it is:

In NSUserDefaults around line 1301 in -synchronize:

     if (![_persDomains writeToFile: _defaultsDatabase atomically: YES])
    {
           NSLog(@"Error while writing");
      [_fileLock unlock];
      [_lock unlock];
      return NO;
    }
     ASSIGN(_lastSync, [NSDate date]);
+     RELEASE(_changedDomains);
+     _changedDomains = nil;

Last two lines have to be added.


I'd already modified the code to put DESTROY(_changedDomains) at line 1304 when I added the locking this morning (forgot that and hadn't realised it might be the cause of your problem ... since it just causes defaults to be written out
unnecessarily).

If this fixes your problem, I can see why it didn't show up on my debian systems (I tested after making these changes), but I thought I did my first run on an unmodified redhat system and I'm surprised it didn't show up there ... perhaps
an accident of timing when I ran the tests?


I ran the test before updating to Richard's changes and I got the problem. After the change, the problem went away, so at least one of the changes seems to have fixed the problem.


--
Adam Fedor, Digital Optics Corp.      | I'm glad I hate spinach, because
http://www.doc.com                    | if I didn't, I'd eat it, and you
                                      | know how I hate the stuff.





reply via email to

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