App freezing, seeking workaround

DannyBackx
Posts: 33
Joined: Wed Sep 19, 2018 7:17 pm

App freezing, seeking workaround

Postby DannyBackx » 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 :

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__);
I (8702294) Peers: ImageServerStartTask
I (8702294) Peers: NetworkConnected 117
I (8702304) Peers: QueryPeers 1124
I (8702304) Peers: QueryPeers 1142
I (8702304) Peers: QueryPeers 1148
Nothing after that in the log. The esp32 doesn't die completely though, it still responds to ping.

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

Who is online

Users browsing this forum: No registered users and 46 guests