• 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 fetch request crashes the app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data fetch request crashes the app


  • Subject: Re: Core Data fetch request crashes the app
  • From: Chataka <email@hidden>
  • Date: Tue, 1 May 2007 20:47:45 +0900

Thank you very much for your suggestions. I also thought the problem was somewhere else
and could be a memory management issue, but so far, all I know is the fact that my app crashes
when the method is called right after a managed object is removed.


1 - When posting an "it's crashing" thread, never forget to include the type of crash (basically, anything in your run log at the time).

Nothing is left in my run log. Instead, the debugger starts.

2 - You seem to be leaking your fetch request (you're not releasing it) in your example; hopefully there's a release or autorelease somewhere after the lines you pasted.

Yes, fetch request is released after the code I wrote.

3 - Have you stepped through this code with the debugger to see if everything's being handled correctly and that objects you expect to be there really are there? The debugger is your friend.

Yes, I have stepped every single line with the debugger and learned the crash occurs
just when executeFetchRequest: error: method is called. I checked fetchRequest was
correctly set when the method is called.


The following lines are the log of the debugger (displayed in the debugger's top left window)
after executeFetchRequest: error: is called (#25) until the crash. But I don't know what
these lines mean and how I can identify the problematic lines in the code.


Chataka

--------
#0 0x9080d4cd in CFRetain
#1 0x92699b29 in _NSKeyValueObservationInfoCreateByRemoving
#2 0x92699914 in -[NSObject(NSKeyValueObserverRegistration) _removeObserver:forProperty:]
#3 0x9269988c in -[NSObject(NSKeyValueObserverRegistration) removeObserver:forKeyPath:]
#4 0x926c1415 in -[NSKeyValueObservationForwarder stopObservingRelatedObject:]
#5 0x92699783 in -[NSObject(NSKeyValueObserverRegistration) removeObserver:forKeyPath:]
#6 0x933ae280 in -[_NSModelObservingTracker _registerOrUnregister:observerNotificationsForModelObject:]
#7 0x933adfbd in -[_NSModelObservingTracker clearAllModelObjectObserving]
#8 0x9350f4e4 in -[_NSModelObservingTracker setIndexReferenceModelObjectArray:clearAllModelObjectObserving:]
#9 0x935115e9 in -[NSTableBinder _updateContent]
#10 0x93511445 in -[NSTableBinder _observeValueForKeyPath:ofObject:context:]
#11 0x935111e5 in -[NSTableBinder observeValueForKeyPath:ofObject:change:context:]
#12 0x9263032e in -[NSObject(NSKeyValueObservingPrivate) _notifyObserversForKeyPath:change:]
#13 0x933ae3c7 in -[NSController _notifyObserversForKeyPath:change:]
#14 0x933ae2cf in -[NSController didChangeValueForKey:]
#15 0x93514ce5 in -[NSArrayController didChangeValuesForArrangedKeys:objectKeys:indexKeys:]
#16 0x935143ef in -[NSArrayController setContent:]
#17 0x937c95c4 in -[_NSManagedProxy _managedObjectsChangedInContext:]
#18 0x925ed207 in _nsnote_callback
#19 0x90852649 in __CFXNotificationPost
#20 0x90849e80 in _CFXNotificationPostNotification
#21 0x925e5860 in -[NSNotificationCenter postNotificationName:object:userInfo:]
#22 0x93c99deb in -[NSManagedObjectContext (_NSInternalNotificationHandling) _postObjectsDidChangeNotificationWithUserInfo:]
#23 0x93c99d6a in -[NSManagedObjectContext (_NSInternalChangeProcessing) _createAndPostChangeNotification:withDeletions:withUpdates:withRefreshes :]
#24 0x93c9911d in -[NSManagedObjectContext (_NSInternalChangeProcessing) _processRecentChanges:]
#25 0x93c9a587 in -[NSManagedObjectContext executeFetchRequest:error:]
--------


_______________________________________________

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:
    • Re: Core Data fetch request crashes the app
      • From: "Joshua Pennington" <email@hidden>
References: 
 >Re: Core Data fetch request crashes the app (From: "I. Savant" <email@hidden>)

  • Prev by Date: Re: adding new NSButtons to an application "on the fly"
  • Next by Date: PDF Parsing Library
  • Previous by thread: Re: Core Data fetch request crashes the app
  • Next by thread: Re: Core Data fetch request crashes the app
  • Index(es):
    • Date
    • Thread