• 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: Debugging Core Data unresolved keypath save error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugging Core Data unresolved keypath save error


  • Subject: Re: Debugging Core Data unresolved keypath save error
  • From: Kevin Hoctor <email@hidden>
  • Date: Tue, 20 Mar 2007 17:22:48 -0500

On Mar 20, 2007, at 12:23 PM, Jim Correia wrote:

On Mar 20, 2007, at 12:14 PM, Kevin Hoctor wrote:

#0 0x90a63365 in objc_exception_throw
#1 0x93cd01bb in -[NSSQLGenerator appendClause:forKeyPath:allowToMany:]
#2 0x93ccfca7 in -[NSSQLGenerator _preparePredicateExpression:]
#3 0x93ccfb16 in -[NSSQLGenerator prepareComparisonPredicate:]
#4 0x93ccb57e in -[NSSQLGenerator prepareSelectStatementWithFetchRequest:]
#5 0x93ccb00f in -[NSSQLAdapter newSelectStatementWithFetchRequest:]
#6 0x93ccae40 in -[NSSQLChannel selectRowsWithFetchRequest:]
#7 0x93d04bc9 in -[NSSQLCore _newRowsForSelector:withArgument:andLimit:]
#8 0x93cca83b in -[NSSQLCore newRowsForFetchRequest:]
#9 0x93cca4ea in -[NSSQLCore objectsForFetchRequest:inContext:]


I'm still not sure why a save process is failing on building a predicate. I'd love some feedback on this if anyone has experience with this kind of error.

What is the complete backtrace, starting with your code?

The next step is to figure out who is generated the fetch request and the predicate, and to examine them in the debugger and see why the are referencing keys that aren't part of your persistent model.

Jim,

It doesn't trace back to my code, but rather the NSDocument saveToURL:ofType:forSaveOperation:delegate:didSaveSelector:contextInfo: operation. That's why I'm having so much trouble debugging it. If it started with my stuff, I'd probably be able to understand it, but in this case I don't know the wiring for Core Data well enough to help me figure out this problem. Here's a full stack trace:

#0 0x90a63365 in objc_exception_throw
#1 0x93cd01bb in -[NSSQLGenerator appendClause:forKeyPath:allowToMany:]
#2 0x93ccfca7 in -[NSSQLGenerator _preparePredicateExpression:]
#3 0x93ccfb16 in -[NSSQLGenerator prepareComparisonPredicate:]
#4 0x93ccb57e in -[NSSQLGenerator prepareSelectStatementWithFetchRequest:]
#5 0x93ccb00f in -[NSSQLAdapter newSelectStatementWithFetchRequest:]
#6 0x93ccae40 in -[NSSQLChannel selectRowsWithFetchRequest:]
#7 0x93d04bc9 in -[NSSQLCore _newRowsForSelector:withArgument:andLimit:]
#8 0x93cca83b in -[NSSQLCore newRowsForFetchRequest:]
#9 0x93cca4ea in -[NSSQLCore objectsForFetchRequest:inContext:]
#10 0x93cbba8e in -[NSPersistentStoreCoordinator(_NSInternalMethods) executeRequest:withContext:]
#11 0x93cbad69 in -[NSManagedObjectContext executeFetchRequest:error:]
#12 0x9383d5d8 in -[NSTreeController(NSManagedController) _performFetchWithRequest:merge:error:]
#13 0x937e8106 in -[NSObjectController(NSManagedController) fetchWithRequest:merge:error:]
#14 0x937e8fe0 in -[_NSManagedProxy _storesDidChange:]
#15 0x927e917b in _nsnote_callback
#16 0x908573e6 in __CFXNotificationPost
#17 0x9084ebd1 in _CFXNotificationPostNotification
#18 0x927e1724 in -[NSNotificationCenter postNotificationName:object:userInfo:]
#19 0x93cc9810 in -[NSPersistentStoreCoordinator(_NSInternalMethods) _postStoresChangedNotificationsForStores:changeKey:options:]
#20 0x93cbf6c3 in -[NSPersistentStoreCoordinator addPersistentStoreWithType:configuration:URL:options:error:]
#21 0x9383f2bb in -[NSPersistentDocument configurePersistentStoreCoordinatorForURL:ofType:error:]
#22 0x9383f74f in -[NSPersistentDocument writeToURL:ofType:forSaveOperation:originalContentsURL:error:]
#23 0x9352b1f0 in -[NSDocument _writeToURL:ofType:forSaveOperation:inFolder:makingTemporaryCopyInFolder :error:]
#24 0x9352ac15 in -[NSDocument _writeSafelyToURL:ofType:forSaveOperation:error:]
#25 0x9352a905 in -[NSDocument writeSafelyToURL:ofType:forSaveOperation:error:]
#26 0x9383fde3 in -[NSPersistentDocument writeSafelyToURL:ofType:forSaveOperation:error:]
#27 0x9352a5ad in -[NSDocument saveToURL:ofType:forSaveOperation:error:]
#28 0x9361d743 in -[NSDocument _saveToURL:ofType:forSaveOperation:delegate:didSaveSelector:contextInfo: ]
#29 0x9352a4d7 in -[NSDocument saveToURL:ofType:forSaveOperation:delegate:didSaveSelector:contextInfo:]
#30 0x9355c2c5 in -[NSDocument _savePanelWasPresented:withResult:inContext:]
#31 0x934cdc90 in -[NSSavePanel(NSSavePanelRuntime) _didEndSheet:returnCode:contextInfo:]
#32 0x934067ee in -[NSApplication endSheet:returnCode:]
#33 0x9349cd4e in -[NSSavePanel(NSSavePanelRuntime) ok:]
#34 0x9337cd88 in -[NSApplication sendAction:to:from:]
#35 0x9337cce1 in -[NSControl sendAction:to:]
#36 0x9337ee91 in -[NSCell _sendActionFrom:]
#37 0x93391671 in -[NSCell trackMouse:inRect:ofView:untilMouseUp:]
#38 0x933af25d in -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:]
#39 0x933aeb0d in -[NSControl mouseDown:]
#40 0x9336c3af in -[NSWindow sendEvent:]
#41 0x937ad245 in -[NSSavePanel sendEvent:]
#42 0x9335e350 in -[NSApplication sendEvent:]
#43 0x93288dfe in -[NSApplication run]
#44 0x9327cd2f in NSApplicationMain
#45 0x00069ffc in main at main.m:13


Thanks for the reply!

Kevin
_______________________________________________

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: Debugging Core Data unresolved keypath save error
      • From: Jim Correia <email@hidden>
References: 
 >Debugging Core Data unresolved keypath save error (From: Kevin Hoctor <email@hidden>)
 >Re: Debugging Core Data unresolved keypath save error (From: Chris Hanson <email@hidden>)
 >Re: Debugging Core Data unresolved keypath save error (From: Kevin Hoctor <email@hidden>)
 >Re: Debugging Core Data unresolved keypath save error (From: Jim Correia <email@hidden>)

  • Prev by Date: Re: NSString encoding problem with extended characters ( AKA : converting NSString to std::string)
  • Next by Date: Webservices in Cocoa
  • Previous by thread: Re: Debugging Core Data unresolved keypath save error
  • Next by thread: Re: Debugging Core Data unresolved keypath save error
  • Index(es):
    • Date
    • Thread