ESP32 AsynchWeb Server ABORT() 4xDHT 2xRelay rebooting

behemut
Posts: 2
Joined: Tue Mar 02, 2021 10:14 am

ESP32 AsynchWeb Server ABORT() 4xDHT 2xRelay rebooting

Postby behemut » Tue Mar 02, 2021 11:58 am

Hi, I am new,
I tried to sort out the issue by myself, but no luck.
I read about overflow, overstock, and other things.
the program should be easy but doesn't work correctly and I don't know why.
Basically, everything that I want, is to measure 5 different DHT 11 or 22 temperature and humidity and for t1,t2and t3, if we will reach some threshold switch fan1 on if all of them are below threshold2 value then switch them off
for t5 which is the DHT sensor installed inside the box we have fan2 with the different values on and off
besides, we have voltage measure and position of the car keys.
I wish to do with Async web server where I can put IP address to car radio web browser and see all data and input threshold on, off value and on, off value for threshold 2.
the issue is after some time around 1000000ms ( i have a counter="licznik" which is increasing every 2sec) program just crash and reboot itself and start over again which results in all input changed through the web page are going to the default values, the program rebooting where the "licznik" reach 500-600, and I have a message like this:
I will be very grateful for any clue
abort() was called at PC 0x40144873 on core 1
code:

// Import required libraries
#include "WiFi.h"
#include "ESPAsyncWebServer.h"
//#include <Adafruit_Sensor.h>
#include <DHT.h>
#include <Wire.h>

// Replace with your network credentials
const char* ssid = "BTHub6-F53S";
const char* password = "hunvTA6PiRkK";

#define DHT1PIN 32 // Digital pin connected to the DHT sensor
#define DHT2PIN 33
#define DHT3PIN 26
#define DHT4PIN 25
#define DHT5PIN 16

#define DHTTYPE DHT11 // DHT 11
DHT dht1(DHT1PIN, DHTTYPE);
DHT dht2(DHT2PIN, DHTTYPE);
DHT dht3(DHT3PIN, DHTTYPE);
DHT dht4(DHT4PIN, DHTTYPE);
DHT dht5(DHT5PIN, DHTTYPE);

float t1; float t2; float t3; float t4; float t5;
float h1; float h2; float h3; float h4; float h5;

float licznik=0;

int interval=2000;
int interval2=16000;

//unsigned float currentMillis;
//unsigned float currentMillis2;
//unsigned float previousMillis = 0;
//unsigned float previousMillis2 = 0;
// double currentMillis;
// double currentMillis2;
// double previousMillis = 0;
// double previousMillis2 = 0;
unsigned long currentMillis;
unsigned long currentMillis2;
unsigned long previousMillis = 0;
unsigned long previousMillis2 = 0;

//Pomiar Napiecia i Acc dry contact
const int VoltsPin = 35;
const int AccPin = 34;
float volts;
int AccState = LOW;
String Acc;

const int SysRelay = 13;
const int FanRelay = 17;

float TSon=25;
float TSoff=25;
float TFon=25;
float TFoff=25;
int ll=0;
int llimit=6;

String lastT1;
String lastH1;
String lastT2;
String lastH2;
String lastT3;
String lastH3;
String lastT4;
String lastH4;
String lastT5;
String lastH5;
String lastV;
String lastll;
String lastSFon;
String lastSFoff;
String lastSFstat;
String SFanState;
String CFanState;
String lastCFon;
String lastCFoff;
String lastCFstat;
bool active=false;



String readDHTT1() {
// Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
t1 = dht1.readTemperature();
if (isnan(t1)) {
return "--";
}
else {
return String(t1);
}
}

String readDHTH1() {
// Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
h1 = dht1.readHumidity();
if (isnan(h1)) {
return "--";
}
else {
return String(h1);
}
}
////////////////////////2

String readDHTT2() {
// Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
t2 = dht2.readTemperature();
if (isnan(t2)) {
return "--";
}
else {
return String(t2);
}
}

String readDHTH2() {
// Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
h2 = dht2.readHumidity();
if (isnan(h2)) {
return "--";
}
else {
return String(h2);
}
}

////////////////////////3

