In my app User Service keeps user logged in, so on login it attempts to save current user to the persistent store, and this is when I get the following exception:
‘NSUnknownKeyException’, reason: ‘[<UIImage 0x7d194ff0> valueForUndefinedKey:]: this class is not key value coding-compliant for the key ap_imageHasMonochromeEffect.’
Apparently, it is somehow connected to the fact that user has a field which contains a url of an image and there is a category of UIImage in my project, which declares a field ap_imageHasMonochromeEffect. But I have no clue about a possible solution to this problem.
This is the stack trace:
*** First throw call stack:
(
0 CoreFoundation 0x03f76494 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x02eb7e02 objc_exception_throw + 50
2 CoreFoundation 0x03f760b1 -[NSException raise] + 17
3 Foundation 0x02b496d4 -[NSObject(NSKeyValueCoding) valueForUndefinedKey:] + 282
4 Foundation 0x02a8adcc _NSGetUsingKeyValueGetter + 105
5 Foundation 0x02a8ad5b -[NSObject(NSKeyValueCoding) valueForKey:] + 288
6 Foundation 0x02b49922 -[NSObject(NSKeyValueCoding) dictionaryWithValuesForKeys:] + 189
7 MyApp 0x008d758c +[Types propertyDictionary:] + 75
8 MyApp 0x008e136e -[ObjectWriter write:format:] + 508
9 MyApp 0x008e083a -[ObjectReferenceWriter write:format:] + 361
10 MyApp 0x008e00f5 -[MessageWriter writeObject:format:] + 62
11 MyApp 0x008e25e3 -[V3ObjectSerializer writeObject:fields:format:] + 1019
12 MyApp 0x008df320 -[BoundPropertyBagWriter write:format:] + 126
13 MyApp 0x008e083a -[ObjectReferenceWriter write:format:] + 361
14 MyApp 0x008e00f5 -[MessageWriter writeObject:format:] + 62
15 MyApp 0x008d8664 +[AMFSerializer serializeToBytes:type:] + 142
16 MyApp 0x008d85d1 +[AMFSerializer serializeToBytes:] + 34
17 MyApp 0x008d8878 +[AMFSerializer serializeToFile:fileName:] + 103
18 MyApp 0x003deee6 -[UserService setPersistentUser] + 83
19 MyApp 0x003e9e43 -[PersistenceService onCurrentUserUpdate:] + 413
20 MyApp 0x003e9bd6 -[PersistenceService createResponse:] + 204
21 libobjc.A.dylib 0x02ecc059 -[NSObject performSelector:withObject:] + 70
22 MyApp 0x008e46eb -[Responder responseHandler:] + 147
23 MyApp 0x008b879c -[HttpEngine processAsyncAMFResponse:] + 1852
24 MyApp 0x008b9be8 __41-[HttpEngine connectionDidFinishLoading:]_block_invoke + 35
25 libdispatch.dylib 0x0762f363 _dispatch_call_block_and_release + 15
26 libdispatch.dylib 0x076529cd _dispatch_client_callout + 14
27 libdispatch.dylib 0x07637f7c _dispatch_main_queue_callback_4CF + 910
28 CoreFoundation 0x03ec01be CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 14
29 CoreFoundation 0x03e7e434 __CFRunLoopRun + 2356
30 CoreFoundation 0x03e7d846 CFRunLoopRunSpecific + 470
31 CoreFoundation 0x03e7d65b CFRunLoopRunInMode + 123
32 GraphicsServices 0x083e5664 GSEventRunModal + 192
33 GraphicsServices 0x083e54a1 GSEventRun + 104
34 UIKit 0x054a3eb9 UIApplicationMain + 160
35 MyApp 0x0003619a main + 138
36 libdyld.dylib 0x0767ca25 start + 1
)