user76999: I was trying to make esp32 face recognition using the esp32 camera web server example in arduino ,
and everything works fine untill i press on face detection the frame is frozen , module restarted and put this error to serial monitor :

CORRUPT HEAP: Bad head at 0x3ffe2eb4. Expected 0xabba1234 got 0x00000008
abort() was called at PC 0x4008a64d on core 1

ELF file SHA256: 0000000000000000

Backtrace: 0x4008df7c:0x3ffe1c30 0x4008e1f5:0x3ffe1c50 0x4008a64d:0x3ffe1c70         
0x4008a779:0x3ffe1ca0 0x400f97cb:0x3ffe1cc0 0x400f5a61:0x3ffe1f80 0x400f59f0:0x3ffe1fd0     
0x40093545:0x3ffe2000 0x40082976:0x3ffe2020 0x4008a545:0x3ffe2040 0x4000bec7:0x3ffe2060     
0x400d1bc9:0x3ffe2080 0x401194f5:0x3ffe2230 0x40119bfd:0x3ffe2260 0x40119cb5:0x3ffe22f0 
0x4011a088:0x3ffe2310 0x40118774:0x3ffe2330 0x401187cb:0x3ffe2370 0x4008fe86:0x3ffe2390

Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:10944
load:0x40080400,len:6388
entry 0x400806b4

 

I tried erasing flash bt it made the same error again
I am using Arduino IDE 1.8.12 , esp32-cam
operating at 5 volts from the programmer (also tried other external power supplies)
and these are the pictures of settings : (also used wrover kit in programming settings with huge app >3mb)
Chip name

ESP32 Cam

FTDI Programmer

AI THINKER

Settings

I want to make a face recognition door lock , if this doesn't work could anyone refer me to how can I get facial recognition on esp32 cam with any other way?

user80551: Rollback your ESP32 board driver to 1.04. works for me ;-)

user72826: I don't have enough reputation to be able to add a comment, but using the answer from Andrew Hart I was able to resolve this.  For completeness of this thread in case the linked solution ever disappears:
Locate these sections from the app_httpd.cpp:
if (net_boxes){
    detected = true;
    if(recognition_enabled){
        face_id = run_face_recognition(image_matrix, net_boxes);
    }
    draw_face_boxes(image_matrix, net_boxes, face_id);
    free(net_boxes->score);
    free(net_boxes->box);
    free(net_boxes->landmark);
    free(net_boxes);

and
fr_recognize = esp_timer_get_time();
draw_face_boxes(image_matrix, net_boxes, face_id);
free(net_boxes->score);
free(net_boxes->box);
free(net_boxes->landmark);
free(net_boxes);

replace the 4 free's in each block with dl_lib_free.

76999: <p>I was trying to make esp32 face recognition using the esp32 camera web server example in arduino ,
and everything works fine untill i press on face detection the frame is frozen , module restarted and put this error to serial monitor :</p>
<pre><code>
CORRUPT HEAP: Bad head at 0x3ffe2eb4. Expected 0xabba1234 got 0x00000008
abort() was called at PC 0x4008a64d on core 1

ELF file SHA256: 0000000000000000

Backtrace: 0x4008df7c:0x3ffe1c30 0x4008e1f5:0x3ffe1c50 0x4008a64d:0x3ffe1c70         
0x4008a779:0x3ffe1ca0 0x400f97cb:0x3ffe1cc0 0x400f5a61:0x3ffe1f80 0x400f59f0:0x3ffe1fd0     
0x40093545:0x3ffe2000 0x40082976:0x3ffe2020 0x4008a545:0x3ffe2040 0x4000bec7:0x3ffe2060     
0x400d1bc9:0x3ffe2080 0x401194f5:0x3ffe2230 0x40119bfd:0x3ffe2260 0x40119cb5:0x3ffe22f0 
0x4011a088:0x3ffe2310 0x40118774:0x3ffe2330 0x401187cb:0x3ffe2370 0x4008fe86:0x3ffe2390

Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:10944
load:0x40080400,len:6388
entry 0x400806b4

 
</code></pre>
<p>I tried erasing flash bt it made the same error again
I am using Arduino IDE 1.8.12 , esp32-cam
operating at 5 volts from the programmer (also tried other external power supplies)
and these are the pictures of settings : (also used wrover kit in programming settings with huge app &gt;3mb)</p>
<p><a href="https://i.stack.imgur.com/uJ79S.jpg" rel="nofollow noreferrer">Chip name</a>
<a href="https://i.stack.imgur.com/uJ79S.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uJ79S.jpg" alt="enter image description here" /></a>
<a href="https://i.stack.imgur.com/CJW2q.jpg" rel="nofollow noreferrer">ESP32 Cam</a>
<a href="https://i.stack.imgur.com/CJW2q.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CJW2q.jpg" alt="enter image description here" /></a>
<a href="https://i.stack.imgur.com/NA28L.jpg" rel="nofollow noreferrer">FTDI Programmer</a>
<a href="https://i.stack.imgur.com/NA28L.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NA28L.jpg" alt="enter image description here" /></a>
<a href="https://i.stack.imgur.com/ybbFg.jpg" rel="nofollow noreferrer">AI THINKER</a>
<a href="https://i.stack.imgur.com/ybbFg.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ybbFg.jpg" alt="enter image description here" /></a>
<a href="https://i.stack.imgur.com/Re66W.jpg" rel="nofollow noreferrer">Settings</a>
<a href="https://i.stack.imgur.com/Re66W.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Re66W.jpg" alt="enter image description here" /></a></p>
<p>I want to make a face recognition door lock , if this doesn't work could anyone refer me to how can I get facial recognition on esp32 cam with any other way?</p>
 80551: <p>Rollback your ESP32 board driver to 1.04. works for me ;-)</p>
 72826: <p>I don't have enough reputation to be able to add a comment, but using the answer from <a href="https://arduino.stackexchange.com/users/77396/andrew-hart">Andrew Hart</a> I was able to resolve this.  For completeness of this thread in case the <a href="https://github.com/espressif/arduino-esp32/issues/5128#issuecomment-851785970" rel="nofollow noreferrer">linked</a> solution ever disappears:</p>
<p>Locate these sections from the app_httpd.cpp:</p>
<pre><code>if (net_boxes){
    detected = true;
    if(recognition_enabled){
        face_id = run_face_recognition(image_matrix, net_boxes);
    }
    draw_face_boxes(image_matrix, net_boxes, face_id);
    free(net_boxes-&gt;score);
    free(net_boxes-&gt;box);
    free(net_boxes-&gt;landmark);
    free(net_boxes);
</code></pre>
<p>and</p>
<pre><code>fr_recognize = esp_timer_get_time();
draw_face_boxes(image_matrix, net_boxes, face_id);
free(net_boxes-&gt;score);
free(net_boxes-&gt;box);
free(net_boxes-&gt;landmark);
free(net_boxes);
</code></pre>
<p>replace the 4 <code>free</code>'s in each block with <code>dl_lib_free</code>.</p>
