Please allow me to suggest you change app_error handler and related functions to something like this:
void app_error_handler(ret_code_t error_code, uint32_t line_num, const uint8_t * p_file_name)
{
uint32_t pc = 0;
#ifdef __GNUC__
asm ("mov %0, lr" : "=r"(pc));
#endif
error_info_t error_info =
{
.line_num = line_num,
.p_file_name = p_file_name,
.err_code = error_code,
};
app_error_fault_handler(NRF_FAULT_ID_SDK_ERROR, pc, (uint32_t)(&error_info));
UNUSED_VARIABLE(error_info);
}
The change will make app_error_handler report the actual location of the program counter in app_error_fault_handler and not just zero.