• 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 Memory issue on loading a saved file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data Memory issue on loading a saved file


  • Subject: Re: Core Data Memory issue on loading a saved file
  • From: Dave Fernandes <email@hidden>
  • Date: Fri, 30 Mar 2007 15:32:57 -0400

Can you post the code for the init method? It sounds like maybe something isn't being retained that should be retained.

On Mar 30, 2007, at 2:25 PM, Andrew Kinnie wrote:

I have a document-based Core Data app that contains an entity with an attribute set to be an int16 in the data model.

I can set the value via the UI using bindings, and save it, but when I load that file back into the app, it crashes with an EXC_BAD_ACCESS error on the initialization of the array. Currently, I have that attribute set by a popup which is bound to an array in myDocument. The array is an array of NSString objects, and the indices are the numbers I want to associate with those strings.

In other words:
I have an NSArray which is declared in the myDocument header, and initialized in the myDocument -init method.
I have an NSArrayController that has its contentArray binding bound to that array.
I have the popUpButton's content bound to this NSArrayController (This works, the NSStrings appear in the popup).
I also have the selectedIndex bound to the entity's attribute, because I want the index to be the number stored in the entity's attribute.
(This also appears to work because when I change it and save it as an xml file, the saved file contains the proper number in the appropriate attribute)


However, when I load, it crashes in the init method of myDocument. There is nothing else in the init: method that was not there by default, other than creating the array.

I have no idea what is causing this, as I don't think I've violated any of the memory rules for Core Data apps. The bindings may be questionable, but they seemed to work. I have been trying to resolve this for several days and reading various docs and debugging hints, but I don't seem to be any closer.

Any insight would be appreciated.

Andrew

PS: I asked about this before, but less clearly, so I am re- posting without the extraneous details.
_______________________________________________


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:
40utoronto.ca


This email sent to email@hidden

_______________________________________________

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


References: 
 >Core Data Memory issue on loading a saved file (From: Andrew Kinnie <email@hidden>)

  • Prev by Date: Re: Convience Methods and Collections
  • Next by Date: Re: Unresponsive mouseMoved method
  • Previous by thread: Core Data Memory issue on loading a saved file
  • Next by thread: Re: Core Data Memory issue on loading a saved file
  • Index(es):
    • Date
    • Thread