3

After upgrading to IOS10 and xcode 8 my app crashes with this error:

2016-09-20 11:56:36.602721 Quest[560:67619] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[5]' *** First throw call stack: (0x192fc41c0 0x1919fc55c 0x192ea8c3c 0x192ee8554 0x192ee8370 0x10166cd98 0x10166f718 0x101677588 0x10166dd3c 0x101658fb4 0x101659678 0x10013fd98 0x10001c14c 0x10004061c 0x1000412e0 0x1000a2c64 0x10003114c 0x1000318e8 0x198e1d3fc 0x198e1d174 0x198ebe640 0x198ebde28 0x198ebd9dc 0x198ebd940 0x198e02738 0x1962cb40c 0x1962c00e8 0x1962bffa8 0x19623cc64 0x1962640d0 0x196264af0 0x192f717dc 0x192f6f40c 0x192e9e068 0x198e707cc 0x198e6b550 0x100231188 0x191e805b8) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)

There is no stack trace and the app crashes on :

class AppDelegate: UIResponder, UIApplicationDelegate 

Is there any other way to figure out what is coursing the crash and where it is in the code?

This seems to happen randomly, about every tenth time i open the app it crashes.

Thanks

ilan
  • 4,402
  • 6
  • 40
  • 76
  • 1
    Show your root view controller code, something is wrong there. You are intializing your dictionary with nil somewhere over that file ,either in did load or in will appear. – Bista Sep 20 '16 at 09:06
  • 1
    Add exception break point, and debug, you will get the line causing crash – Janmenjaya Sep 20 '16 at 09:07
  • 1
    ...."attempt to insert nil object from objects[5]"..... – Byron Coetsee Sep 20 '16 at 09:19
  • Add breakpoints at any creation of a dictionary and set the condition to something like `if object[5] == nil` ... It should then skip the breakpoints until the problem arises and will then stop at the line causing the problem – Byron Coetsee Sep 20 '16 at 09:24
  • See: https://stackoverflow.com/q/40447722/2529583 https://stackoverflow.com/q/29692194/2529583 https://stackoverflow.com/q/36882788/2529583 – Babken Vardanyan Jun 19 '18 at 16:36

0 Answers0