Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid state transition from COMPLETED to AWAIT_CONFIRMATION #57

Open
JoelBender opened this issue Sep 2, 2024 · 1 comment
Open

Comments

@JoelBender
Copy link
Owner

Every once in a while this exception is raised. Upon investigation, indication() is being called from await_confirmation_timeout() here as if the request is coming from the application but that's not actually true. The state is COMPLETED, so that means that the response was received but the timeout task wasn't canceled. The Task object that returned by ensure_future() should be canceled, or better associated with the _timer_handle().

@ChristianTremblay

@ChristianTremblay
Copy link
Collaborator

ChristianTremblay commented Sep 7, 2024

Task exception was never retrieved
future: <Task finished name='Task-38353' coro=<ClientSSM.await_confirmation_timeout() done, defined at /home/ctremblay/.local/lib/python3.10/site-packages/bacpypes3/appservice.py:836> exception=RuntimeError('invalid state transition from COMPLETED to AWAIT_CONFIRMATION')>
Traceback (most recent call last):
  File "/home/ctremblay/.local/lib/python3.10/site-packages/bacpypes3/appservice.py", line 852, in await_confirmation_timeout
    await self.indication(self.segmentAPDU)
  File "/home/ctremblay/.local/lib/python3.10/site-packages/bacpypes3/appservice.py", line 536, in indication
    self.set_state(AWAIT_CONFIRMATION, self.apduTimeout)
  File "/home/ctremblay/.local/lib/python3.10/site-packages/bacpypes3/appservice.py", line 404, in set_state
    SSM.set_state(self, newState, timer)
  File "/home/ctremblay/.local/lib/python3.10/site-packages/bacpypes3/appservice.py", line 216, in set_state
    raise err
RuntimeError: invalid state transition from COMPLETED to AWAIT_CONFIRMATION

that was on Gitter but it's probably better to put that here as reference

This is running on a Raspberry Pi, Ubuntu 64bit

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

No branches or pull requests

2 participants