• 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: coredata framework daemon-safe?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coredata framework daemon-safe?


  • Subject: Re: coredata framework daemon-safe?
  • From: "P Smith" <email@hidden>
  • Date: Wed, 17 May 2006 14:40:07 +0530

> While saving to a file for the first time, my daemon crashes at
> [ moc save]

OK -- that indicates that one of your managed objects is hosed --
corrupted or over-released --prior to the save.

What does the backtrace look like at the point of the crash?

0 com.apple.Foundation 0x9294d120 _NSRaiseError + 264 1 com.apple.CoreData 0x940d8f34 -[NSManagedObjectContext save:] + 1380

Also, the code you posted includes references to locking/unlocking
the managed object context.  That indicates that there is potential
threading going on?  What are the other threads doing?


Multiple threads might be using the class I have implemented. Each
time I need to add the entry to the database, I create instance of
NSManagedObjectContext and release it after the operation is
completed.

(relatively straightforward code example deleted)

>  Entity *entity = [[[Entity alloc] initWithEntity:myEntity
>           insertIntoManagedObjectContext:moc] autorelease];
>
>       [ myEntity setName : [NSString stringWithCString: fileName]];

This looks a bit odd. entity then myEntity?


Something similar to the example code:

   NSEntityDescription *runEntity = [[mom entitiesByName] objectForKey:@"Run"];
   Run *run = [[[Run alloc] initWithEntity:runEntity
           insertIntoManagedObjectContext:moc] autorelease];


b.bum

Thanks, PS _______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: coredata framework daemon-safe?
      • From: Bill Bumgarner <email@hidden>
References: 
 >coredata framework daemon-safe? (From: "P Smith" <email@hidden>)
 >Re: coredata framework daemon-safe? (From: Bill Bumgarner <email@hidden>)
 >Re: coredata framework daemon-safe? (From: "P Smith" <email@hidden>)
 >Re: coredata framework daemon-safe? (From: Bill Bumgarner <email@hidden>)

  • Prev by Date: Re: coredata framework daemon-safe?
  • Next by Date: Re: unique temporary file name
  • Previous by thread: Re: coredata framework daemon-safe?
  • Next by thread: Re: coredata framework daemon-safe?
  • Index(es):
    • Date
    • Thread