ios - XCode: Exception. How to detect the cause? -


xcode 4.6.1 ios 6.1. i'm using remote database stackmob. application first gives error , after click play few times, runs fine , communicates server fine. not sure how detect problem , should concern?

i have following exception break point setup:

enter image description here

the application runs , stops @ following line: enter image description here

   nsfetchrequest *fetchrequest = [[nsfetchrequest alloc] init];     nsentitydescription *entity = [nsentitydescription entityforname:@"user" inmanagedobjectcontext:self.managedobjectcontext];     [fetchrequest setentity:entity];      nspredicate *predicate = [nspredicate predicatewithformat:@"email == %@", self.emailaddressfield.text];     [fetchrequest setpredicate:predicate];      nserror *error = nil;     nsarray *fetchedobjects = [[self managedobjectcontext] executefetchrequest:fetchrequest error:&error]; 

so changed line above to:

nsfetchrequest *fetchrequest = [[nsfetchrequest alloc] init];         nsentitydescription *entity = [nsentitydescription entityforname:@"user" inmanagedobjectcontext:self.managedobjectcontext];         [fetchrequest setentity:entity];          nspredicate *predicate = [nspredicate predicatewithformat:@"username == %@", self.usernamefield.text];         [fetchrequest setpredicate:predicate];          [managedobjectcontext executefetchrequest:fetchrequest onsuccess:^(nsarray *fetchedobjects)             { 

now when run program, following error:

enter image description here

with

enter image description here

so click play button enter image description here

and following error:

enter image description here

and after click play 1 more time, application continues run if nothing happened? should concerned?

you can check exception simple lldb command, once debugger stops on exception. select exception in thread 6 here:

enter image description here

and if running on simulator type:

po $eax 

if running on device:

po $r0  (for 32-bit) po $x0  (for 64-bit) 

you should description of exception.


Comments