I am trying to debug an app error in my code. I have an app_error_fault_handler that starts like this:
extern "C" void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info) { if (id == NRF_FAULT_ID_SDK_ERROR) { error_info_t* err_info = (error_info_t*)info; LOG_E("Fatal Error in file %s, line %d", (const char*)err_info->p_file_name, err_info->line_num); switch (err_info->err_code) { case NRF_ERROR_SVC_HANDLER_MISSING: LOG_E("Error Code: NRF_ERROR_SVC_HANDLER_MISSING"); break;
But, the "Fatal Error in file..." line doesn't show the file name and line number. I use this fault handler on other systems, and I've seen the file name and line number before.
The err_code in the error_info_t struct is NRF_ERROR_INVALID_STATE though (which is the value 8), so it doesn't seem like the error_info_t is empty.
Why aren't the file name and line num fields populated? I feel like I might be missing something simple.
Here's the output:
00> <error> app: Fatal Error in file , line 0 00> <error> app: Error Code: NRF_ERROR_INVALID_STATE