EXC_BAD_ACCESS> KERN_PROTECTION_FAILURE

My iPhone application crashed and I got the next stack trace from Crashlytics (iPhone 5C, iOS 7.1.1). It continues for 500+ lines, and I see nothing that references my code anywhere. Is there any way to debug this?

Failure: com.apple.root.default-priority EXC_BAD_ACCESS KERN_PROTECTION_FAILURE at 0x04fccfe0

  • libsystem_c.dylib __vfprintf + 29
  • libsystem_c.dylib __v2printf + 374
  • libsystem_c.dylib __v2printf + 374
  • libsystem_c.dylib _vsnprintf + 348
  • libsystem_c.dylib vsnprintf + 72
  • libsystem_c.dylib __snprintf_chk + 22
  • Fund _writeJSONNumber + 1040
  • Foundation _writeJSONValue + 452
  • Fund ___writeJSONArray_block_invoke + 100
  • CoreFoundation__53 - [__ NSArrayM enumerateObjectsWithOptions: usingBlock:] _ block_invoke + 90
  • CoreFoundation - [__ NSArrayM enumerateObjectsWithOptions: usingBlock:] + 232
  • Fund _writeJSONArray + 236
  • Foundation _writeJSONValue + 504
  • Fund ___writeJSONArray_block_invoke + 100
  • CoreFoundation __53 - [__ NSArrayM enumerateObjectsWithOptions: usingBlock:] _ block_invoke + 90
  • CoreFoundation - [__ NSArrayM enumerateObjectsWithOptions: usingBlock:] + 232
  • Fund _writeJSONArray + 236
  • Foundation _writeJSONValue + 504
  • Fund ___writeJSONArray_block_invoke + 100
  • CoreFoundation __53 - [__ NSArrayM enumerateObjectsWithOptions: usingBlock:] _ block_invoke + 90
  • CoreFoundation - [__ NSArrayM enumerateObjectsWithOptions: usingBlock:] + 232
  • Fund _writeJSONArray + 236
  • Foundation _writeJSONValue + 504
  • Fund ___writeJSONArray_block_invoke + 100
  • CoreFoundation __53 - [__ NSArrayM enumerateObjectsWithOptions: usingBlock:] _ block_invoke + 90
  • CoreFoundation - [__ NSArrayM enumerateObjectsWithOptions: usingBlock:] + 232

...

+6
source share
1 answer

This is a failure due to see repeating sequences:

Foundation _writeJSONArray + 236 Foundation _writeJSONValue + 504 Foundation ___writeJSONArray_block_invoke + 100 CoreFoundation __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 90 CoreFoundation -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 232 

It looks like you are writing an array somewhere in a JSON structure, and your code ends in an infinite loop.

Your own code does not appear in the stack trace, since the stack trace is too large (stack overflow), and these frames are popped out of history.

+3
source

Source: https://habr.com/ru/post/969448/


All Articles