ESP32-CAM-Video-Recorder-junior icon indicating copy to clipboard operation
ESP32-CAM-Video-Recorder-junior copied to clipboard

guru meditation error when streaming

Open aminty opened this issue 2 years ago • 9 comments

Hi mr James. I hope you’re doing well.

around 3 week , i'm confusing about a problem. in your source code(recorder junior v58) with easy install and with arduino IDE after uploading, when i'm trying to streaming , esp will rebooted. and in serial monitor this line appear: (guru meditation error: core 0 panic'ed (loadprohibited). exception was unhandled.)

But except for this option, all other option work well

aminty avatar Oct 05 '22 10:10 aminty

Getting the exact same error here. I can access the camera's file manager, so it shouldn't be a connection issue, but, when I hit up the /stream, the camera will "panic" and reboot (as mentioned above)

Roobyx avatar Jun 15 '23 18:06 Roobyx

Could you cut and paste the serial monitor with the series of messages, and the stack of numbers from the "panic" to help me locate the problem. And the version number, and version number of compiler. libraries if you re-compiled the program.

jameszah avatar Jun 16 '23 08:06 jameszah

Getting the same error repeatedly. V58: https://pastebin.com/MjLBhQNv (only happens when trying to stream or snapshot, records fine to sd) v60: https://pastebin.com/ErqZVwCb (happens immidiately)

AI-tinker esp32-cam board.

Both installed from one-click installer, and severeal different sd-cards tried

CasperJohansen avatar Jul 06 '23 14:07 CasperJohansen

Your module only has 2GB of spi-ram. The code is built for 4GB in most esp32-cam modules.

You could squeeze the memory a little here ... to repeatedly malloc and free the memory as needed ... I wish I would have spent an extra 20 minutes on that 2 years ago.

https://github.com/jameszah/ESP32-CAM-Video-Recorder-junior/blob/976b276c28f2d28ec8ba44c9c43fa663b712f1c0/v60/ESP32-CAM-Video-Recorder-junior-60x.4.7/ESP32-CAM-Video-Recorder-junior-60x.4.7.ino#L2482

....

image

Make that MB!

jameszah avatar Jul 06 '23 16:07 jameszah

what size of framebuffer should be in 2GB memory?

duchengyao avatar Sep 16 '23 13:09 duchengyao

I seem to be having the same problem. Is there a fix yet?

Mostakim52 avatar Jan 22 '24 16:01 Mostakim52

The program is built for a standard esp32-cam module with 4mb of psram.

jameszah avatar Jan 23 '24 06:01 jameszah

what size of framebuffer should be in 2GB memory?

I tested with (512*192) like this:

framebuffer = (uint8_t*)ps_malloc(512 * 192);
framebuffer2 = (uint8_t*)ps_malloc(512 * 192);
framebuffer3 = (uint8_t*)ps_malloc(512 * 192);

And it seems to work (more or less) fine, and even the streaming and image series work correctly with OV2640 camera. For the 1600x1200 mode (maximum possible for this camera), and the quality level of 12 (set by the software automatically), the statistics shows the average frame size of about 71 kB. Meanwhile (512*192) is almost 100 kB (I guess, this is what the framebuffer is intended for), so there is some extra space just in case.

This may not be reliable, but at least it allows to get some videos from the 2MB ESP32-CAM's. I hope this information will be useful for other people too.

v2e avatar Jun 17 '24 22:06 v2e

You are right - some old code there - it is set up for the all frame sizes in bright color.

512kb is overly conservative - 128kb should handle most cases.

jameszah avatar Jun 18 '24 01:06 jameszah