-
Notifications
You must be signed in to change notification settings - Fork 82
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
UwcGetScreenHeight (and Width) build crash #21
Comments
Hi, I have the same issu. Don't exactly know why for now. Did you find something interesting to solve it ? Thanks a lot for this plugin ! |
To keep this thread alive, I'll update with newer log outputs: Player.log: 2 error.log files attached with more in-depth information on the crash. The issue only happens on first initalizing uWindowCapture, sometimes the windows will show as a white box in Unity before the application closes. After uWindowCapture has started capturing once, the issue does not happen again to my knowledge. |
Hi @hecomi, I've been discussing this crash with someone who experiences it frequently. I use both uWindowCapture and uDesktopDuplication, they told me one of their window captures were visible and updating, but, upon showing a desktop duplication capture the program crashed with the above error. Looking through the error.log files from above, I see this section showing a uDD error, though the stack trace shows uWC as what crashed in the end with an access violation error: ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFF0C3994CD) Is it possible there's a conflict when initalizing uDD and uWC at the same time? Or in some specific order? |
Their error.log is attached, though I believe it's the same as one of the ones above. |
Hey Kitaps, Are you using uDesktopDuplication as well as uWindowCapture? I was starting to suspect there was some issue when using both at the same time, though the issues are so infrequent that it's really hard to diagnose the issue. In my project at least, it seems this crash only happens on first attempts to capture a window. A system restart, or, several restarts of the application eventually resolves it. It's very strange! Upload the error.log crash report here if possible. :) |
Hi @hecomi, I've done some further debugging and completely removed 'UwcGetScreenHeight' from the plugin and from everything in Unity, replacing it with a PInvoke. The crash still persists, this time moving to 'UwcGetScreenY' as the cause. Going to change everything using 'GetSystemMetrics' to PInvoke in C#, will get back to you on how that goes! |
Thank you for your investigation! It seems that the internal call to |
I'll let you know if that crash is resolved, as it doesn't happen frequently (Usually only once per system startup) it's hard to determine if it was fixed or not so I'm waiting for some of my beta testers to report it again. :) If this solves the issue, I will look into creating a PR of my changes! |
@hecomi I had the crash again unfortunately! But, this time it points to something that may make more sense. Stack trace is as follows: Error.log: |
Hey @Curtis-VL, sorry for coming back to you so late. I just saw this. I'm the replacement from a guy who was working on this project before me, so I don't know everything, but I'll try to give you as much info as I can: uDesktopDuplication is in the project but it seems to not be used. Also my issue only happens rarely (3 out of 10 times when running the Build version) and this only happens when I am connected to three screens (two 4K and one HD Screens). I hope this info can be usefull to you. (To hecomi: In case you red this, your projects are awesome. Super cool) |
I'm unsure of the specific cause, but in some cases when capturing a window using PrintWindow the following crash occurs using Unity 2019.3.0b7:
Read from location 0000000000000000 caused an access violation.
Stack Trace of Crashed Thread 1732:
0x00007FFD5C2F5372 (uWindowCapture) UwcGetScreenHeight
0x00007FFD5C2EBB2E (uWindowCapture) UwcUpdate
0x00007FFD5C2EFDAB (uWindowCapture) UwcGetScreenHeight
0x00007FFD5C2F00A7 (uWindowCapture) UwcGetScreenHeight
0x00007FFD5C31D3D8 (uWindowCapture) UwcGetScreenHeight
0x00007FFD72037BD4 (KERNEL32) BaseThreadInitThunk
0x00007FFD739ACED1 (ntdll) RtlUserThreadStart
Crash file can be found here:
https://pastebin.com/raw/YCfxs8ij
The text was updated successfully, but these errors were encountered: