You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(issue was observed with sdc11073 v1 but is also relevant for v2)
When accesing a multikey, at the same time as it is updated, an IndexError may occure.
File "....", line 349, in _check_alarm_activation_state
alert_state = self.mdib.states.descriptorHandle.getOne(alert_condition, allowNone=True)
File "...\lib\site-packages\sdc11073\multikey.py", line 52, in getOne
return result[0]
IndexError: list index out of range
in multikey.py
if a state update is triggered class MultiKeyLookup -> updateObject() is called and following code is executed:
with self._lock:
self._rmIndices(obj)
self._mkIndices(obj)
if getOne or get is called between self._rmIndices(obj) and self._mkIndices(obj) the IndexError may occure.
The instance of self._lock should be also used in getOne or get
Expected Behavior
Minimal Reproducible Example
No response
Solution proposal
No response
Python Version
3.10.11
Operating system
win32
Sdc11073 Version
1.3.0
Link to sdc11073 Logs
No response
Further Information
No response
Participation
I am willing to submit a pull request to fix this bug.
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Current Behavior
(issue was observed with sdc11073 v1 but is also relevant for v2)
When accesing a multikey, at the same time as it is updated, an IndexError may occure.
File "....", line 349, in _check_alarm_activation_state
alert_state = self.mdib.states.descriptorHandle.getOne(alert_condition, allowNone=True)
File "...\lib\site-packages\sdc11073\multikey.py", line 52, in getOne
return result[0]
IndexError: list index out of range
in multikey.py
if a state update is triggered
class MultiKeyLookup
->updateObject()
is called and following code is executed:if
getOne
orget
is called betweenself._rmIndices(obj)
andself._mkIndices(obj)
the IndexError may occure.The instance of self._lock should be also used in
getOne
orget
Expected Behavior
Minimal Reproducible Example
No response
Solution proposal
No response
Python Version
3.10.11
Operating system
win32
Sdc11073 Version
1.3.0
Link to sdc11073 Logs
No response
Further Information
No response
Participation
The text was updated successfully, but these errors were encountered: