This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Possible bug in nrf_log_backend_flash

Hello,

I have a scenario where I use crashlog but not flashlog.

My application is crashing in nrf_log_backend_crashlog_panic_set during log_msg_queue_process(mp_flashlog_queue,...).

I quick fixed the problem by commenting out this line. Please let me know when this is not a bug but a misuse from my side.

Best regards,

Nico

Parents
  • I have run into this as well and can confirm that it seems like a bug to me. Removing this line results in the behavior I expect. I realize this is fairly old by now and few people will be building with nRF5 SDK, but in case it does come up for anyone I did not manage to find this post until after I had solved the issue myself. I was seeing a "IMPRECISE memory access" hardfault which was somewhat challenging for me to trace back to this line.

    The source of the error seems to be that `mp_flashlog_queue` is `NULL` when flashlog is not enabled, however `log_msg_queue_process()` eventually runs `nrf_queue_generic_pop()` which has the line `ASSERT(p_queue != NULL);`.

Reply
  • I have run into this as well and can confirm that it seems like a bug to me. Removing this line results in the behavior I expect. I realize this is fairly old by now and few people will be building with nRF5 SDK, but in case it does come up for anyone I did not manage to find this post until after I had solved the issue myself. I was seeing a "IMPRECISE memory access" hardfault which was somewhat challenging for me to trace back to this line.

    The source of the error seems to be that `mp_flashlog_queue` is `NULL` when flashlog is not enabled, however `log_msg_queue_process()` eventually runs `nrf_queue_generic_pop()` which has the line `ASSERT(p_queue != NULL);`.

Children
No Data
Related