• 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: Core Data SIGSEGV when opening an existing document
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data SIGSEGV when opening an existing document


  • Subject: Re: Core Data SIGSEGV when opening an existing document
  • From: mmalcolm crawford <email@hidden>
  • Date: Wed, 19 Apr 2006 00:18:03 -0700


On Apr 18, 2006, at 11:56 PM, Larry Fransson wrote:

I put local autorelease pools in every method I could find, namely - init, -makeWindowControllers, -readFromURL:ofType:error:, - configurePersistentStoreCoordinatorForURL:ofType:error, and - windowControllerDidLoadNib:, in an effort to keep the memory use down. Before the autorelease pools were added, the instruction the crash occurred on was usually szone_malloc. After the autorelease pools, it's usually [NSString rangeOfString:].

The crash occurs somewhere after -windowControllerDidLoadNib, but before any of the data is displayed. Is there another method somewhere after that that might be able to benefit from a local autorelease pool? Or am I just hosed?

It's not clear why you're adding local pools? You typically use local pools around loops etc. that *you* own. If you're interrupting the "normal event cycle", it's quite possible you'll end up releasing objects earlier than expected and *introduce* errors (see in particular, for example, <http://developer.apple.com/documentation/ Cocoa/Conceptual/CoreData/Articles/cdMemory.html#//apple_ref/doc/uid/ TP40001860-DontLinkElementID_37>).


Why not start with something simple like explicitly fetching all instances of all entities at startup (see "Batch Faulting..." <http:// developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/ cdPerformance.html#//apple_ref/doc/uid/TP40003468-SW3>)?

mmalc

_______________________________________________
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: Core Data SIGSEGV when opening an existing document
      • From: Larry Fransson <email@hidden>
    • Re: Core Data SIGSEGV when opening an existing document
      • From: Larry Fransson <email@hidden>
References: 
 >Core Data SIGSEGV when opening an existing document (From: Larry Fransson <email@hidden>)

  • Prev by Date: Core Data SIGSEGV when opening an existing document
  • Next by Date: Re: NSImage setBackgroundColor: w|o any effect Š [SOLVED]
  • Previous by thread: Core Data SIGSEGV when opening an existing document
  • Next by thread: Re: Core Data SIGSEGV when opening an existing document
  • Index(es):
    • Date
    • Thread