(esp_now_init Crash Reboot ESP32-S3

void setup(void)
{

    Serial.begin(115200);

      if(!SPIFFS.begin(FORMAT_SPIFFS_IF_FAILED)){
        Serial.println("SPIFFS Mount Failed");
        return;
    }
   
    Serial.println("Spiffs Init OK");

    listDir(SPIFFS, "/", 0);


    Serial.println("ESP32S3 7inch LCD");
      

    lcd.init();
    lcd.setRotation(0);
    lcd.setSwapBytes(1);

    lcd.fillScreen(TFT_WHITE);
    lcd.fillRect(0, 0, 50, 50, TFT_RED);
/*
    pin_init();
    touch_init();  
*/
  TJpgDec.setJpgScale(1);
   TJpgDec.setCallback(onDecode);
     TJpgDec.getFsJpgSize(&w, &h, "/splash/buddha.jpg");
     TJpgDec.drawFsJpg(SCREEN_W / 2 - w / 2, SCREEN_H / 2 - h / 2, "/splash/buddha.jpg"); 
    
    lcd.drawCircle(500,200,TFT_PINK);
    delay(3000);
    StartTime = millis();

  // The decoder must be given the exact name of the rendering function above

/*
  if (StartWiFi() == WL_CONNECTED && SetupTimeNTP() == true) {
   
  while (WiFi.status() == false )
  {
    Serial.print(".");
  }
  
    

   Serial.println("ESP32 WiFi Passed ************************************************");
   Firebase.begin(&config, &auth);
  }
   */  

     Serial.println("ESPnow Before 1111 !!!!  ---");
    WiFi.disconnect();
     Serial.println("ESPnow Before 222 !!!!  ---");
    if (esp_now_init() != ESP_OK) {
    Serial.println("Error initializing ESP-NOW");
    return;
    }
    Serial.println("ESPnowInit OK");

Hello I read

and so I put WiFi.disconnect(); this before esp_now_init but it chrases after Serial.println(“ESPnow Before 222 !!! —”);
any idear how to solve this ???

If it crashes, are you able to decode the crash log wih

build_type = debug
monitor_filters = espressif8266_exception_decoder

in the platformio.ini (+ Reupload + monitor)?

ESPnow Before 222 !!! —

Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x4206c537  PS      : 0x00060630  A0      : 0x8200d6b2  A1      : 0x3fcebf30
A2      : 0x3fca0140  A3      : 0x3fcef940  A4      : 0x3fca0140  A5      : 0x00000000  
A6      : 0x0000b474  A7      : 0xffff4d1c  A8      : 0x820292c0  A9      : 0x3fcebf10
A10     : 0x00000002  A11     : 0x3c0c3994  A12     : 0x42028960  A13     : 0x00000000  
A14     : 0x3fcebf05  A15     : 0x00000003  SAR     : 0x0000000a  EXCCAUSE: 0x0000001c
EXCVADDR: 0x0000004c  LBEG    : 0x400556d5  LEND    : 0x400556e5  LCOUNT  : 0xffffffff  


Backtrace: 0x4206c534:0x3fcebf30 0x4200d6af:0x3fcebf50 0x4202bee3:0x3fcebf80

That is what Serial Debug tells me.

My bad, this of course has to be esp32_exception_decoder

But it is a ESP32-S3 System
I changed it to
monitor_filters = espressif32_exception_decoder
is that OK

Oh I forgot
WiFi.mode(WIFI_STA);

So this works


void setup(void)
{

    Serial.begin(115200);

    WiFi.mode(WIFI_STA);

    WiFi.disconnect();
     Serial.println("ESPnow Before 222 !!!!  ---");
    if (esp_now_init() != ESP_OK) {
    Serial.println("Error initializing ESP-NOW");
    return;
    }
    Serial.println("ESPnowInit OK");
    esp_now_register_recv_cb(OnDataRecv);
    delay(3000);
     }

Thank you Max, could you if you read this tell me how often can I flash a ESP32 ESP32-S until it’s not useable anymore Merry Christmas to everyone