• 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: Saving a core data model to persistent store makes application hang
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving a core data model to persistent store makes application hang


  • Subject: Re: Saving a core data model to persistent store makes application hang
  • From: Bill Bumgarner <email@hidden>
  • Date: Sun, 26 Nov 2006 12:36:15 -0800


On Nov 26, 2006, at 11:47 AM, Remco Poelstra wrote:
When I add a relation called "cousins" the "children" relation loses it's connection to the "parent" inverse. Is that what you mean? Is it just that Xcode doesn't show the children-parent connection, while it is there?

You are correct. I'm sorry -- my mistake -- the modeling tools can't support that, though there really isn't any reason why they shouldn't (beyond confusing). (I wonder if you can setup said relationship via the model API? That gets ugly quickly, though. And CoreData may still not do the right thing.)


So, relationship management by hand would appear to be your only option. Nuts.

Oops, yes, added a check for the key.

The samples look like your program is drowning in a notification storm. Without knowing the size of the object graph, etc, it is hard to tell if this is "normal" processing (that you could restructure your code slightly to optimize away) or you have set up a situation where a change notification is, itself, triggering a change that causes a second change notification, causing etc.etc.etc....

The object graph only contains one instance when I test it. I've made a screenshot of the model, perhaps it will help: http://beryllium.net/~remco/Image1.png
Your idea about a notification triggering itself brought me the idea to surround all Chart_elements methods with an NSLog statement, outputting the method name. I get the following output when I have only one instance in the object graph:
2006-11-26 20:40:47.672 MusicStructure[1271] bounds called
2006-11-26 20:40:47.672 MusicStructure[1271] bounds finished
2006-11-26 20:40:47.673 MusicStructure[1271] parent called
2006-11-26 20:40:47.673 MusicStructure[1271] parent finished
2006-11-26 20:40:47.673 MusicStructure[1271] willsave called
2006-11-26 20:40:47.675 MusicStructure[1271] willsave finished
After this it simply keeps repeating. So there seems to be nothing wrong with the relations, at least, it only requests the parent relation. But why would it keep on looping over that one object?

These 6 lines keep repeating? That would indicate that there is something in your code that triggers a change notificaiton that triggers a subsequent change that causes another notification ad nauseum.


b.bum
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • [Solved] Re: Saving a core data model to persistent store makes application hang
      • From: Remco Poelstra <email@hidden>
    • Re: Saving a core data model to persistent store makes application hang
      • From: Jim Correia <email@hidden>
References: 
 >Saving a core data model to persistent store makes application hang (From: Remco Poelstra <email@hidden>)
 >Re: Saving a core data model to persistent store makes application hang (From: Bill Bumgarner <email@hidden>)
 >Re: Saving a core data model to persistent store makes application hang (From: Bill Bumgarner <email@hidden>)
 >Re: Saving a core data model to persistent store makes application hang (From: Remco Poelstra <email@hidden>)

  • Prev by Date: Re: Mysterious run time error
  • Next by Date: Re: Cocoa objects in Quartz Composer
  • Previous by thread: Re: Saving a core data model to persistent store makes application hang
  • Next by thread: Re: Saving a core data model to persistent store makes application hang
  • Index(es):
    • Date
    • Thread