Problem while taking the Low-level Core Data Tutorial

  • Hi all,

    I'm quite new at programming with Cocoa and I'm taking some tutorials
    before starting a project of my own.

    So I started the "Low-level Core Data Tutorial". Everything fine
    until chapter 6.  I can build and run the code I wrote at chapter 6.
    It compiles without warnings. When I run it, it does not log any
    error, except that it enters in some loop and get stuck there.

    When I monitor the process I can see that the memory used keep
    growing until I eventually kill the process. The new file is created
    in the correct directory but remains empty.

    The debugger shows that the program enters the code:

    [ moc save: &error]

    And never exits from there. ( This is the kind of things I can have
    on the debugger):

    #0    0xfffeff00 in objc_msgSend_rtp
    #1    0x92c20c9c in -[NSNumber compare:]
    #2    0x92d4ca94 in -[NSComparisonPredicateOperator
    performPrimitiveOperationUsingObject:andObject:]
    #3    0x92d4eb00 in -[NSPredicateOperator
    performOperationUsingObject:andObject:]
    #4    0x92d4adec in -[NSComparisonPredicate
    evaluateWithObject:variableBindings:]
    #5    0x92d4c360 in -[NSPredicate evaluateWithObject:]
    #6    0x9415b758 in -[NSManagedObject validateValue:forKey:error:]
    #7    0x9415b460 in -[NSManagedObject(_NSInternalMethods)
    _validateEnumeratedProperties:forPropertyType:error:]
    #8    0x9415b324 in -[NSManagedObject(_NSInternalMethods)
    _validateForSave:]
    #9    0x94173060 in -[NSManagedObject validateForInsert:]
    #10    0x94173ef8 in -[NSManagedObject(_NSInternalMethods)
    _validateForInsert:]
    #11    0x9415af08 in -[NSManagedObjectContext(_NSInternalAdditions)
    _validateObjects:forOperation:error:exhaustive:forSave:]
    #12    0x9415acd0 in -[NSManagedObjectContext(_NSInternalAdditions)
    _validateChangesForSave:]
    #13    0x9415ab94 in -[NSManagedObjectContext
    (_NSInternalChangeProcessing) _prepareForPushChanges:]
    #14    0x9415a5e4 in -[NSManagedObjectContext save:]
    #15    0x00024d00 in main at CDCLI.m:41

    I checked my code for typos and corrected some but it didn't help.

    I guess there is still something wrong in my code but I don't know
    what to check. I am really trying to follow the tutorial.

    Thanks for any suggestion.

    David
previous month december 2007 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
Go to today