ESP 32 crashes on tcp_update_rcv_ann_wnd
Posted: Fri Nov 04, 2022 1:11 am
Colleagues,
I am working on esp32 WROOM module to interact with a rest API using Arduino 1.8.19 . I am using AsyncHTTP to send the GET message.
My code is working, but randomly, the system crashes always on "tcp_update_rcv_ann_wnd"
This is part of my debug code and it crashes on the callback function, always after state 3 , that means still receiving data
( readyStateLoading = 3, // receiving, partial data available)
callback -4 NOT_CONNECTED 4estado_entrando 5
callback -4 NOT_CONNECTED 1estado_entrando 5
callback 200 HTTP OK 2estado_entrando 5
callback 200 HTTP OK 3estado_entrando 5
assert failed: tcp_update_rcv_ann_wnd IDF/components/lwip/lwip/src/core/tcp.c:951 (new_rcv_ann_wnd <= 0xffff)
Backtrace:0x40083781:0x3ffb32500x4008b641:0x3ffb3270 0x40090a49:0x3ffb3290 0x400eee6d:0x3ffb33c0 0x400eef18:0x3ffb33e0 0x400d5b4e:0x3ffb3400 0x400ebfc4:0x3ffb3420
ELF file SHA256: 0000000000000000
Rebooting...
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13864
load:0x40080400,len:3608
entry 0x400805f0
Connecting to WiFi .....192.168.0.241
My callback function is the same as in the AsyncHTTP .
void requestCB(void *optParm, AsyncHTTPRequest *request, int readyState)
{
(void) optParm;
String aux;
int i,k,comienzo_array,fin_array,comienzo_resultado;
Serial.print("callback ");
Serial.print(request->responseHTTPcode());
Serial.print(" ");
Serial.print(request->responseHTTPString());
Serial.print(" ");
Serial.print(readyState);
Serial.print("estado_entrando ");
Serial.println(estado);
if (readyState == readyStateDone)
{
AHTTP_LOGDEBUG(F("\n**************************************"));
AHTTP_LOGDEBUG1(F("Response Code = "), request->responseHTTPString());
if (request->responseHTTPcode() == 200)
{
Serial.print("estado ");
Serial.println(estado);
if (estado==AWAITING_STATUS_ZONAS)
{
Serial.println(F("\n**************************************"));
.........
In the link below we can see the calling function and is related to the window size......
https://github.com/stm32duino/LwIP/blob ... core/tcp.c
Any idea what might be wrong?
I am working on esp32 WROOM module to interact with a rest API using Arduino 1.8.19 . I am using AsyncHTTP to send the GET message.
My code is working, but randomly, the system crashes always on "tcp_update_rcv_ann_wnd"
This is part of my debug code and it crashes on the callback function, always after state 3 , that means still receiving data
( readyStateLoading = 3, // receiving, partial data available)
callback -4 NOT_CONNECTED 4estado_entrando 5
callback -4 NOT_CONNECTED 1estado_entrando 5
callback 200 HTTP OK 2estado_entrando 5
callback 200 HTTP OK 3estado_entrando 5
assert failed: tcp_update_rcv_ann_wnd IDF/components/lwip/lwip/src/core/tcp.c:951 (new_rcv_ann_wnd <= 0xffff)
Backtrace:0x40083781:0x3ffb32500x4008b641:0x3ffb3270 0x40090a49:0x3ffb3290 0x400eee6d:0x3ffb33c0 0x400eef18:0x3ffb33e0 0x400d5b4e:0x3ffb3400 0x400ebfc4:0x3ffb3420
ELF file SHA256: 0000000000000000
Rebooting...
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13864
load:0x40080400,len:3608
entry 0x400805f0
Connecting to WiFi .....192.168.0.241
My callback function is the same as in the AsyncHTTP .
void requestCB(void *optParm, AsyncHTTPRequest *request, int readyState)
{
(void) optParm;
String aux;
int i,k,comienzo_array,fin_array,comienzo_resultado;
Serial.print("callback ");
Serial.print(request->responseHTTPcode());
Serial.print(" ");
Serial.print(request->responseHTTPString());
Serial.print(" ");
Serial.print(readyState);
Serial.print("estado_entrando ");
Serial.println(estado);
if (readyState == readyStateDone)
{
AHTTP_LOGDEBUG(F("\n**************************************"));
AHTTP_LOGDEBUG1(F("Response Code = "), request->responseHTTPString());
if (request->responseHTTPcode() == 200)
{
Serial.print("estado ");
Serial.println(estado);
if (estado==AWAITING_STATUS_ZONAS)
{
Serial.println(F("\n**************************************"));
.........
In the link below we can see the calling function and is related to the window size......
https://github.com/stm32duino/LwIP/blob ... core/tcp.c
Any idea what might be wrong?