• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSArchiver problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Class and methods for RadioButton
  • Next by Date: Re: Simple Cocoa Movie Player? QTVR Mouse Controller?
  • Previous by thread: NSArchiver problem
  • Next by thread: How to authenticate user
  • Index(es):
    • Date
    • Thread