App freezing, seeking workaround
Posted: Fri Feb 01, 2019 8:56 pm
Hi,
I tried to find help earlier to determine why my code sometimes blocks in gettimeofday(&xx, 0). Nobody seems to have seen this. Let's ask another question.
My main thread appears to block in such a call :
I assume that the main thread is somehow blocked.
Is it a good idea to implement my own watchdog to work around this ? If yes, do I kill and restart the main task in some way ?
Thanks for any help
Danny
I tried to find help earlier to determine why my code sometimes blocks in gettimeofday(&xx, 0). Nobody seems to have seen this. Let's ask another question.
My main thread appears to block in such a call :
Code: Select all
ESP_LOGI(peer_tag, "%s %d", __FUNCTION__, __LINE__);
if (gettimeofday(&nowtv, NULL) == 0) { // <-- crash ! (this is line 1149)
ESP_LOGI(peer_tag, "%s %d", __FUNCTION__, __LINE__);
Nothing after that in the log. The esp32 doesn't die completely though, it still responds to ping.I (8702294) Peers: ImageServerStartTask
I (8702294) Peers: NetworkConnected 117
I (8702304) Peers: QueryPeers 1124
I (8702304) Peers: QueryPeers 1142
I (8702304) Peers: QueryPeers 1148
I assume that the main thread is somehow blocked.
Is it a good idea to implement my own watchdog to work around this ? If yes, do I kill and restart the main task in some way ?
Thanks for any help
Danny