Skip to content

cec.init freezes when fails, suggested fix #61

Open

Description

@robbiepy

The CEC adapter can only be open by one caller at any one time.

If init() is called when the adapter is already open, the current code is meant to destroy the adapter resource and then raise an exception. However, I found that the code freezes when it attempts to destroy the adapter.

CECDestroy(CEC_adapter);
CEC_adapter = NULL;

I found the following code fixed it for me:

Py_BEGIN_ALLOW_THREADS
CECDestroy(CEC_adapter);
CEC_adapter = NULL;
Py_END_ALLOW_THREADS

Activity

  1. trainman419 commented on Feb 18, 2022

    @trainman419
    Owner

    Ok; I've pushed an updated version to help with this: 227c69b

    Please give that a try and let me know if it helps.

  2. robbiepy commented on Feb 21, 2022

    @robbiepy
    Author

    Ok; I've pushed an updated version to help with this: 227c69b

    Please give that a try and let me know if it helps.

    Yes that fixes it. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions