Re: NSArchiver problem
Re: NSArchiver problem
- Subject: Re: NSArchiver problem
- From: email@hidden
- Date: Wed, 29 Aug 2001 21:34:00 +0200
And I unarchive the same object when my application starts. The problem
description goes as follows: The first run, everything works fine. No
objects to unarchive, so I create a new one, when user Quits, object is
saved. Then 2nd run for the app it restores the object, but when it
goes to save it quits with signal 10 (SIGBUS).
Is it possible you are forgetting to retain the object when you
unarchive it? This would probably lead to a SIGBUS error, and it would
also fit with everything going OK the first time, since you probably use
alloc and init when you create your new object. I presume when you
unarchive you are doing something like
unarchiveObjectWithFile:(NSString *)path
This will return a autoreleased object which will of course be
deallocated if you don't retain it.
Hope this helps.
Drew McCormack