Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.
Posted: Fri Jan 22, 2021 7:32 pm
I can't think of a way to introduce this error. It's pretty much out of the blue for me and I can't really pinpoint it to something:
What is obvious is that it seems to stem from the "calc_and_apply_dimming()" function inside pin.cpp. I have searched the internet already and just found this from the forum:
2) I do not create char array but an array with structs?
3) Yes I'm using the function calc_and_apply_dimming() in a cyclical loop of a seperate task which is delayed with vTaskDelayUntil() like so:
Following the leads I have put this function in place instead of Delaying and blocking the main thread. But I have to do this delayed loop somewhere.
Also, I don't really understand what this error is trying to tell me and especially why strings, char arrays and blocking delays seem to cause it?
Code: Select all
I (3637) esp_netif_handlers: sta ip: 192.168.4.34, mask: 255.255.255.0, gw: 192.168.4.1
I (3637) wifi.c: got ip:192.168.4.34
I (3637) wifi.c: connected to ap SSID:aurora_raspi password:somepassword
I (3647) app_main.cpp: sync system time
I (3647) app_main.cpp: starting mqtt event handler
I (3657) mqtts.c: [APP] Free memory: 229256 bytes
I (3667) app_main.cpp: entering dimming cycle
I (3667) mqtts.c: Other event id:7
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x400da3dc PS : 0x00060e30 A0 : 0x800d7040 A1 : 0x3ffcac50
0x400da3dc: pin::calc_and_apply_dimming() at C:\dev\aurora-esp32-firmware\build/../components/pin/pin.cpp:205
A2 : 0x00000000 A3 : 0x00000000 A4 : 0x00000001 A5 : 0x00000000
A6 : 0x3ffb45d0 A7 : 0x00060123 A8 : 0x00002f04 A9 : 0x00000000
A10 : 0x00000000 A11 : 0x00000000 A12 : 0x00000017 A13 : 0x0000001f
A14 : 0x0000003b A15 : 0x3ffbf608 SAR : 0x00000020 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xffffffff
Backtrace:0x400da3d9:0x3ffcac50 0x400d703d:0x3ffcaca0 0x4008af3d:0x3ffcacd0
0x400da3d9: pin::calc_and_apply_dimming() at C:\dev\aurora-esp32-firmware\build/../components/pin/pin.cpp:203
0x400d703d: vDimCycle(void*) at C:\dev\aurora-esp32-firmware\build/../main/app_main.cpp:51 (discriminator 2)
0x4008af3d: vPortTaskWrapper at C:/dev/esp/esp-idf/components/freertos/port/xtensa/port.c:168
1) I'm not using any strings.Check the following:
Do you use String Class and do a lot off String constructions with String c = "a" + "b"
are you creating char arrays on the fly e.g. char d[] = "efg";
are you using delay() - get rid of it its blocking
If there is one Yes than you've found the reason, if its 3x No we need your code (github, pastebin) to do further analysis
2) I do not create char array but an array with structs?
3) Yes I'm using the function calc_and_apply_dimming() in a cyclical loop of a seperate task which is delayed with vTaskDelayUntil() like so:
Code: Select all
void vDimCycle( void * pvParameters )
{
// Dimming
portTickType xLastWakeTime; // will be increased each cycle
// Initialise the xLastWakeTime variable with the current time.
xLastWakeTime = xTaskGetTickCount ();
for( ;; ) {
// Go through every light and dim according to specs
for (int i=0, len=sizeof(pinList)/sizeof(pinList[0]); i < len; ++i) {
pinList[i].calc_and_apply_dimming();
}
// Wait for the next cycle.
vTaskDelayUntil( &xLastWakeTime, MAIN_ADJUST_PERIOD / portTICK_PERIOD_MS);
}
}
Also, I don't really understand what this error is trying to tell me and especially why strings, char arrays and blocking delays seem to cause it?