String readDHTT3() {
// Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
t3 = dht3.readTemperature();
if (isnan(t3)) {
return "--";
}
else {
return String(t3);
}
}

String readDHTH3() {
// Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
h3 = dht3.readHumidity();
if (isnan(h3)) {
return "--";
}
else {
return String(h3);
}
}
////////////////////////4

String readDHTT4() {
// Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
t4 = dht4.readTemperature();
if (isnan(t4)) {
return "--";
}
else {
return String(t4);
}
}

String readDHTH4() {
// Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
h4 = dht4.readHumidity();
if (isnan(h4)) {
return "--";
}
else {
return String(h4);
}
}
////////////////////////5

String readDHTT5() {
// Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
t5 = dht5.readTemperature();
if (isnan(t5)) {
return "--";
}
else {
return String(t5);
}
}

String readDHTH5() {
// Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
h5 = dht5.readHumidity();
if (isnan(h5)) {
return "--";
}
else {
return String(h5);
}
}


float vol(){

if ( volts>=0 && volts<50){
volts=0;
}
if ( volts>=50 && volts<533){
volts=volts/150;
}
if ( volts>=534 && volts<685){
volts=volts/152.063;
}
if ( volts>=686 && volts<822){
volts=volts/159.511;
}
if ( volts>=822 && volts<965){
volts=volts/164.367;
}
if ( volts>=965 && volts<1133){
volts=volts/167.935;
}
if ( volts>=1133 && volts<1423){
volts=volts/172.547;
}
if ( volts>=1423 && volts<1680){
volts=volts/176.283;
}
if ( volts>=1680 && volts<1975){
volts=volts/179.574;
}
if ( volts>=1975 && volts<2380){
volts=volts/181.914;
}
if ( volts>=2380 && volts<2591){
volts=volts/184.261;
}
if ( volts>=2591 && volts<2799){
volts=volts/185.499;
}
if ( volts>=2799 && volts<2915){
volts=volts/186.878;
}
if ( volts>=2915 && volts<3069){
volts=volts/188.701;
}
if ( volts>=3069 && volts<3174){
volts=volts/190.935;
}
if ( volts>=3174 && volts<3303){
volts=volts/193.493;
}
if ( volts>=3303 && volts<3431){
volts=volts/195.847;
}
if ( volts>=3431 && volts<3555){
volts=volts/198.949;
}
if ( volts>=3555 && volts<3671){
volts=volts/201.364;
}
if ( volts>=3671 && volts<3799){
volts=volts/204.102;
}
if ( volts>=3799 && volts<3987){
volts=volts/208.40;
}
if ( volts>=3987 && volts<4094){
volts=volts/212.269;
}
if ( volts>=4094){
volts=20;
}
return volts;
}
/////////////////////////

const char index_html[] PROGMEM = R"rawliteral(
<!DOCTYPE HTML><html style="background-color:Gray;"><head>
<title>Car Temperature System control</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
<style>
html {
font-family: Arial;
display: inline-block;
margin: 10px auto;
margin-left: 20px;
text-align: Left;
}
h2 { font-size: 2.0rem; }
h3 { font-size: 1.0rem; }
p { font-size: 1.2rem; }
.units { font-size: 0.8rem; }
.dht-labels{
font-size: 1.2rem;
vertical-align:middle;
padding-bottom: 15px;
}

</style>
</head><body>
<h2 style="background-color:Blue;">Temperature</h2>
<p><span >Front Left Crate T: </span><span id="temp1">%TEMP1%</span><sup>&deg;C</sup><span > H: </span><span id="hum1">%HUM1%</span><sup>&#37;RH</sup></p>
<p><span >Rear Left Crate T: </span><span id="temp2">%TEMP2%</span><sup>&deg;C</sup><span > H: </span><span id="hum2">%HUM2%</span><sup>&#37;RH</sup></p>
<p><span >Rear Right Crate T: </span><span id="temp3">%TEMP3%</span><sup>&deg;C</sup><span > H: </span><span id="hum3">%HUM3%</span><sup>&#37;RH</sup></p>
<p><span >Driver T: </span><span id="temp4">%TEMP4%</span><sup>&deg;C</sup><span > H: </span><span id="hum4">%HUM4%</span><sup>&#37;RH</sup></p><BR><BR>
<p><span >System T: </span><span id="temp5">%TEMP5%</span><sup>&deg;C</sup><span > H: </span><span id="hum5">%HUM5%</span><sup>&#37;RH</sup></p>
<h2> Settings:</h2>
<p><span >System Fan ON> </span><span id="SFon">%SFON%</span><sup>&deg;C</sup><span > OFF< </span><span id="SFoff">%SFOFF%</span><sup>&deg;C</sup><span > Status: </span><span id="SFstat">%SFSTAT%</span></p>
<p><span >Crate's Fan ON> </span><span id="CFon">%CFON%</span><sup>&deg;C</sup><span > OFF< </span><span id="CFoff">%CFOFF%</span><sup>&deg;C</sup><span > Status: </span><span id="CFstat">%CFSTAT%</span></p>
<p><span >Volts: </span><span id="v">%VOLTS%</span>[V]</p>
<p><span >Licznik: </span><span id="licznik">%LICZNIK%</span></p>

</body>

<script>
setInterval(function ( ) {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("temp1").innerHTML = this.responseText;
}
};
xhttp.open("GET", "/temp1", true);
xhttp.send();
}, 15000 ) ;

setInterval(function ( ) {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("hum1").innerHTML = this.responseText;
}
};
xhttp.open("GET", "/hum1", true);
xhttp.send();
}, 15000 ) ;

setInterval(function ( ) {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("v").innerHTML = this.responseText;
}
};
xhttp.open("GET", "/v", true);
xhttp.send();
}, 15000 ) ;

setInterval(function ( ) {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("licznik").innerHTML = this.responseText;
}
};
xhttp.open("GET", "/licznik", true);
xhttp.send();
}, 15000 ) ;

setInterval(function ( ) {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("temp2").innerHTML = this.responseText;
}
};
xhttp.open("GET", "/temp2", true);
xhttp.send();
}, 15000 ) ;

setInterval(function ( ) {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("hum2").innerHTML = this.responseText;
}
};
xhttp.open("GET", "/hum2", true);
xhttp.send();
}, 15000 ) ;

setInterval(function ( ) {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("temp3").innerHTML = this.responseText;
}
};
xhttp.open("GET", "/temp3", true);
xhttp.send();
}, 15000 ) ;

setInterval(function ( ) {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("hum3").innerHTML = this.responseText;
}
};
xhttp.open("GET", "/hum3", true);
xhttp.send();
}, 15000 ) ;

setInterval(function ( ) {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("temp4").innerHTML = this.responseText;
}
};
xhttp.open("GET", "/temp4", true);
xhttp.send();
}, 15000 ) ;

setInterval(function ( ) {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("hum4").innerHTML = this.responseText;
}
};
xhttp.open("GET", "/hum4", true);
xhttp.send();
}, 15000 ) ;

setInterval(function ( ) {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("temp5").innerHTML = this.responseText;
}
};
xhttp.open("GET", "/temp5", true);
xhttp.send();
}, 15000 ) ;

setInterval(function ( ) {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("hum5").innerHTML = this.responseText;
}
};
xhttp.open("GET", "/hum5", true);
xhttp.send();
}, 15000 ) ;

setInterval(function ( ) {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("SFon").innerHTML = this.responseText;
}
};
xhttp.open("GET", "/SFon", true);
xhttp.send();
}, 15000 ) ;

setInterval(function ( ) {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("SFoff").innerHTML = this.responseText;
}
};
xhttp.open("GET", "/SFoff", true);
xhttp.send();
}, 15000 ) ;

setInterval(function ( ) {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("SFstat").innerHTML = this.responseText;
}
};
xhttp.open("GET", "/SFstat", true);
xhttp.send();
}, 15000 ) ;

setInterval(function ( ) {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("CFon").innerHTML = this.responseText;
}
};
xhttp.open("GET", "/CFon", true);
xhttp.send();
}, 15000 ) ;

setInterval(function ( ) {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("CFoff").innerHTML = this.responseText;
}
};
xhttp.open("GET", "/CFoff", true);
xhttp.send();
}, 15000 ) ;

setInterval(function ( ) {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("CFstat").innerHTML = this.responseText;
}
};
xhttp.open("GET", "/CFstat", true);
xhttp.send();
}, 15000 ) ;

</script>
</html>)rawliteral";

void notFound(AsyncWebServerRequest *request) {
request->send(404, "text/plain", "Not found");
}


AsyncWebServer server(80);


// Replaces placeholder with DS18B20 values
String processor(const String& var) {
//Serial.println(var);
if (var == "TEMP1") {
return lastT1;
}
else if (var == "HUM1") {
return lastH1;
}
else if (var == "TEMP2") {
return lastT2;
}
else if (var == "HUM2") {
return lastH2;
}
else if (var == "TEMP3") {
return lastT3;
}
else if (var == "HUM3") {
return lastH3;
}
else if (var == "TEMP4") {
return lastT4;
}
else if (var == "HUM4") {
return lastH4;
}
else if (var == "TEMP5") {
return lastT5;
}
else if (var == "HUM5") {
return lastH5;
}

else if (var == "VOLTS") {
return lastV;
}
else if (var == "LICZNIK") {
return lastll;
}
else if (var == "SFON") {
return lastSFon;
}
else if (var == "SFOFF") {
return lastSFoff;
}
else if (var == "SFSTAT") {
return lastSFstat;
}
else if (var == "CFON") {
return lastCFon;
}
else if (var == "CFOFF") {
return lastCFoff;
}
else if (var == "CFSTAT") {
return lastCFstat;
}


return String();}

//////////////////


void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
// Connect to Wi-Fi
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi..");
}

// Print ESP32 Local IP Address
Serial.println(WiFi.localIP());
Serial.println(WiFi.macAddress());

dht1.begin();
dht2.begin();
dht3.begin();
dht4.begin();
dht5.begin();

pinMode(FanRelay, OUTPUT);
pinMode(SysRelay, OUTPUT);

pinMode(VoltsPin, INPUT); // meassure voltage odf Acu
pinMode(AccPin, INPUT); // Acc is on or off

// Send web page to client
server.on("/", HTTP_GET, [](AsyncWebServerRequest * request) {
request->send_P(200, "text/html", index_html, processor);
});
server.onNotFound(notFound);
server.begin();
}

void loop() {
// put your main code here, to run repeatedly:
currentMillis = millis();
currentMillis2 = millis();
if (currentMillis - previousMillis >= interval) {
Serial.println(currentMillis);
previousMillis = currentMillis;
active=true;

volts = analogRead(VoltsPin);
vol();
Serial.print("Volts: "); Serial.println(volts);

AccState = digitalRead(AccPin);
if ( AccState == HIGH ) {
Acc = "ON";
}
else {
Acc = "OFF";
}
Serial.print("Acc: ");
Serial.println(Acc);

readDHTT1(); readDHTH1();
Serial.print("T1:"); Serial.print(t1); Serial.print(" H1:"); Serial.println(h1);

readDHTT2(); readDHTH2();
Serial.print("T2:"); Serial.print(t2); Serial.print(" H2:"); Serial.println(h2);

readDHTT3(); readDHTH3();
Serial.print("T3:"); Serial.print(t3); Serial.print(" H3:"); Serial.println(h3);

readDHTT4(); readDHTH4();
Serial.print("T4:"); Serial.print(t4); Serial.print(" H4:"); Serial.println(h4);

readDHTT5(); readDHTH5();
Serial.print("T5:"); Serial.print(t5); Serial.print(" H5:"); Serial.println(h5);

if (((t1>TFon)||(t2>TFon)||(t2>TFon)) /*&& AccState==HIGH*/){
ll=ll+1; Serial.print("licznik wentylatora: "); Serial.println(ll);

}
if (ll>llimit){
digitalWrite(FanRelay, HIGH);
// Serial.print("Crate Fan ON. Treshold value ON: ");
// Serial.print(TFon); Serial.println("*C");
CFanState="ON";
}

if (((t1<TFoff)&&(t2<TFoff)&&(t2<TFoff)) /*|| AccState==LOW*/){
ll=0;
digitalWrite(FanRelay, LOW);
// Serial.print("Crate Fan OFF. Treshold value OFF: ");
// Serial.print(TFoff); Serial.println("*C");
CFanState="OFF";
}

licznik=licznik+1;
Serial.print("Licznik: "); Serial.println(licznik);


if ((t5>TSon) /*&& AccState==HIGH*/){
digitalWrite(SysRelay, HIGH);
// Serial.print("System Fan ON. Treshold value ON: ");
// Serial.print(TSon); Serial.println("*C");
SFanState="ON";
}

if ((t5<TSoff) /*|| AccState==LOW*/){
digitalWrite(SysRelay, LOW);
// Serial.print("System Fan OFF. Treshold value OFF: ");
// Serial.print(TSoff); Serial.println("*C");
SFanState="OFF";
}
}
else{
active=false;
}
if (currentMillis2 - previousMillis2 >= interval2 && active==false) {
Serial.print("Break 2:");Serial.println(currentMillis2); Serial.println(t1);
previousMillis2 = currentMillis2;
lastT1 = String(t1,1);
lastH1 = String(h1,1);
lastV = String(volts,1);
lastT2 = String(t2,1);
lastH2 = String(h2,1);
lastT3 = String(t3,1);
lastH3 = String(h3,1);
lastT4 = String(t4,1);
lastH4 = String(h4,1);
lastT5 = String(t5,1);
lastH5 = String(h5,1);
lastll = String(licznik);
lastSFon = String(TSon,1);
lastSFoff = String(TSoff,1);
lastSFstat = SFanState;
lastCFon = String(TFon,1);
lastCFoff = String(TFoff,1);
lastCFstat = CFanState;

server.on("/temp1", HTTP_GET, [](AsyncWebServerRequest * request) {
request->send_P(200, "text/plain", lastT1.c_str());
});
server.on("/hum1", HTTP_GET, [](AsyncWebServerRequest * request) {
request->send_P(200, "text/plain", lastH1.c_str());
});
server.on("/v", HTTP_GET, [](AsyncWebServerRequest * request) {
request->send_P(200, "text/plain", lastV.c_str());
});
server.on("/temp2", HTTP_GET, [](AsyncWebServerRequest * request) {
request->send_P(200, "text/plain", lastT2.c_str());
});
server.on("/hum2", HTTP_GET, [](AsyncWebServerRequest * request) {
request->send_P(200, "text/plain", lastH2.c_str());
});
server.on("/temp3", HTTP_GET, [](AsyncWebServerRequest * request) {
request->send_P(200, "text/plain", lastT3.c_str());
});
server.on("/hum3", HTTP_GET, [](AsyncWebServerRequest * request) {
request->send_P(200, "text/plain", lastH3.c_str());
});
server.on("/temp4", HTTP_GET, [](AsyncWebServerRequest * request) {
request->send_P(200, "text/plain", lastT4.c_str());
});
server.on("/hum4", HTTP_GET, [](AsyncWebServerRequest * request) {
request->send_P(200, "text/plain", lastH4.c_str());
});
server.on("/temp5", HTTP_GET, [](AsyncWebServerRequest * request) {
request->send_P(200, "text/plain", lastT5.c_str());
});
server.on("/hum5", HTTP_GET, [](AsyncWebServerRequest * request) {
request->send_P(200, "text/plain", lastH5.c_str());
});
server.on("/licznik", HTTP_GET, [](AsyncWebServerRequest * request) {
request->send_P(200, "text/plain", lastll.c_str());
});
server.on("/SFon", HTTP_GET, [](AsyncWebServerRequest * request) {
request->send_P(200, "text/plain", lastSFon.c_str());
});
server.on("/SFoff", HTTP_GET, [](AsyncWebServerRequest * request) {
request->send_P(200, "text/plain", lastSFoff.c_str());
});
server.on("/SFstat", HTTP_GET, [](AsyncWebServerRequest * request) {
request->send_P(200, "text/plain", lastSFstat.c_str());
});
server.on("/CFon", HTTP_GET, [](AsyncWebServerRequest * request) {
request->send_P(200, "text/plain", lastCFon.c_str());
});
server.on("/CFoff", HTTP_GET, [](AsyncWebServerRequest * request) {
request->send_P(200, "text/plain", lastCFoff.c_str());
});
server.on("/CFstat", HTTP_GET, [](AsyncWebServerRequest * request) {
request->send_P(200, "text/plain", lastCFstat.c_str());
});

Serial.print("System Fan:"); Serial.println(SFanState);
Serial.print("Crate's Fan:"); Serial.println(CFanState);
}

}

