pawelini1
pawelini1

Reputation: 487

Strange error using Core Data

I have a problem with Core Data in my application. There is no certain situation when my app crashes. It is very random. At the time of this crash I'm adding and modifying objects and saving NSManageObjectContext. Does anyone know what could be the problem?

#0  0x32668ebc in objc_msgSend
#1  0x30494300 in -[NSKnownKeysDictionary1 dealloc]
#2  0x3049429c in -[NSKnownKeysDictionary1 release]
#3  0x304c76d2 in -[NSManagedObject(_NSInternalMethods) _nilOutReservedCurrentEventSnapshot__]
#4  0x3049c31a in -[NSManagedObjectContext(_NSInternalChangeProcessing) _processRecentChanges:]
#5  0x304d1bec in -[NSManagedObjectContext processPendingChanges]
#6  0x304c4380 in _performRunLoopAction
#7  0x32d5c830 in __CFRunLoopDoObservers
#8  0x32da4346 in CFRunLoopRunSpecific
#9  0x32da3c1e in CFRunLoopRunInMode
#10 0x31bb9374 in GSEventRunModal
#11 0x30bf3c30 in -[UIApplication _run]
#12 0x30bf2230 in UIApplicationMain
#13 0x0000e9a2 in main at main.m:59

Upvotes: 3

Views: 647

Answers (1)

PeyloW
PeyloW

Reputation: 36752

This definitely looks like an over released object. Try setting the NSZombieEnabled environment variable to YES before running the app to get a better pin-pointed crash to where the object is actually over released.

Here is a short and sweet blog-post describing zombies and crashes: http://cocoa-nut.de/?p=16

Upvotes: 3

Related Questions