esp_event_loop_create_default returns ESP_ERR_INVAID_STATE (IDFGH-10499) #11745
Labels
Resolution: NA
Issue resolution is unavailable
Status: Done
Issue is done internally
Type: Bug
bugs in IDF
Answers checklist.
IDF version.
ESP-IDF v5.0.2-dirty
Operating System used.
Linux
How did you build your project?
Eclipse IDE
If you are using Windows, please specify command line type.
None
Development Kit.
NodeMCU ESP-32S (ESP-WROOM-32)
Power Supply used.
USB
What is the expected behavior?
When called multiple times esp_event_loop_create_default returns error code ESP_ERR_INVAID_STATE, which is not documented.
Either
update the documentation (https://docs.espressif.com/projects/esp-idf/en/v5.0.2/esp32/api-reference/system/esp_event.html?highlight=esp_event_loop_create_default#_CPPv429esp_event_loop_create_defaultv)
or
make multiple calls to esp_event_loop_create_default idempotent (return ESP_OK, if it is already initialized)
What is the actual behavior?
Multiple calls to esp_event_loop_create_default results in "undocumented behavior".
Steps to reproduce.
Call esp_event_loop_create_default multiple times. E.g.:
esp_err_t test0 = esp_event_loop_create_default(); esp_err_t test1 = esp_event_loop_create_default(); printf("test0 : %s, test1 : %s\n", esp_err_to_name(test0), esp_err_to_name(test1));
Debug Logs.
More Information.
No response
The text was updated successfully, but these errors were encountered: