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

Core Data SIGSEGV when opening an existing document


  • Subject: Core Data SIGSEGV when opening an existing document
  • From: Larry Fransson <email@hidden>
  • Date: Tue, 18 Apr 2006 23:56:01 -0700

After discovering last night that bindings can really slow down the loading of a document, I thought I was on my way. Then I had another problem.

I have one document containing 500 objects, with each of those objects having a relationship with one of about 120 other objects. After unbinding some of the views, (the ones with @sum in them), the document loaded quickly. Then I created a document with over 2800 objects. I imported the data, worked with the data, saved changes to the data without a problem. On opening the document, though, I get a SIGSEGV. I can't imagine that it's anything in my code, because I really haven't done anything in that area of the document's code - nothing more than altering a user default, anyway. 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?

I ran the application in Malloc Debug, which showed that we were up to over 450MB before the crash. Each object has something short of 50 attributes, which I'm guessing is part of the problem, and probably has a lot of people shouting, "Refactor your model!" (The 120 or so objects they are related to are much smaller.) Refactoring had occurred to me, except that in this particular type of application, users are usually expecting to be able to view all of the attributes of all of the objects in a table. But if the answer is that there's no way to allocate enough memory to do what I'm trying to do, then I suppose refactoring is what I must do, and come up with a new way to display the data.

I'm just hoping that someone can point to something I might have missed because it seems odd that I can create a document and save it, but I can't reopen it.

Larry Fransson
Subcritical
_______________________________________________
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: mmalcolm crawford <email@hidden>
  • Prev by Date: Of Bindings, NSOutlineView, and custom row backgrounds
  • Next by Date: Re: Core Data SIGSEGV when opening an existing document
  • Previous by thread: Of Bindings, NSOutlineView, and custom row backgrounds
  • Next by thread: Re: Core Data SIGSEGV when opening an existing document
  • Index(es):
    • Date
    • Thread