elvissteinjr / DesktopPlus

Advanced desktop access for OpenVR
GNU General Public License v3.0
467 stars 29 forks source link

Random Aplication Crashes [Latest Beta + Browser + NewUI] #51

Closed jonylentzmc closed 1 year ago

jonylentzmc commented 1 year ago

Hello, I'm experiencing random crashes while using desktop + in VRC I don't get any errors but the overlay randomly closes while playing, happens multiple times in a session requiring manual restart

I'm currently using the beta version because one of my overlays rely on homeassistant page (hence the need for the browser integration) to turn on the AC

Most logs are normal but some show this error:

2023-04-29 01:24:31.804 OutputManager.cpp:2833 INFO| } 2023-04-29 01:24:41.385 OutputManager.cpp:1951 ERR| Unexpected error occurred in a Graphics Capture thread! (0x80070057) 2023-04-29 01:30:37.249 ConfigManager.cpp:1114 INFO| Loading overlay profile "../config_newui.ini"... 2023-04-29 01:30:41.103 OutputManager.cpp:1951 ERR| Unexpected error occurred in a Graphics Capture thread! (0x800706be) 2023-04-29 01:30:54.158 AppProfiles.cpp:204 INFO| Activating app profile "steam.app.438100"...

I've tried to run the app as administrator but same errors happen I'm using the Nvidia Driver 531.61

elvissteinjr commented 1 year ago

Just to clarify, does the entire Desktop+ application crash or do overlays disappear/stop updating? The former of course leads to the latter. To be honest, a full log of at least one session would've been helpful. That way I can skip the usual questions about the system/HMD used and maybe spot something that doesn't look like an error but is still odd.

You mention browser overlays, but the errors in the logs so far are about Graphics Capture. Can you share what you're capturing here? If it's some window behaving oddly it might help if I can reproduce this on my end. Caught Graphics Capture errors would usually not take down the entire application at least. The error codes seem to be ERROR_INVALID_PARAMETER & RPC_S_CALL_FAILED respectively, but that's not much to draw conclusions on just by itself.

Browser overlays run in their own process so even if those crash they wouldn't take down the main process (still needs at least a profile load to recover though).

Have you used the previous build before? If so, did it work any better? The changes to Graphics Capture were minimal, but still worth investigating.

jonylentzmc commented 1 year ago

Thank you for the reply, I've been using desktop+ for a while and it was working completly fine until a couple of days ago, It seems like the entire desktop+ process crashes, I've changed the desktop capture method from graphics capture to desktop duplication and now I don't get any errors in the logs but my overlay keeps randomly disappearing

What I'm capturing:

Here are my latest logs: UI - LOG: https://pastebin.com/NLiLHwmC Desktop+ LOG: https://pastebin.com/8eHQKPH2

If I change it back to graphics capture I often get a black screen but no errors in the log file I tried to not open any app, just enter steam VR home and use the overlay for a bit to see if it could be something related to vrc but no, the desktop+ crashed the same way (verified all the files using steam as well - no errors)

elvissteinjr commented 1 year ago

I've confirmed an issue with desktops having negative coordinates with another user on Steam forums. The new detection for translucent pixels in the desktop texture doesn't handle them properly, my bad. Though on both his and my system it just stops desktop duplication from working instead. The resulting illegal texture access would be a plausible cause for an application crash as well depending on driver's whims tough.

If it's not too much to ask, can you disable or move desktop 4 so it's neither above nor to the left of the primary desktop? I'll try to push a fix out for that one as soon as possible, but it would help to see if that's also the cause here.

That's the best I can come up with right on the spot, but I'll also try recreating your setup on my end.

elvissteinjr commented 1 year ago

I've pushed out NewUI Preview 11.1. It only resolves what I mentioned above, but it would be helpful if you can check if that on its own had any effect on your issue.

jonylentzmc commented 1 year ago

Thank you so much for the update! I was doing some testing yesterday and it is working so much better!!