2

I am facing the above crash.

I can able to understand that the above crash is due to mutating an array while it is enumerating.

But I am using lot of arrays in that view controller.

Is there a way to find the particular array that is causing the crash.

Any help in this appreciable.

Thanks in advance.

enter image description here

GJDK
  • 723
  • 2
  • 7
  • 19
  • Is this from a crash report or while debugging in Xcode? – rmaddy Sep 18 '15 at 15:46
  • it seems that while looping through a NSMutableArray using fast enum or loop linked to array size, inside the loop you removed/ deleted an object from that arrayM. this make the loop in a inconsitante state, this kind of error don"t get catch at compilation. (at least when using Objective-C) – Idali Sep 18 '15 at 15:53
  • Just do a code review - you know the reason for the crash, surely you can review the code to see where arrays are being enumerated, and then code review to see where its being mutated. Surely you can't have so many arrays that is not possible – Gruntcakes Sep 18 '15 at 15:53
  • @rmaddy its from crash report. – GJDK Sep 18 '15 at 15:54
  • That image is from the debugger. That is not a crash report. – rmaddy Sep 18 '15 at 16:03
  • add Exception break point, it will catch it and stop at the exact code – Idali Sep 18 '15 at 16:06
  • @idali I tried that first when i faced the crash. It didn't helped me. Is there any other way for it? – GJDK Sep 18 '15 at 16:17
  • If Exception Break Point "All Objective-c" don't catch it then probably it comes from a Block, thread or multiple access to array – Idali Sep 18 '15 at 16:27
  • @Idli That is what my question is all about.. i can come to the conclusion that the crash is happening due to a Array/MutableArray am using....But there are many such collections am using inside that class. How am to find the Array or MutableArray exactly that is causing this crash? Due to have anything to find the particular array? – GJDK Sep 19 '15 at 06:09

0 Answers0