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

esp_event_loop_create_default returns ESP_ERR_INVAID_STATE (IDFGH-10499) #11745

Closed
3 tasks done
CmosC1CA opened this issue Jun 26, 2023 · 1 comment
Closed
3 tasks done
Assignees
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Type: Bug bugs in IDF

Comments

@CmosC1CA
Copy link

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

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.

test0 : ESP_OK, test1 : ESP_ERR_INVALID_STATE

More Information.

No response

@CmosC1CA CmosC1CA added the Type: Bug bugs in IDF label Jun 26, 2023
@github-actions github-actions bot changed the title esp_event_loop_create_default returns ESP_ERR_INVAID_STATE esp_event_loop_create_default returns ESP_ERR_INVAID_STATE (IDFGH-10499) Jun 26, 2023
@espressif-bot espressif-bot added the Status: Opened Issue is new label Jun 26, 2023
@ESP-Marius
Copy link
Collaborator

Thanks, we'll update the docs to reflect this.

@espressif-bot espressif-bot added Status: Reviewing Issue is being reviewed and removed Status: Opened Issue is new labels Jun 27, 2023
@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: NA Issue resolution is unavailable and removed Status: Reviewing Issue is being reviewed labels Jul 4, 2023
espressif-bot pushed a commit that referenced this issue Jul 15, 2023
…for esp_event_loop_create_default

ESP_ERR_INVALID_STATE was not listed as a possible return error code.

Closes #11745
espressif-bot pushed a commit that referenced this issue Jul 22, 2023
…for esp_event_loop_create_default

ESP_ERR_INVALID_STATE was not listed as a possible return error code.

Closes #11745
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests

3 participants