Classifier_continuous output none

Hello,I am trying implement continous output base on this project: link
I set debug flag run_classifier_continuous() and get this error.


The Guru Meditation Error occur when I print out the result.classification[ix].label and result.classification[ix].value.
I thought that EI_CLASSIFIER_SLICES_PER_MODEL_WINDOW = 4 is overrun and tried reduce to 2 but it doesn’t work.
Please help me.
Thanks in advance.

Hi @HuyYuh,

I don’t have that hardware to test your setup, so I will likely not be of much help. However, in my experience, you often see “Guru Meditation Errors” whenever you run out of memory (stack or heap) in your ESP32 thread. Sometimes, enabling the debug mode will cause you to run out of memory. Can you try building and running without the debug flag?

Also, I highly recommend creating an issue on that GitHub link you posted. The author may have a better chance of helping you out, as they will likely have the same hardware.

Hello @shawn_edgeimpulse,
I figured out that the output of result (result.classification) is only have the value of the label that it predict, the other which not being predicted are null. I get the Guru Meditation Errors because I try to print all the label and value

 for (size_t ix = 0; ix < EI_CLASSIFIER_LABEL_COUNT; ix++) {
    ei_printf("    %s: %.5f", result.classification[ix].label, result.classification[ix].value);
          
 }

Some of the label and value are not availble so I accidentally access to NULL pointer. I add if (result.classification[ix].value != NULL) to check and it work fine

1 Like

Hi @HuyYuh,

Great catch! I should have fully read the error message that stated “unhandled exception,” which would point to something like an out-of-bounds or non-existent part of memory.