-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WiFiGeneric Crash on WIFI_REASON_UNSPECIFIED #7959
Comments
@PilnyTomas Can you please check this issue? Thanks |
I've been thinking about this. The macro |
I'm experiencing a similar issue in my project. ESP32-S2 on arduino-esp32 v2.0.6. A user has reported it. It occurs every time he tries to use the device. But I haven't been able to reproduce it myself. The ESP32 is waking up from deep sleep and trying to connect to a WPA3 network.
Stack trace decoder (https://maximeborges.github.io/esp-stacktrace-decoder/) is reporting this:
Is there any progress on the issue? |
@nplan Thanks for confirming it's not just me. Ironically it's the debug log message that causes the crash. I'll submit a PR later to convert the reason2str macro into a function. That should resolve a potential crash due to bad index. |
I have started working on this PR. Will submit next week. |
Just had another crash on WiFiGeneric line 953, |
Completed by #8043 |
Board
ESP32-WROOM-32UE
Device Description
Custom hardware
Hardware Configuration
NA
Version
v2.0.7
IDE Name
PIO
Operating System
Win11
Flash frequency
40
PSRAM enabled
yes
Upload speed
460800
Description
Unexpected crash in WiFiGeneric.cpp with debug level 3 (info). I expect the WiFi module to print debug messages without crashing.
Crashed on WiFiGeneric
WIFI_REASON_UNSPECIFIED
line 953:log_w("Reason: %u - %s", reason, reason2str(reason));
.#define reason2str(r) ((r>176)?system_event_reasons[r-176]:system_event_reasons[r-1])
Not sure why it crashed. I think system_event_reasons[] is being indexed correctly.
Likely related to #7414. If we continue getting crashes on define
reason2str
then I recommend converting it to a function.This is how I print WiFi errors in my code:
Sketch
Debug Message
Other Steps to Reproduce
Have not reproduced the initial crash yet
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: