Assert failed: vQueueDelete queue.c:2355 (pxQueue)

esp32testerr
Posts: 1
Joined: Fri Feb 21, 2025 3:42 pm

Assert failed: vQueueDelete queue.c:2355 (pxQueue)

Postby esp32testerr » Fri Feb 21, 2025 3:46 pm

Hello,

I am using

ESP32-WROVER: Dual-core 32-bit microprocessor up to 240 MHz, 4 MB Flash, 8 MB PSRAM, onboard 2.4 GHz Wi-Fi and Bluetooth 4.2 (LE)

I have a very simple piece of code where I am trying to initialize wifi, bluetooth and audio. But it fails. It works with (wifi & bluetooth) or (wifi & audio) or (bluetooth & audio) but if I try to use all 3 together it fails.

Code: Select all

#include <Audio.h>
#include <Arduino.h>
#include <WiFi.h>
#include <BLEDevice.h>
#include <BLEScan.h>
#include <BLEAdvertisedDevice.h>
 
// I2S settings
#define I2S_BCLK   32
#define I2S_DOUT   12
#define I2S_LRC    33

Audio audio;

// Wi-Fi credentials
const char* ssid = "my-wifi";
const char* password = "my-password";

// BLE scanning settings
BLEScan *scanner;

void setup() {
    Serial.begin(115200);
    Serial.println("\nStarting...");

    // Initialize Wi-Fi
    WiFi.begin(ssid, password);
    int retryCount = 0;
    while (WiFi.status() != WL_CONNECTED && retryCount < 20) {
        delay(500);
        Serial.print(".");
        retryCount++;
    }

    
    // Initialize BLE
    BLEDevice::init("");
  

    // Initialize Audio
    audio.setPinout(I2S_BCLK, I2S_LRC, I2S_DOUT);
    audio.setVolume(12);  // Set volume (0-21)

    Serial.println("Setup complete!");
}

void loop() {
    Serial.println("Cool");
}
And the Error is:

Rebooting...

Code: Select all

ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x1b (SPI_FAST_FLASH_BOOT)

configsip: 0, SPIWP:0xee

clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00

mode:DIO, clock div:1

load:0x3fff0030,len:4916

load:0x40078000,len:16436

load:0x40080400,len:4

ho 8 tail 4 room 4

load:0x40080404,len:3524

entry 0x400805b8

Starting...

..

assert failed: vQueueDelete queue.c:2355 (pxQueue)

Backtrace: 0x40082651:0x3fffc5e0 0x40095fbd:0x3fffc600 0x4009c1d2:0x3fffc620 0x40096986:0x3fffc750 0x4016b839:0x3fffc770 0x4016a62c:0x3fffc790 0x4016a674:0x3fffc7b0 0x401575c3:0x3fffc7d0 0x40152585:0x3fffc7f0 0x40181ab0:0x3fffc820 0x40155576:0x3fffc890 0x40151513:0x3fffc8e0 0x4015184b:0x3fffc900 0x4016b3c1:0x3fffc920 0x40096c66:0x3fffc950

ELF file SHA256: 55f15701a

Probably the memory overlfows? Any ideas or suggestions?

lbernstone
Posts: 1132
Joined: Mon Jul 22, 2019 3:20 pm

Re: Assert failed: vQueueDelete queue.c:2355 (pxQueue)

Postby lbernstone » Sat Feb 22, 2025 1:32 am

Pretty likely out of memory. Monitor your memory with the ESP methods. NimBLE has lower memory requirements than the builtin BLE library. If you have plenty of memory left, you can decode your backtrace to see where it is failing (but that sure does look like it is unable to create a queue b/c oom).

Who is online

Users browsing this forum: No registered users and 1 guest