Page 1 of 1

Assert Failed in Ringbuffer When Reading from UART - esp_ringbuf/ringbuf.c:1038

Posted: Mon Aug 26, 2024 9:49 am
by gulkanguner
Steps to Reproduce:

1. Initialize UART2 with sensor1 pins (IO25/IO26) at 9600 baud rate.
2. Read data from UART2 (sensor1).
3. Flush and delete UART2.
4. Initialize UART2 with sensor2 pins (IO18/IO23) at 115200 baud rate.
5. Read data from UART2 (sensor2).
6. Flush and delete UART2.
7. Repeat this process every 30 seconds.

Expected Behavior:

The UART data should be read without any errors or assertion failures.

Actual Behavior:

After about 8 hours, the program crashes with the error mentioned above.

Environment:

- ESP-IDF version: 3.3.1
- Hardware: ESP32-WROOM-32 with 2 sensors using UART communication
- Compiler version: xtensa-esp32-elf-gcc 5.2.0
- FreeRTOS environment

Additional Context:

The issue is temporarily resolved by resetting the device or putting it into sleep mode. Please let me know if further details or logs are needed.

Re: Assert Failed in Ringbuffer When Reading from UART - esp_ringbuf/ringbuf.c:1038

Posted: Tue Aug 27, 2024 12:28 am
by ESP_Sprite
That's a ringbuffer pointer that is NULL... very hard to say what the issue is without your code. ESP-IDF 3.3.1 is unsupported by now, though: there's a high chance that if this is an ESP-IDF issue, it's fixed in a more recent version; I'd suggest you try that first.