bug-gnustep
[Top][All Lists]
Advanced

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

Re: [bugs #8498] [MinGW] NSUnarchiver crashes


From: Wim Oudshoorn
Subject: Re: [bugs #8498] [MinGW] NSUnarchiver crashes
Date: Sun, 11 Apr 2004 10:40:40 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (darwin)

Gregory John Casamento <greg_casamento@yahoo.com> writes:

> In every case, all files .gorm and non-gorm archives are failing when
> unarchiving NS*Number objects.
>
> I believe that since the NS*Number objects are cached the release done by the
> assign at the following location in NSUnarchiver is causing the crash I'm
> seeing:
>
>
> FROM NSUnarchiver:
>                 obj = [c allocWithZone: zone];
>                 /*
>                  * The objMap array does not retain its contents directly,
>                  * so we perform explicit retain/release as we add objects
>                  * to and remove objects from the array.
>                  */
>                 RETAIN(obj);
>                 GSIArrayAddItem(objMap, (GSIArrayItem)obj);
>
>                 rep = [obj initWithCoder: self];
>                 if (rep != obj)
>                   {
> ---> Dying here!!     ASSIGN(obj, rep);
>                     GSIArraySetItemAtIndex(objMap, (GSIArrayItem)obj, xref);
>                   }

That was exactly the reason that my patch did NOT have any code 
here to change the retain count.  My code might be wrong,
but I think this is wrong as well.

Fortunately I am not at work :-), but that means I can not
test and take a carefull look at the issue.  But I will study the
new patches.

Wim Oudshoorn.






reply via email to

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