What am I doing wrong?

What am I doing wrong that I deserve this message?

--- 1. select Radio Task ---

--- 2. select Radio Task ---
Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.
Core 1 register dump:
PC      : 0x400d0ecb  PS      : 0x00060d30  A0      : 0x8008615c  A1      : 0x3ffb87c0  
A2      : 0x00000000  A3      : 0x00000001  A4      : 0x00000003  A5      : 0x00000000  
A6      : 0x00000000  A7      : 0x00000000  A8      : 0x800d0ebe  A9      : 0x3ffb8780  
A10     : 0x00000001  A11     : 0x00000000  A12     : 0x3ffb8498  A13     : 0x00000000  
A14     : 0x00000000  A15     : 0x3ffb875c  SAR     : 0x00000002  EXCCAUSE: 0x0000001d  
EXCVADDR: 0x00000001  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xffffffff  

ELF file SHA256: 0000000000000000

Backtrace: 0x400d0ecb:0x3ffb87c0 0x40086159:0x3ffb8820

Rebooting...

There isn’t very much in this tasks, so what’s going on that I don’t see (any more)?

void selectRadioTask(void *param)
{
  Serial.printf("\n--- 1. select Radio Task ---\n");

  // for-ever-loop
  // =============
  //
  for (;;)
  {
    Serial.printf("--- 2. select Radio Task ---\n");

    vTaskDelay(1000 / portTICK_PERIOD_MS);

  } // end for-ever-loop()

}   // end selectRadioTask()

Can you get this decoded with the same two platformio.ini instructions as in Unknown abort() of execution - #4 by maxgerhardt? I also don’t see how only this code could create such an issue on its own, maybe there are effects from other code.

Max,
A few things:
1.
CoolTerm doesn’t give the output you mentioned.
2.
The “normal” terminal in VSCode is “unstoppable” in scrolling over the screen, so it takes some hassle to get this print.


When I examined this output I see that “rotaryEncoderTask.cpp:140” is mentioned. Looking at that line I see a pointer I created:
struct Coder *pCoder;
3.
When I removed the pointer and use the “normal” variable coder - to which the pointer is pointing to - everything works again without any problem at all.
4.
That leads to the unexpected situation that PlatformIO accepts and evaluates the pointer anywhere in the program without problem, the program compiles without hesitation, but crashes when executed.
5.
If you want to see this in action I gladly put the code on GitHub.

Yes that would be great. I suspect you may forgotten to set the pointer to a value (like, pCoder = new Coder;) or there is a race condition in setting that global variable.

There you are.
I’m curious.

Max,
Looking again at my code; I think you’re right.
I don’t find a statement like: pCoder = &coder;
So, my code has the pointer, but that pointer never points to the address of the variable coder.
Thank you!