Skip to content
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

Fixed #7406 crash on WiFi STA_DISCONNECTED event with reason 0 #7414

Merged
merged 1 commit into from
Nov 2, 2022
Merged

Fixed #7406 crash on WiFi STA_DISCONNECTED event with reason 0 #7414

merged 1 commit into from
Nov 2, 2022

Conversation

Kuenlun
Copy link
Contributor

@Kuenlun Kuenlun commented Oct 31, 2022

Description of Change

Fixed #7406 . The "reason2str" macro in WiFiGeneric.cpp tries to read memory from index "-1" in "system_event_reasons" array when handling STA_DISCONNECTED event with reason 0. Dealing with reason 0 as a reason 1 (WIFI_REASON_UNSPECIFIED) will solve the problem (the reason for this event to arrive with reason 0 is unknown).
This proposed change has succesfuly solved the ESP32 Guru Meditation Error when hanling STA_DISCONNECTED event with reason 0.

Tests scenarios

It has been tested on the ESP32 DevKitC V4 esp32-s3-devkitc-1 as well as the esp32-s3-devkitc-1, using PlatformIO with the Arduino-esp32 core v2.0.4.

Related links

Closes #7406 of issue.

Fixed #7406 . The "reason2str" macro in WiFiGeneric.cpp tries to read memory from index "-1"  in "system_event_reasons" array when handling STA_DISCONNECTED event with reason 0. Dealing with reason 0 as a reason 1 (WIFI_REASON_UNSPECIFIED) will solve the problem (the reason for this event to arrive with reason 0 is unknown). #7406
@CLAassistant
Copy link

CLAassistant commented Oct 31, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@mrengineer7777 mrengineer7777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@mrengineer7777 mrengineer7777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Kuenlun
Copy link
Contributor Author

Kuenlun commented Nov 2, 2022

@mrengineer7777 do I have to do something else or just wait for someone to approve the pull request?
I see the messages "2 workflows awaiting approval", "17 expected and 1 successful checks" but I don't know if I have to do the tests or what.
Thanks.

@me-no-dev me-no-dev merged commit f4d8a48 into espressif:master Nov 2, 2022
@me-no-dev
Copy link
Member

Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WiFi error when processing STA_DISCONNECTED event with reason 0
4 participants