ESP_Sprite
Posts: 9730
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 AsynchWeb Server ABORT() 4xDHT 2xRelay rebooting

Postby ESP_Sprite » Wed Mar 03, 2021 1:29 am

Moving to Arduino forum. Suggest you use EspExceptionDecoder to decode that exception so we can see where the abort happens, though.

behemut
Posts: 2
Joined: Tue Mar 02, 2021 10:14 am

Re: ESP32 AsynchWeb Server ABORT() 4xDHT 2xRelay rebooting

Postby behemut » Wed Mar 03, 2021 12:20 pm

thank you for that,

0x4008860c: invoke_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c line 156
0x40088889: abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c line 171
0x40145263: __cxxabiv1::__terminate(void (*)()) at /builds/idf/crosstool-NG/.build/src/gcc-5.2.0/libstdc++-v3/libsupc++/eh_terminate.cc line 47
0x401452aa: std::terminate() at /builds/idf/crosstool-NG/.build/src/gcc-5.2.0/libstdc++-v3/libsupc++/eh_terminate.cc line 57
0x40144993: __cxxabiv1::__cxa_throw(void*, std::type_info*, void (*)(void*)) at /builds/idf/crosstool-NG/.build/src/gcc-5.2.0/libstdc++-v3/libsupc++/eh_throw.cc line 87
0x40144cc6: operator new(unsigned int) at /builds/idf/crosstool-NG/.build/src/gcc-5.2.0/libstdc++-v3/libsupc++/new_op.cc line 54
0x400da4fe: AsyncServer::_accept(tcp_pcb*, signed char) (C:\Program Files at x86)\Arduino\libraries\AsyncTCP\src\AsyncTCP.cpp line 1316
0x400da598: AsyncServer::_s_accept(void*, tcp_pcb*, signed char) (C:\Program Files at x86)\Arduino\libraries\AsyncTCP\src\AsyncTCP.cpp line 1352
0x40134e91: tcp_process at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/core/tcp_in.c line 865
0x4013592a: tcp_input at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/core/tcp_in.c line 372
0x4012e8bb: ip4_input at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/core/ipv4/ip4.c line 750
0x40133002: ethernet_input at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/netif/ethernet.c line 184
0x401219a7: tcpip_thread at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/api/tcpip.c line 135
0x4008988a: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c line 143

ESP_Sprite
Posts: 9730
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 AsynchWeb Server ABORT() 4xDHT 2xRelay rebooting

Postby ESP_Sprite » Thu Mar 04, 2021 2:12 am

It smells like you have a memory leak somewhere and are running out of memory. Can't tell exactly where at a glance, though. Perhaps you can whittle your example down to the smallest bit of code that exhibits the error and post that? Should make it easier for forum people to see where the error might be.

Wayde98
Posts: 3
Joined: Sun Aug 08, 2021 12:03 am

Re: ESP32 AsynchWeb Server ABORT() 4xDHT 2xRelay rebooting

Postby Wayde98 » Tue Jun 14, 2022 3:50 am

Old thread, but for the benefit of others, I have a similar problem. Very frequent unexplained reboots when uploading settings to ESP via a web server interface page.

I have not solved it yet, but if I comment out the String processor(const String& var) code (the whole block from { to }, then the reboots stop.

Not sure why yet this helps, but it took me days of troubleshooting to get this far, so I think I might figure it out soon.

lbernstone
Posts: 826
Joined: Mon Jul 22, 2019 3:20 pm

Re: ESP32 AsynchWeb Server ABORT() 4xDHT 2xRelay rebooting

Postby lbernstone » Tue Jun 14, 2022 8:52 am

Don't pass Strings around. That is what pointers are for.

Who is online

Users browsing this forum: No registered users and 74 guests