Browse Source
A handler was registered in the basicEventHandler constructor (before the derived members existed) and removed in its destructor (after they were destroyed): the event heap could call dispatchEvent() on a half- built or half-destroyed node or module when one was created or deleted while la_mojo runs (node / module reload). - Camera nodes (deviceNodePTZCamControl, deviceNodePresetCamControl, deviceNodeStaticCamControl): basicEventHandler(false), attachEvents() at the end of both constructors, detachEvents() first thing in the destructor. - Kernel modules: kernelModule no longer registers in its constructor; kernelModuleFactory attaches a module right after creating it (all modules are created there), before startService(). Every module destructor (USB relay, Kafka, FlyHunter, SSDP, ONVIF observer, embed video (both variants), modem manager, Bosch, attention cloud, report backupper) calls detachEvents() first. - basicEventHeap::moveHandlerTop/Bottom no longer register a handler that is not registered (would have registered an object twice once attachEvents() runs). Sensor nodes are not event handlers and are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16pull/20/head
16 changed files with 48 additions and 13 deletions
Loading…
Reference in new issue