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

calls from other threads fallback for _winrt.py #67

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

x-0D
Copy link

@x-0D x-0D commented Nov 17, 2024

partially closes #65 , possibly causes ValueError: NULL COM pointer access when doing UI changes from other thread
(or my testing code just bad, IDK)

  File "[MASKED]\main.py", line 591, in __init__
    self._obj.Text = "img"
    ^^^^^^^^^^^^^^
  File "[MASKED]\.venv\Lib\site-packages\win32more\_winrt.py", line 695, in __call__
    interface_instance = instance.as_(hints["self"])
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "[MASKED]\.venv\Lib\site-packages\win32more\_winrt.py", line 147, in ComPtr_as
    hr = self.QueryInterface(pointer(iid), pointer(instance))
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "[MASKED]\.venv\Lib\site-packages\win32more\__init__.py", line 458, in __call__
    return self._delegate(this, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "[MASKED]\.venv\Lib\site-packages\win32more\__init__.py", line 476, in __call__
    result = self._delegate(this, *cargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: NULL COM pointer access

@x-0D x-0D changed the title threadsafe calls fallback for _winrt.py calls from other threads fallback for _winrt.py Nov 19, 2024
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

Successfully merging this pull request may close these issues.

[Feature Request] add ability to work in multithreaded apps.
1 participant