views:

211

answers:

2

I have 2 errors in XCode and am trying to figure out what they mean.

The 1st one:

2009-06-30 18:56:27.998 Spark[4584:10b] Error setting value for key path filterPredicate of object <NSArrayController: 0x1482c0>[entity: group, number of selected objects: 1] (from bound object <NSSearchField: 0x143f20> with object ID 1387 in Nib named MainMenu.nib): [<NSManagedObject 0x1d8170> valueForUndefinedKey:]: the entity group is not key value coding-compliant for the key keyPath.

The 2nd One:

2009-06-30 18:55:09.773 Spark[4552:10b] Stack: (
    2517123243,
    2530655803,
    2517122699,
    2517122762,
    2460660063,
    2460665405,
    2460666553,
    2460658608,
    2460656933,
    2506231425,
    2460658608,
    2460656933,
    2506235920,
    2506231206,
    2506463760,
    2506487015,
    2460658608,
    2460656933,
    2506207562,
    2506207014,
    2460658608,
    2460665405,
    2460666553,
    2460658608,
    2460656933,
    2506203090,
    2460658608,
    2460656933,
    2506200493,
    2506198904,
    2506197947,
    2506197753,
    2506196904,
    8232
)

What do they mean?

+2  A: 

It would appear you've tried to filter based on a key called 'group' in an object that doesn't have a key called group.

The rest is a stack trace.

Nick Veys
Thanks, Is a stack trace ok or does it need to be fixed? Also what does it mean by KeyPath because when i created the bindings that was what it wanted to filter automatically even though there is nothing called that?
Joshua
The object/Array is connected to Core Data and there is an entity called Group, So shouldn't it work? It may be a bit harder to make it work also because I am also using a NSTreeController with a NSOutlineView to display the Data.
Joshua
When you fix the first error, the stack trace will go away. The stack trace is intended to help you track down what went wrong. It si not inherently bad, it is just a road map to the bad this (the actual exception).
MystikSpiral
Ok, I've got rid of the error, but it doesn't filter my NSOutlineView.
Joshua
@MystikSpiral Thanks!
Joshua
Stack tracebacks and diagnostics are generally considered untoward behavior, or can be considered evidence of more serious underlying problems or programming instability.KVC reading: http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueCoding/Concepts/BasicPrinciples.htmlDoes this need to be fixed? That's entirely up to you and to whomever is going to be using this, and up to whether the program works or not, and whether or not you care if there are visible bugs here.
Stephen Hoffman
@Stepehn Thanks to you also!
Joshua
"the entity group is not key value coding-compliant for the key keyPath"The key that's failing isn't "group", it's "keyPath".
Tom Dalling
Ok, I've got rid of the error now by changing what it filters to what it should filter, but it doesn't actually filter my NSOutlineView.
Joshua
Joshua: A stack trace tells you what was happening when the exception occurred, by tracing the call stack (x called y, y called z, z called a, etc.). To use it, convert the addresses to hex, then pass them to dwarfdump along with the path to your .dSYM bundle. (See man dwarfdump for details.)
Peter Hosey
+1  A: 

I see the first occurrence most often when i have bound a control to an IBOutlet via Interface Builder and then removed/renamed the IBOutlet in the underlying class. Check on the Connections tab for File's Owner in IB and see that there are not any odd connections that need to be cleaned up.

The second is the cryptic stack trace used on the Console when you hit an exception. It is actually a list of pointer addresses allowing you to trace the execution path. There is a ton you can do on the console once you get comfortable there. I got a great headstart on this (and MUCH MORE) on Cocoa With Love: http://cocoawithlove.com/2008/10/debugging-tips-for-objective-c.html

Good Luck!

MystikSpiral
There are some great tips there, thanks for the link.
Joshua