1

I am creating on camera application and I am constantly getting crash in iOS 11 but app is working fine in lower version of iOS. Crash I am getting in log console is as below:

-[__NSArrayI name]: unrecognized selector sent to instance 0x608000446570

I haven’t use any dictionary or any array which contains key “name” and it is giving me this crash log.

Exception break point is also not helpful in this crash. I have used many arrays in my application but none of them are causing crash i think. I am now out of option.

I am using xCode 9 beta version and running app in iOS 11 beta 1 and 2. in both versions it is crashing.

Any help or conceptual solution will be highly appreciated.

Thanks in advance.enter image description here

Ajay Gabani
  • 1,168
  • 22
  • 38
  • more info about the context, maybe...? your code seems buggy, are you still using MRR? – holex Jun 27 '17 at 15:55
  • Which beta are you using? And maybe add a screenshot / code snippet of the breakpoint location even if you think its useless. Anything to provide a little more context would help a lot. – Jack Chorley Jun 27 '17 at 15:58
  • Thanks for fast response. I enable all break point but its not stopping at any specific line. I am attaching crash screenshot in my question. – Ajay Gabani Jun 27 '17 at 16:04
  • @holex I am not using MRR. I am using xCode 9 beta version and running app in iOS 11 beta 1 and 2. in both versions it is crashing. – Ajay Gabani Jun 27 '17 at 16:06
  • maybe you have to add some privacy key description in info.plist – gareg Jun 27 '17 at 16:09
  • I already added for camera, location, microphone, gallery these all i need and i added them, – Ajay Gabani Jun 27 '17 at 16:19
  • https://stackoverflow.com/questions/25853947/how-can-i-debug-unrecognized-selector-sent-to-instance-error - tips – Sam B Jun 27 '17 at 18:08
  • can you add symbolic breakpoint with -[__NSArrayI name]: it will help you to find who calling it exactly.Plus cmd + shift + K to delete cache before run. – Ali Kıran Jun 27 '17 at 18:29
  • Is it Thread1 that's crashing or another Thread? Is is crashing upon startup? If yes, set breakpoints in the application delegate to see if it manages to hit the breakpoints before crashing. Also print the instance that receives the selector, so we can see where it's being sent to. @holex What is MRR ? – Lefteris Jun 28 '17 at 07:52
  • @AjayGabani, you are still using ObjectiveC... and you don't know what MRR is? that is a kinda of manual memory management, and if you don't know the origin of the error, usually a wrong memory management throws such type of exceptions after you `release` an object and the memory block is re-allocated for another type of object, but you still keep /cast the original pointer of the old object and try to refer to it; it is very hard to recognise or catch but it is typical in ObjC with MRR. – holex Jun 28 '17 at 08:39
  • @holex I know MRR. Its Lefteris who asked you about same. My app is crashing on startup but it executed my main view controller view will appear method successfully and from some where it is crashing. I will try Ali Kiran 's suggestion once. – Ajay Gabani Jun 28 '17 at 10:44

1 Answers1

0

The problem is with my code. I added filters in my preview layer and one or more those filters are not supported in iOS 11 so it was crashing application.

Here is the code line which is crashing application without indicating anything.

[[previewView layer] setFilters:@[filterArray]];

Thank you all of you for your suggestions and helps.

I really appreciated it.

Ajay Gabani
  • 1,168
  • 22
  • 38
  • How you came to know that specific filter is not supported in iOS 11. I have similar issue with my framework but unable to find the exact line of crash even with exception breakpoint. – ADJ Jul 25 '17 at 16:06
  • @Jaiswal Based on my error i checked that some naming is creating issue. So checked with each and every cases with trial and error. No specific technique to check this. :( – Ajay Gabani Jul 25 '17 at 16:40