views:

21

answers:

2

Hi!

In my document Core Data application I receive crash with report in console:

Cocoa Bindings: Cannot create NSSet from object <_NSControllerObjectProxy: 0x26acb0> of class _NSControllerObjectProxy

I have -NSBindingDebugLogLevel 1 startup vargument enebled and I get only this. Is there any way to get more information which class or controller is raising it? Or get class name from pointer address?

Stack:

#0  0x9141f4e6 in objc_exception_throw
#1  0x951288e8 in +[NSException raise:format:arguments:]
#2  0x9512885a in +[NSException raise:format:]
#3  0x956837dc in -[_NSManagedProxy _entity]
#4  0x9568392a in -[_NSManagedProxy fetchRequestWithSortDescriptors:limit:]
#5  0x956835bb in -[NSArrayController(NSManagedController) defaultFetchRequest]
#6  0x95683486 in -[NSObjectController(NSManagedController) _executeFetch:didCommitSuccessfully:actionSender:]
A: 

Did you recently change your model but are loading a old version of your data file? Delete the bad data file if so, or enable persistent store migration.

Graham Perks
I have already done that. Anyway it is happening on an empty document so it should be a matter.
Lukasz
Yes - there was about a change ... including in target somehow changed to unchecked.
Lukasz
A: 

For anybody wasting time debugging su a issues - make sure datamodel is included in the target. In my case after making some versioning changes file got excluded from target.

Such a trivial.

Lukasz
Oh man! Nice spot. Would never have thought of that solution :)
Graham Perks
But there is one interesting thing about it: ONLY THE LATEST (current) version of data model should be included in the target. That can be misleading sometimes as there is desire to add all versions. It looks like it is being decided at compile time what to put in the application bundle.
Lukasz