Skip to content

Sending large messages crashes ESP32 #89

Open
@BenBergman

Description

@BenBergman

Describe the bug
I am attempting to send high resolution JPEG images captured from an OV2640 camera over websockets. I am able to send VGA (640x480) images no problem, but if I try to scale up to UXGA (1600x1200) the ESP32 spits out a backtrace and reboots.

I think what might be happening is a copy of the data is being made in memory instead of streaming from the existing location. I have been able to take UXGA images and send them via AsyncWebServer (though in that case I had saved them to SPIFFS).

To Reproduce
Library version: 0.4.18
Board: ESP32-CAM
Send a UXGA frame buffer as a binary websocket message and you will see the app crashes and the ESP32 reboots.

Expected behavior
The full frame buffer should be transmitted without crashing the application.

Code
My project is based on https://github.com/0015/IdeasNProjects/tree/master/ESP32_CAM_LocalServer/CameraWeb
Changing line 55 form FRAMESIZE_VGA to FRAMESIZE_UXGA should cause the application to crash, but leaving it as VGA will transmit the full message just fine.

Additional context
One other variation is my setup is using the ESP as the websocket server instead of the client, but I don't think that should have any baring on this issue.

Metadata

Metadata

Assignees

Labels

good first issueGood for newcomershelp wantedExtra attention is neededpossible-bugSomething isn't working, and I think it is a bug

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions