-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposed fix to crashing of the CameraWebServer example #5128
Comments
Oh and I've only needed to copy pasted the still taking part. This bug also occurs in the streaming part. |
I can also confirm that this fixes the Heap Crashes on CameraWebServer example, Project |
You are 'fixing' it by disabling face detection entirely. Possibly a valid approach, depending on whether you want face detection ;-) I was hoping that But no joy, I think the corruption lies deeper in the ESP libs. I also added debug to my example so it dumped the heap and free space after every frame, and I do not see any signs of memory leaks.The error happens out of the blue. This is repeatable, it happens every time face detection is on and a face is detected in frame. |
I'm afraid I didn't explain myself with clarity in mind. I've only removed the calls to free(), rectangles would still be drawn around faces when I've tested it. Could you please check if just deleting the free()'s results in memory leaks? I suspect there's nothing being allocated that should need freeing, but I'm not certain. |
Light dawns; I'll try that properly again. I did briefly try commenting the free()s out earlier today, but was being a bit chaotic so I'll do it more systematically this time. Edit: Yes, Looking good so far. Boxes drawn and no errors. I realise I only commented the |
@Funky118 @easytarget -- I was just suffering from this as well, and did some research. This blog post [1] uses
[1] https://techtutorialsx.com/2020/06/13/esp32-camera-face-detection/ |
I've been having issues with getting Face Detection working as well. I just tried @andrewfhart's suggestion of replacing the call to So to clarify, in both the above mentioned functions the code was:
and this has now been changed to the following to get it working.
|
Hardware:
Board: AI Thinker ESP32-CAM
Core Installation version: 1.0.6
IDE name: Arduino IDE, Platform.io
Flash Frequency: 80Mhz
PSRAM enabled: yes
Upload Speed: 115200
Computer OS: Windows 10
Description:
I've encountered this old bug when borrowing some of the code from the CameraWebServer example in Arduino IDE.
So I'd gone through the code and found this section under app_httpd.cpp:
`
`
Since the person who wrote it was trying to free a pointer from, presumably, the stack, I suspect this is what's causing occasional crashes for some users. And indeed, when removed, the code runs smoothly.
Could someone please look into it? This is my first issue ever and I don't currently have the time to google how to submit a bug fix.
Thanks.
The text was updated successfully, but these errors were encountered: