-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Description
Hardware:
Board: ESP32 Dev Module
Core Installation/update date: 11/NOV/2018
IDE name: Arduino IDE
Flash Frequency: 80Mhz
PSRAM enabled: no
Upload Speed: 921600
Computer OS: Windows 10
Description:
the code in /libraries/WiFi/src/WiFiClient.cpp line 74
"_fill += res;" run after that the value "_fill" will be -1 sometime.
because the code in /libraries/WiFi/src/WiFiClient.cpp line 70
"if(res < 0 && errno != EWOULDBLOCK) {" the res will be -1 sometime
and it will make the code in /libraries/WiFi/src/WiFiClient.cpp line 106
"*dst = _buffer[_pos];" the value "_pos" will larger than "_size" (default 1436) where is the size of the _buffer.
and then the code will go crash and output an info like "Guru Meditation Error: Core 1 panic'ed (LoadStoreError)...."
now, i fix it by adding some code like
"if(res < 0) return res;"
before
"_fill += res;" in /libraries/WiFi/src/WiFiClient.cpp line 74
an it running stable for a long time.
this happen frequently in downloading a large file(more then 1M) with http get.
my situation is :
HTTPClient http;
http.begin(“http://192.168.1.100:49315/xxx.bin”);
int code = http.GET();
WiFiClient *tcp = http.getStreamPtr();
while(remaining())
{
tcp->readBytes
}
so, is it a right fix?
what is the meaning of the "if(res < 0 && errno != EWOULDBLOCK) {" in /libraries/WiFi/src/WiFiClient.cpp line 70 ?
Activity
Jeroen88 commentedon Jan 2, 2019
@lzw7603 you are right, I found the same problem and created PR #2259 to solve it
stale commentedon Aug 1, 2019
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
stale commentedon Aug 15, 2019
This stale issue has been automatically closed. Thank you for your contributions.