esphome / esphome/backlog

Fix mWW crashing when trying to load incompatible model

Open
#54 0 comments 0 reactions 1 assignee Claimed by @kahrendt View on GitHub
bug
Dominant language
No language data
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

When trying to add an incompatible model (like an openWakeWord one), the device crashes instead of handling it gracefully. Jesse traced the crash to here:
```
if (this->interpreter_->AllocateTensors() != kTfLiteOk) {
ESP_LOGE(TAG, "Failed to allocate tensors for the streaming model");
return false;
}
```
With the analysis"I think here you also need to deallocate this->interpreter_ as it is trying to call this->interpreter_.reset(); un unload_model which in turn is calling the destructors and things are going bad from there as they were never set up correctly in the first place"

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.