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

UwcIsWindowsGraphicsCaptureCursorCaptureEnabledApiSupported crash #26

Open
Curtis-VL opened this issue May 1, 2021 · 9 comments
Open
Assignees
Labels

Comments

@Curtis-VL
Copy link

Curtis-VL commented May 1, 2021

Hi Hecomi,

Loving the new update, Windows.Graphics.Capture is great!

Though I have found a crash:
0x00007FFF29546122 (uWindowCapture) UwcIsWindowsGraphicsCaptureCursorCaptureEnabledApiSupported ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFF29539287) 0x00007FFF29539287 (uWindowCapture) (function-name not available) 0x00007FFF2953D8F7 (uWindowCapture) UwcIsWindowsGraphicsCaptureCursorCaptureEnabledApiSupported 0x00007FFF2953DC17 (uWindowCapture) UwcIsWindowsGraphicsCaptureCursorCaptureEnabledApiSupported 0x00007FFF29570210 (uWindowCapture) UwcIsWindowsGraphicsCaptureCursorCaptureEnabledApiSupported 0x00007FFF479053FE (KERNEL32) BaseThreadInitThunk 0x00007FFF496A590B (ntdll) RtlUserThreadStart

This same system also returned 'Unsupported' for all displays by uDesktopDuplication, so I assume all their displays are off their main GPU.

They are on Windows 10 version 2004 or later, Windows.Graphics.Capture is supported by the OS version at least.

@hecomi
Copy link
Owner

hecomi commented May 3, 2021

Hi Curtis, thank you for the information!
I happen to have one laptop PC without a discrete GPU that I can use for the investigation, so I'll try it out on that.

@hecomi hecomi self-assigned this May 3, 2021
@hecomi hecomi added the bug label May 3, 2021
@Curtis-VL
Copy link
Author

Hi Hecomi,

That's great, let me know if you need any further information or would like me to test with the user who found the issue!

@hecomi
Copy link
Owner

hecomi commented May 3, 2021

I was unable to reproduce this crash on my laptops (1909 / 1903)...
However, I am guessing that GraphicsCaptureSession::IsSupported() might be the cause of this crash, so could you try this .unitypackage with this code modified?
uWindowCapture-v1.0.2.temp.zip

@Curtis-VL
Copy link
Author

I will try this now, thanks!

@Curtis-VL
Copy link
Author

That seems to have fixed the crash this user was experiencing, thank you!

@Curtis-VL
Copy link
Author

Curtis-VL commented May 4, 2021

Hi Hecomi,

That same user just reported another crash that seems to be related to the same method, though it could just be a coincidence.
Stack trace is as follows:

Fallback handler could not load library D:/Steam/steamapps/common/OVR Toolkit/OVR Toolkit_Data/Mono/libc

  ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFC693AF2F2)
0x00007FFC693AF2F2 (d3d11) (function-name not available)

  ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFC693AA62F)
0x00007FFC693AA62F (d3d11) (function-name not available)

Fallback handler could not load library D:/Steam/steamapps/common/OVR Toolkit/OVR Toolkit_Data/Mono/libc.dll

Fallback handler could not load library D:/Steam/steamapps/common/OVR Toolkit/OVR Toolkit_Data/Mono/libc

0x00007FFBFCC067C1 (uWindowCapture) UwcIsWindowsGraphicsCaptureCursorCaptureEnabledApiSupported
  ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFBFCBF97C3)

0x00007FFBFCBF97C3 (uWindowCapture) (function-name not available)

0x00007FFBFCBFDF77 (uWindowCapture) UwcIsWindowsGraphicsCaptureCursorCaptureEnabledApiSupported

0x00007FFBFCBFE297 (uWindowCapture) UwcIsWindowsGraphicsCaptureCursorCaptureEnabledApiSupported

0x00007FFBFCC30F50 (uWindowCapture) UwcIsWindowsGraphicsCaptureCursorCaptureEnabledApiSupported

Fallback handler could not load library D:/Steam/steamapps/common/OVR Toolkit/OVR Toolkit_Data/Mono/libc

Fallback handler could not load library D:/Steam/steamapps/common/OVR Toolkit/OVR Toolkit_Data/Mono/libc.dll
0x00007FFC6DA453FE (KERNEL32) BaseThreadInitThunk

Fallback handler could not load library D:/Steam/steamapps/common/OVR Toolkit/OVR Toolkit_Data/Mono/libc
0x00007FFC6E52590B (ntdll) RtlUserThreadStart

So far I have not heard of this crash from other users, however, there aren't many in my testing team who have no monitors on the main GPU. They did report that with the crash fix (v1.0.2-temp) Windows.Graphics.Capture is working as intended, the yellow borders show around windows to confirm this.

This appears to have happened upon activating the window GameObject.

@hecomi
Copy link
Owner

hecomi commented May 8, 2021

Could you please try again with v1.0.2?

@Curtis-VL
Copy link
Author

I am having the user try the new build, I will let you know in a few days!

@thomasLopvetVR
Copy link

thomasLopvetVR commented Apr 17, 2023

Hello,
This error is still occuring on v1.1.2 and latest commit.
windows 10 version 21H2, Unity 2021.2.6
To reproduce it :

  • pull the latest commit and go to the window list scene
  • have a minimum of 10 application window opened (the more there are, the more frequently the bug will occur)
  • Hit play and activate / deactivate the windows streaming for some of them a little.
  • after 15-20 seconds, stop the scene and repeat last step until Unity crashes.

It seem that by disabling the cursor, getting the errors of the dll on unity log, capping the streaming at 20fps and using the PrintWindow method for streaming , there is less crashes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants