Skip to content

grok fixes to avoid having a null config object on services. - #1447

Merged
kwatters merged 3 commits into
developfrom
cv_null_config_fix
Oct 28, 2026
Merged

kwatters merged 3 commits into
developfrom
cv_null_config_fix

Conversation

@kwatters

Copy link
Copy Markdown
Contributor

this addresses the null config exception that was seen in 1.1.1615. Grok's assessment here:

`The InMoov2 panel calls i01.getPeerConfig("opencv") as soon as it opens. That reached OpenCV.getConfig() while config was still null, and the assignment config.capturing = capturing threw.

config starts null and is only set in apply(). The service is registered in the constructor, before apply() runs, and getPeerConfig treated “registered” as “has a config” and called getConfig() on it. A failed or missing apply() — including apply(null) — left that field null.

What changed:

Each service now gets a blank typed config before it is registered. apply() replaces that with the saved config and is what marks the config as ready.
getPeerConfig uses the live service only after apply() has succeeded. Otherwise it reads i01.opencv.yml, then the OpenCV default. If the peer is already running without an applied config, that saved config is applied onto it.
OpenCV.getConfig() returns null when config is null, and apply(null) no longer clears an existing config. The same null guard is on servo and speech getConfig(), which write fields the same way.
OpenCVConfigNullTest and ConfigTest both passed.`

@kwatters
kwatters merged commit cefccd0 into develop Oct 28, 2026
1 check passed
@kwatters
kwatters deleted the cv_null_config_fix branch October 28, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant