Python plugin: updating a device, Domoticz crashes
Posted: Monday 29 May 2023 15:41
Hi,
Since many months when my python plugin (using the legacy framework) try to update a device, often it crashes Domoticz.
For example, having an incremental counter (used as a rain meter), if the python plugin run
I get the following errors:
With other device types I fixed by removing bad options items that were not suitable for that kind of devices (for example, if I have a incremental counter port that want to convert to a digital input port, I have to remove the options relative to the incremental counter device).
In the past, 1 year ago, there was not any trouble even specifing a bad options, Domoticz never crashed.
Hoping that @Dnpwwo or someone else help me finding the best way to avoid crashes.
Thanks a lot.
Paolo
Since many months when my python plugin (using the legacy framework) try to update a device, often it crashes Domoticz.
For example, having an incremental counter (used as a rain meter), if the python plugin run
Code: Select all
Devices[Unit].Update(TypeName='Counter Incremental', nValue=0, sValue='276421', Description='ID=ff37.2,IN_COUNTER,', Options={'ValueQuantity': 'Pluviometro', 'ValueUnits': 'mm'})
Code: Select all
2023-05-29 15:05:35.101 Error: GetJSonDevices: exception occurred : 'stoll'
2023-05-29 15:05:35.104 Error: Domoticz(pid:17760, tid:17793('EventSystemQueu')) received fatal signal 6 (Aborted)
2023-05-29 15:05:35.104 Error: siginfo address=0x4560, address=(nil)
2023-05-29 15:05:35.115 Error: GetJSonDevices: exception occurred : 'stoll'
2023-05-29 15:05:38.367 Error: Did not find stack frame for thread (LWP 17793)), printing full gdb output:
In the past, 1 year ago, there was not any trouble even specifing a bad options, Domoticz never crashed.
Hoping that @Dnpwwo or someone else help me finding the best way to avoid crashes.
Thanks a lot.
Paolo