You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Audio development kit: none
-Module or chip used: ESP32-WROVER-E
IDF version v5.3.2
[ADF version v2.7-47-g93a56fcd
Build system: idf.py
Running log:
`I (8022747) AUDIO_THREAD: The http task allocate stack on external memory
I (8022757) AUDIO_ELEMENT: [http-0x3f823334] Element task created
I (8022767) AUDIO_PIPELINE: Func:audio_pipeline_run, Line:359, MEM Total:3863196 Bytes, Inter:84539 Bytes, Dram:83539 Bytes, Dram largest free:47104Bytes
I (8022777) AUDIO_ELEMENT: [http] AEL_MSG_CMD_RESUME,state:1
I (8022777) HTTP_STREAM: _http_open
I (8022797) HTTP_STREAM: http_client_open start 0
I (8022777) AUDIO_PIPELINE: Pipeline started
I (8025037) esp-x509-crt-bundle: Certificate validated
I (8027387) HTTP_STREAM: http_client_open success
I (8028417) HTTP_STREAM: http_client_fetch_headers
I (8028417) HTTP_STREAM: Load URI: total_bytes=0
I have a use case for a single element (http stream) pipeline where I use that to discover what the codec of the stream is. Once that is known I then add to the pipeline based on what the codec is. The problem is that after running through the pipeline multiple times it can crash on startup. I believe this is caused the variable rb in function _pipeline_rb_linked in audio_pipeline.c. I believe it is used after being freed from previous pipeline run.
What fixes it for me is to check for both first and last being true and exit function before doing anything else. Like this:
Environment
-Module or chip used: ESP32-WROVER-E
`I (8022747) AUDIO_THREAD: The http task allocate stack on external memory
I (8022757) AUDIO_ELEMENT: [http-0x3f823334] Element task created
I (8022767) AUDIO_PIPELINE: Func:audio_pipeline_run, Line:359, MEM Total:3863196 Bytes, Inter:84539 Bytes, Dram:83539 Bytes, Dram largest free:47104Bytes
I (8022777) AUDIO_ELEMENT: [http] AEL_MSG_CMD_RESUME,state:1
I (8022777) HTTP_STREAM: _http_open
I (8022797) HTTP_STREAM: http_client_open start 0
I (8022777) AUDIO_PIPELINE: Pipeline started
I (8025037) esp-x509-crt-bundle: Certificate validated
I (8027387) HTTP_STREAM: http_client_open success
I (8028417) HTTP_STREAM: http_client_fetch_headers
I (8028417) HTTP_STREAM: Load URI: total_bytes=0
assert failed: xQueueSemaphoreTake queue.c:1709 (( pxQueue ))
Backtrace: 0x40081ffe:0x3f8333e0 0x4009674d:0x3f833400 0x4009d9cd:0x3f833420 0x40097082:0x3f833540 0x400e9070:0x3f833580 0x400e6def:0x3f8335b0 0x400ed6f9:0x3f8335e0 0x400e7382:0x3f833600 0x400e7516:0x3f833630 0x400973c1:0x3f833660
`
Problem Description
I have a use case for a single element (http stream) pipeline where I use that to discover what the codec of the stream is. Once that is known I then add to the pipeline based on what the codec is. The problem is that after running through the pipeline multiple times it can crash on startup. I believe this is caused the variable rb in function _pipeline_rb_linked in audio_pipeline.c. I believe it is used after being freed from previous pipeline run.
What fixes it for me is to check for both first and last being true and exit function before doing anything else. Like this:
`static esp_err_t _pipeline_rb_linked(audio_pipeline_handle_t pipeline, audio_element_handle_t el, bool first, bool last)
{
static ringbuf_handle_t rb;
ringbuf_item_t *rb_item;
Expected Behavior
Single element pipeline runs
Actual Behavior
Can crash after multiple runs
Steps to Reproduce
The text was updated successfully, but these errors were encountered: