My newness to xcode has had me scratching my head over this problem for 2 days now and anything I've googled and feels slightly related doesn't appear to work. I see this is a very regular problem and it's usually to do with NSManagedObject being released when it shouldn't be. My problem is extra puzzling to me because of 3 reasons:
- I haven't edited the Core Data co开发者_高级运维de in my appdelegate file. It's exactly as it was set up.
- I set up the NSArrayController entry adding using bindings in interface builder - not typed code. I don't understand how it crashes this easily using a very automated way of establishing the model.
- I'm not having any luck getting clues from the console, debugger or zombie mode enabled. All I get is: "Program received signal: “EXC_BAD_ACCESS”. sharedlibrary apply-load-rules all"
I've been following the tutorial from step 13 here: http://cocoadevcentral.com/articles/000085.php#13 to work with my own set up. I'm using the same ok button to add data.
I'm not posting my appDelegate.m code here as I haven't added anything to it or am familiar enough with what part of the code to isolate if I'm to show it here.
Basically, I'm hoping that someone might see a problem in that tutorial I'm following that may cause a crash? It crashes without fail every single time I hit ok to add data from the fields I've filled in (again, see the tutorial as to how I linked up these fields in interface builder). I've only set up a single NSArrayObject to work with Core Data so far so I know which one is causing the problem anyway.
Thanks!
The crashing was caused by an older class I'd made that accessed the NSTableView that was showing results from the Core Data. I'd commented it out so that it wouldn't get in the way now until I had to use it again later, but it seems as though it was still getting in the way. With it removed, the crashes have stopped.
精彩评论