Skip to content

Potential Stack overflow in sketch.js #2

@AbhyudayaSharma

Description

@AbhyudayaSharma

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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions