How to set ESP32 reset when there's crash issue like stack overflow?

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
mehmet64
Posts: 40
http://meble-kuchenne.info.pl
Joined: Mon Apr 05, 2021 1:59 am
Has thanked: 8 times
Been thanked: 4 times

How to set ESP32 reset when there's crash issue like stack overflow?

Post by mehmet64 »

hello
how set panic handler behavior in ESP32////
my project with ESP32 crash after 4 or 5 hour in working how can set self restart it

medelec35
Matrix Staff
Posts: 1463
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 514 times
Been thanked: 473 times

Re: How to set ESP32 reset when there's crash issue like stack overflow?

Post by medelec35 »

Flowcode has an autosave function that can be enabled within Global settings > Application tab
Martin

chipfryer27
Valued Contributor
Posts: 1177
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 287 times
Been thanked: 417 times

Re: How to set ESP32 reset when there's crash issue like stack overflow?

Post by chipfryer27 »

Hi

I think mehmet64 might be meaning when his hardware crashes?

I don't have too much experience with the ESP32 but perhaps the Watch Dog Timer would assist?

Regards

BenR
Matrix Staff
Posts: 1755
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 446 times
Been thanked: 606 times

Re: How to set ESP32 reset when there's crash issue like stack overflow?

Post by BenR »

Hello,

When you say it's crashing what exactly is happening. Emg. Does the WiFi comms stop working etc? Could you do something like trying to detect the stalled condition and for example disconnect and reconnect the WiFi.

medelec35
Matrix Staff
Posts: 1463
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 514 times
Been thanked: 473 times

Re: How to set ESP32 reset when there's crash issue like stack overflow?

Post by medelec35 »

chipfryer27 wrote:
Fri Mar 17, 2023 4:56 pm
Hi

I think mehmet64 might be meaning when his hardware crashes?

I don't have too much experience with the ESP32 but perhaps the Watch Dog Timer would assist?

Regards
Yes, indeed.
Thank you I had misread the post.
Martin

mnfisher
Valued Contributor
Posts: 981
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 105 times
Been thanked: 516 times

Re: How to set ESP32 reset when there's crash issue like stack overflow?

Post by mnfisher »

I posted a small component that allows you to query the restart reason at viewtopic.php?f=3&t=1623&p=9450&hilit=E ... tart#p9450
You can then choose different actions after crash or power on etc.

Need to check why you're getting a crash ? Stack overflow shouldn't occur - do you have some recursive code with no 'end' condition?

Martin

Post Reply