ios - Crash : objc_msgSend() selector name: _didReceiveConnectionCacheKey -


i implemented nstimer call simple method :

nstimer *timer = [nstimer timerwithtimeinterval:ktimerdelay target:self selector:@selector(synchronise) userinfo:nil repeats:yes];  [[nsrunloop currentrunloop] addtimer:timer formode:nsrunloopcommonmodes]; 

this method builds nsdictionnary, searches objects in coredata context there ids , enumerates :

- (void)synchronise {     nsdictionary *postdict = @{...};     nsarray *objectidlist = [postdict valueforkeypath:@"object_items.@allkeys"];     nsarray *objectlist = [p_coredataobject mr_findallwithpredicate:[nspredicate predicatewithformat:@"id in %@", objectidlist]];     myserviceservice *myservice = [[myserviceservice alloc] init];     (p_coredataobject *object in objectlist) {         [myservice sendlink:object.link_url success:nil failure:nil];     } } 

i call mr_findall on other object build nsdictionnary , works well, in rare cases, crashs !

does have idea how understand crash ?

the stack trace :

objc_msgsend() selector name: _didreceiveconnectioncachekey:

thread 0: 0 libsystem_kernel.dylib 0x000000018417680c pread + 8 1 libsqlite3.dylib 0x0000000184ab0b9c sqlite3_snprintf + 13660 2 libsqlite3.dylib
0x0000000184acfb20 sqlite3_log + 5472 3 libsqlite3.dylib
0x0000000184aceab8 sqlite3_log + 1272 4 libsqlite3.dylib
0x0000000184af223c sqlite3_step + 60112 5 libsqlite3.dylib
0x0000000184af3620 sqlite3_value_text + 3412 6 libsqlite3.dylib
0x0000000184ae5088 sqlite3_step + 6428 7 libsqlite3.dylib
0x0000000184ae3960 sqlite3_step + 500 8 coredata
0x000000018604fab8 _execute + 144 9 coredata
0x000000018605f988 -[nssqliteconnection fetchresultset:usingfetchplan:] + 1644 10 coredata
0x000000018616150c newfetchedrowsforfetchplan_mt + 1560 11 coredata
0x00000001860567e4 -[nssqlcore objectsforfetchrequest:incontext:] + 536 12 coredata 0x0000000186056218 -[nssqlcore executerequest:withcontext:error:] + 596 13 coredata 0x000000018611d910 __65-[nspersistentstorecoordinator executerequest:withcontext:error:]_block_invoke + 2620 14 coredata
0x0000000186125d58 gutsofblocktonspersistentstorecoordinatorperform + 172 15 libdispatch.dylib 0x00000001840415f0 _dispatch_client_callout + 12 16 libdispatch.dylib 0x000000018404c89c _dispatch_barrier_sync_f_invoke + 96 17 coredata
0x00000001861185b0 _perform + 176 18 coredata
0x0000000186055e70 -[nspersistentstorecoordinator executerequest:withcontext:error:] + 296 19 coredata
0x0000000186054938 -[nsmanagedobjectcontext executefetchrequest:error:] + 532 20 coredata
0x00000001860f6318 -[nsmanagedobjectcontext(_nestedcontextsupport) _parentobjectsforfetchrequest:incontext:error:] + 416 21 coredata 0x00000001860f6a44 __82-[nsmanagedobjectcontext(_nestedcontextsupport) executerequest:withcontext:error:]_block_invoke + 344 22 coredata
0x00000001860f8d80 internalblocktonsmanagedobjectcontextperform + 104 23 libdispatch.dylib 0x00000001840415f0 _dispatch_client_callout + 12 24 libdispatch.dylib 0x000000018404c89c _dispatch_barrier_sync_f_invoke + 96 25 coredata
0x00000001860e86fc _perform + 208 26 coredata
0x00000001860f6824 -[nsmanagedobjectcontext(_nestedcontextsupport) executerequest:withcontext:error:] + 172 27 coredata
0x0000000186054938 -[nsmanagedobjectcontext executefetchrequest:error:] + 532 28 youboox
0x0000000100236268 __67+[nsmanagedobject(magicalrecord) mr_executefetchrequest:incontext:]_block_invoke (nsmanagedobject+magicalrecord.m:54) 29 coredata
0x00000001860ed080 developersubmittedblocktonsmanagedobjectcontextperform + 192 30 coredata 0x00000001860ecf48 -[nsmanagedobjectcontext performblockandwait:] + 216 31 youboox 0x00000001002361ac +[nsmanagedobject(magicalrecord) mr_executefetchrequest:incontext:] (nsmanagedobject+magicalrecord.m:50) 32 youboox
0x00000001002344d4 +[nsmanagedobject(magicalfinders) mr_findallwithpredicate:incontext:] (nsmanagedobject+magicalfinders.m:76) 33 youboox
0x0000000100234568 +[nsmanagedobject(magicalfinders) mr_findallwithpredicate:] (nsmanagedobject+magicalfinders.m:84)

edit : craching thread stack trace

thread 18 crashed: 0 libobjc.a.dylib
0x0000000183c6dbc8 objc_msgsend + 8 1 cfnetwork
0x0000000184c3a518 sessionconnectionloadable::_loaderclientevent_didreceiveconnectioncachekey(httpconnectioncachekey*) + 52 2 cfnetwork 0x0000000184cb9178 ___zn19urlconnectionloader36protocoldidreceiveconnectioncachekeyep22httpconnectioncachekey_block_invoke + 36 3 libdispatch.dylib 0x0000000184041630 _dispatch_call_block_and_release + 20 4 libdispatch.dylib 0x00000001840415f0 _dispatch_client_callout + 12 5 libdispatch.dylib 0x000000018404d634 _dispatch_queue_drain + 860 6 libdispatch.dylib
0x00000001840450f4 _dispatch_queue_invoke + 460 7 libdispatch.dylib 0x000000018404f504 _dispatch_root_queue_drain + 724 8
libdispatch.dylib 0x000000018404f224 _dispatch_worker_thread3 + 108 9 libsystem_pthread.dylib 0x0000000184255470 _pthread_wqthread + 1088 10 libsystem_pthread.dylib 0x0000000184255020 start_wqthread + 0


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -