If a reliable mesh transfer is ongoing the node will crash with a mesh assert at access_reliable.c:373, in access_reliable_cancel_all().
This happens because access_clear() calls access_state_clear() and then access_reliable_cancel_all().
The access_state_clear() will erase m_model_pool and access_reliable_cancel_all() will cancel all ongoing transfers which holds a handle into m_model_pool which is now invalid and thus access_model_p_args_get() returns NRF_ERROR_NOT_FOUND triggering the assert.
Swapping the calls make things work better.
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/mesh/access/src/access.c b/mesh/access/src/access.c
index 81e1492..153b2fe 100644
---
+++
@@ -1083,8 +1083,8 @@ uint32_t access_packet_tx(access_model_handle_t handle,
/* ********** Public API ********** */
void access_clear(void)
{
- access_state_clear();
access_reliable_cancel_all();
+ access_state_clear();
access_flash_config_clear();
}
I'm using SDK For Mesh v3.1.0.
Thanks.