-
Notifications
You must be signed in to change notification settings - Fork 8
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
is_border_required = False
hard crashes
#13
Comments
GraphicsCaptureSessionis_border_required = False
hard crashesis_border_required = False
hard crashes
Update: It does all work on a Windows 11 machine (I didn't even need to call Still I think that raising a proper error in Python will be preferable over letting the whole thing hard crash |
So the crash only happens on older versions of Windows? Which version specifically? |
Version 10.0.19044 Build 19044 (latest Windows 10) For now I've resorted to checking the version using |
The generated code can include APIs for any version of windows but be run on older versions of windows. This causes crashes when trying to call these apis from older versions of windows. We can avoid the crash by doing a runtime check to see if a property/ event/method actually exists before attempting to call it. Issue: pywinrt/python-winsdk#13
This should be fixed in v1.0.0b7. |
This is the error from the Event Viewer:
Minimal repro:
Microsoft's docs does mentions needing to call the following firstGraphicsCaptureAccess.request_access_async(GraphicsCaptureAccessKind.BORDERLESS)
: https://docs.microsoft.com/en-us/uwp/api/windows.graphics.capture.graphicscapturesession.isborderrequired#remarksIf possible, I would ask for python-winsdk to raise an appropriate exception rather than letting the entire application crash silently.
Sidenote,GraphicsCaptureAccess.request_access_async
also throwsOSError: [WinError -2147221164] Class not registered
, but this may or may not be due to the lack of an application manifest declaring thegraphicsCaptureWithoutBorder
. Or because it's Win11 only. I'll need to try both. The former I can do when I bundle my app with PyInstaller.Edit: see coment
The text was updated successfully, but these errors were encountered: