ESP32 core 0 panic on WiFi disconnect

Here is the crash log that I get when my ESP32 get disconnected from the WiFi

my code is simply the default code that I get form the Quickstart:

/*************************************************************

  This is a simple demo of sending and receiving some data.
  Be sure to check out other examples!
 *************************************************************/

/* Fill-in information from Blynk Device Info here */
#define BLYNK_TEMPLATE_ID           "TMPL6UbF17bzt"
#define BLYNK_TEMPLATE_NAME         "Quickstart Template"
#define BLYNK_AUTH_TOKEN            "vp3_0Kfl7QwjrNwbPt1lh_5VzRDZYLh1"

/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial


#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "wifissid";
char pass[] = "wifipassword";

BlynkTimer timer;

// This function is called every time the Virtual Pin 0 state changes
BLYNK_WRITE(V0)
{
  // Set incoming value from pin V0 to a variable
  int value = param.asInt();

  // Update state
  Blynk.virtualWrite(V1, value);
}

// This function is called every time the device is connected to the Blynk.Cloud
BLYNK_CONNECTED()
{
  // Change Web Link Button message to "Congratulations!"
  // Blynk.setProperty(V3, "offImageUrl", "https://static-image.nyc3.cdn.digitaloceanspaces.com/general/fte/congratulations.png");
  // Blynk.setProperty(V3, "onImageUrl",  "https://static-image.nyc3.cdn.digitaloceanspaces.com/general/fte/congratulations_pressed.png");
  // Blynk.setProperty(V3, "url", "https://docs.blynk.io/en/getting-started/what-do-i-need-to-blynk/how-quickstart-device-was-made");
}

// This function sends Arduino's uptime every second to Virtual Pin 2.
void myTimerEvent()
{
  // You can send any value at any time.
  // Please don't send more that 10 values per second.
  Blynk.virtualWrite(V2, millis() / 1000);
}

void setup()
{
  // Debug console
  Serial.begin(115200);

  Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);
  // You can also specify server:
  //Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass, "blynk.cloud", 80);
  //Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass, IPAddress(192,168,1,100), 8080);

  // Setup a function to be called every second
  timer.setInterval(1000, myTimerEvent);
}

void loop()
{
  Blynk.run();
  timer.run();
  // Serial.println(V1);
  // You can inject your own code or combine it with other sketches.
  // Check other examples on how to communicate with Blynk. Remember
  // to avoid delay() function!
}

Here is the error log:

14:55:18.502 -> [39] Connecting to Simon
14:55:19.618 -> Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
14:55:19.618 -> Memory dump at 0x4012b8dc: ff8d2500 0c042102 23053240
14:55:19.618 -> Core  0 register dump:
14:55:19.618 -> PC      : 0x4012b8e2  PS      : 0x00060830  A0      : 0x8014d8ba  A1      : 0x3ffca800  
14:55:19.618 -> A2      : 0x00000000  A3      : 0x00000000  A4      : 0x4012bfd2  A5      : 0x3ffc630c  
14:55:19.618 -> A6      : 0x00000000  A7      : 0x00000008  A8      : 0x8012bfda  A9      : 0x3ffca7e0  
14:55:19.618 -> A10     : 0x00000000  A11     : 0x0000007f  A12     : 0x3ffc5700  A13     : 0x00060823  
14:55:19.665 -> A14     : 0x00060820  A15     : 0x00000001  SAR     : 0x00000020  EXCCAUSE: 0x00000000  
14:55:19.665 -> EXCVADDR: 0x00000000  LBEG    : 0x4008921c  LEND    : 0x40089232  LCOUNT  : 0xffffffff  
14:55:19.665 -> 
14:55:19.665 -> 
14:55:19.665 -> Backtrace: 0x4012b8df:0x3ffca800 0x4014d8b7:0x3ffca840
14:55:19.665 -> 
14:55:19.665 -> 
14:55:19.665 -> 
14:55:19.665 -> 
14:55:19.665 -> ELF file SHA256: 4d0cdee3a6aaa97e
14:55:19.665 -> 
14:55:19.899 -> Rebooting...
14:55:19.899 -> ets Jul 29 2019 12:21:46
14:55:19.899 -> 
14:55:19.899 -> rst:0xc (SW_CPU_RESET),boot:0x36 (SPI_FAST_FLASH_BOOT)
14:55:19.899 -> configsip: 0, SPIWP:0xee
14:55:19.899 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
14:55:19.899 -> mode:DIO, clock div:1
14:55:19.899 -> load:0x3fff0030,len:1344
14:55:19.899 -> load:0x40078000,len:13924
14:55:19.899 -> ho 0 tail 12 room 4
14:55:19.899 -> load:0x40080400,len:3600
14:55:19.899 -> entry 0x400805f0
14:55:20.175 -> [38] Connecting to Simon
14:55:24.087 -> Guru Meditation Error: Core  0 panic'ed (InstructionFetchError). Exception was unhandled.
14:55:24.087 -> 
14:55:24.087 -> Core  0 register dump:
14:55:24.087 -> PC      : 0x3f4104be  PS      : 0x00060c33  A0      : 0x8013481a  A1      : 0x3ffca5f0  
14:55:24.087 -> A2      : 0x00000043  A3      : 0x00000000  A4      : 0x00000000  A5      : 0x3ff4e0c4  
14:55:24.087 -> A6      : 0x00000001  A7      : 0x00000001  A8      : 0x801345ea  A9      : 0x00060c23  
14:55:24.087 -> A10     : 0x3ff4e0c4  A11     : 0x00060c23  A12     : 0x00060c20  A13     : 0x3ffc7698  
14:55:24.087 -> A14     : 0x007c1684  A15     : 0x003fffff  SAR     : 0x0000001d  EXCCAUSE: 0x00000002  
14:55:24.087 -> EXCVADDR: 0x3f4104bc  LBEG    : 0x40089384  LEND    : 0x4008938f  LCOUNT  : 0x00000000  
14:55:24.087 -> 
14:55:24.087 -> 
14:55:24.087 -> Backtrace: 0x3f4104bb:0x3ffca5f0 |<-CORRUPTED
14:55:24.087 -> 
14:55:24.087 -> 
14:55:24.087 -> 
14:55:24.087 -> 
14:55:24.087 -> ELF file SHA256: 4d0cdee3a6aaa97e
14:55:24.087 -> 
14:55:24.321 -> Rebooting...
14:55:24.368 -> ets Jul 29 2019 12:21:46
14:55:24.368 -> 
14:55:24.368 -> rst:0xc (SW_CPU_RESET),boot:0x36 (SPI_FAST_FLASH_BOOT)
14:55:24.368 -> configsip: 0, SPIWP:0xee
14:55:24.368 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
14:55:24.368 -> mode:DIO, clock div:1
14:55:24.368 -> load:0x3fff0030,len:1344
14:55:24.368 -> load:0x40078000,len:13924
14:55:24.368 -> ho 0 tail 12 room 4
14:55:24.368 -> load:0x40080400,len:3600
14:55:24.368 -> entry 0x400805f0
14:55:24.599 -> [39] Connecting to Simon
14:55:30.193 -> ets Jul 29 2019 12:21:46
14:55:30.193 -> 
14:55:30.193 -> rst:0x8 (TG1WDT_SYS_RESET),boot:0x36 (SPI_FAST_FLASH_BOOT)
14:55:30.193 -> configsip: 0, SPIWP:0xee
14:55:30.193 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
14:55:30.193 -> mode:DIO, clock div:1
14:55:30.193 -> load:0x3fff0030,len:1344
14:55:30.193 -> load:0x40078000,len:13924
14:55:30.193 -> ho 0 tail 12 room 4
14:55:30.193 -> load:0x40080400,len:3600
14:55:30.193 -> csum err:0x9d!=0x19
14:55:30.193 -> ets_main.c 384 
14:55:30.520 -> ets Jul 29 2019 12:21:46

any help would be appreciated.

What version of the Blynk C++ library and ESP32 Core do you have installed?

What variant of the ESP32 is fitted to your dev board, and what ESP32 board type did you choose in the IDE when you compiled the sketch?

Pete.

I am using library of Blynk by Volodymyr Shymanskyy version 1.2.0
Arduino IED version 1.8.15, and later updated to 2.1.0 (same issue)
esp32 by Espressif Systems 2.0.9

ESP32 Chip model read by Serial Print = ESP32-D0WD-V3 Rev 3
Part number is : ESP32-WROOM-32E-N16

Board type choose: ESP32 Dev Module is selected at Arduino IDE compiler.

When you compile your sketch with verbose output enabled, do yo get a message like this towards the end of the compilation process?..

Multiple libraries were found for "WiFi.h"
 Used: C:\Users\Pete\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.9\libraries\WiFi
 Not used: C:\Program Files (x86)\Arduino\libraries\WiFi
Using library WiFi at version 2.0.0 in folder: C:\Users\Pete\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.9\libraries\WiFi 

Is your compiler finding and using WiFi version 2.0.0 that comes with the ESPe2 2.0.9 Core?

Have you tried installing the ESP Exception decoder and decoding your stack dump message?
If so, what results does it give?

Pete.

Thanks for the support. Mean time i am ordering new ESP32 for test. i suspect it might be hardware or circuit issue. will update !

Hi Pete, i manage to install the exception decoder and this is the result:

no multiple libraries were found.

Please replace the screenshot with copy/pasted text.

Pete.

Guru Meditation Error: Core 0 panic’ed (LoadProhibited). Exception was unhandled.

Core 0 register dump:
PC : 0x4012fdbf PS : 0x00060e30 A0 : 0x80151b4e A1 : 0x3ffcac30
A2 : 0x00000000 A3 : 0x00000001 A4 : 0x00000000 A5 : 0x3ffc673c
A6 : 0x3ffc19a4 A7 : 0x3ffb6328 A8 : 0x3ffc673c A9 : 0x3ffcac00
A10 : 0x00000000 A11 : 0x00000001 A12 : 0x3ffc5b30 A13 : 0x00060e23
A14 : 0x00060e20 A15 : 0x00000001 SAR : 0x00000020 EXCCAUSE: 0x0000001c
EXCVADDR: 0x000003fd LBEG : 0x4008974c LEND : 0x40089762 LCOUNT : 0xffffffff

Backtrace: 0x4012fdbc:0x3ffcac30 0x40151b4b:0x3ffcac70

Decoding 5 results
0x4012fdbf: lmacProcessTxComplete at ?? line ?
0x4008974c: memcpy at /builds/idf/crosstool-NG/.build/HOST-i686-w64-mingw32/xtensa-esp32-elf/src/newlib/newlib/libc/machine/xtensa/memcpy.S line 163
0x40089762: memcpy at /builds/idf/crosstool-NG/.build/HOST-i686-w64-mingw32/xtensa-esp32-elf/src/newlib/newlib/libc/machine/xtensa/memcpy.S line 197
0x4012fdbc: lmacProcessTxComplete at ?? line ?
0x40151b4b: ppTask at ?? line ?

i also having this reconnection issues after some time, and when this happens it will no longer able to connect to Blynk.
[645532] Connecting to blynk.cloud:80
[652532] Connecting to blynk.cloud:8080

@Simon_Cheng Please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your exception decoder message so that it displays correctly.
Triple backticks look like this:
```

Copy and paste these if you can’t find the correct symbol on your keyboard.

Pete.

Dear Pete,
Problem solved !!
It was a voltage dipping and causing these issues. After separate the power source from other ICs on my PCB, the Blynk works fine!
fyi, the PCA9555 chips on my board consumed more power during startup, which i managed to diagnose with oscilloscope.
Thanks .