CiscoDevNet/Object-detection-via-Meraki-Camera

Potential Stack overflow in sketch.js

Opened this issue · 0 comments

Hi,

I see a potential stack overflow in sketch.js:

async function load_image() {
current_image = await fetch_meraki_live_snapshort();
status.html("Image loaded");
objects = await yolo.detect(current_image);
console.table(objects);
status.html("Image detected");
// Continuously detecting
await load_image()
}

The function calls itself indefinitely and will result in a stack overflow if left running for some time. I think that it would be better to replace it with a setInterval()