Bug Report OBS Studio 19.0.3 Crashes XHCI Controller

FerretBomb

Active Member
Ping @R1CH as I have a reliably reproducible set of steps to reproduce. It ALSO works with OBS Classic running.

Have OBS/Studio running, with the Preview going.
Start a Webkit/Blink-based browser instance (including cefsharp).
XHCI crash. Instantly. Every time.

I've tested with Ankhbot and Chrome. Interestingly enough, it does NOT occur if the Webkit-based system is already running when OBS Classic is started. Only if a new independent Webkit program is started from scratch does the crash occur.
I assume something about the Webkit device init (for things like webcam access maybe?) logjams with OBS' hold on the USB devices, and causes the XHCI crash. The reason Classic never had it happen was because I started the bot and had Chrome running long beforehand. Only discovered this when I realized mid-stream that I'd forgotten to start the bot.

I assume that Studio's browser source plugin is running a different browser core than Classic's Browser Source plugin, and something about it init'ing while Studio is running and displaying a preview (since it starts up showing the preview all the time) kicks it over. Not sure about the long-duration crashes, as no new browser window was opened... I'm guessing Studio killed the browser process and hard-refreshed it or something similar in the background, causing the issue to trip, or it hit the point in the init that actually collaborates with something in OBS to actually cooperate in crashing the XHCI.

As a temporary workaround, is there a version of the OLD Browser Source plugin for Studio? Not sure if it would circumvent the problem, or if it's a Studio internal reinit kicking it over. But if that's the root cause, it'd at least triage the problem. Worth a shot, if it's available.
 
Last edited:

Osiris

Active Member
If the problem also occurs in OBS classic, then using older browser source plugins makes no difference. Both the CLR browser and the browser source use CEF, ofcourse the CLR browser has an ancient one. The browser source uses chromium v59 atm.
 

FerretBomb

Active Member
@Osiris Classic does not self-crash the controller though, as Studio currently does at random on my machine. Classic only breaks it when a separate, updated CEF browser is init'ed after the preview is running. Again, tested with Ankhbot and Chrome, and causes the crash immediately every time.

If Chrome/Ankhbot are already running when OBS Classic is started and a stream is launched, it can run indefinitely with no issues.

If Chrome/Ankhbot are NOT running at all, a stream is active (did not yet test local recording), and then Chrome/Ankhbot are started fresh, the XHCI 3.0 controller will immediately crash.

The hope was to see if an old Browser Source version into Studio would still cause the unreliable/intermittent controller crash, which would narrow it down to an interaction with the NEWER CEF versions. I'm trying to eliminate variables and narrow the scope as much as possible.

If there's a way to call CEF by version for regression (or progression) testing, I'm happy to start with whatever version Studio 14 used, and move forward until I find which version starts tripping the crash in conjunction with OBS. Again, I assume it's something about how CEF inits and checks device availability that doesn't play well with however OBS holds onto active devices, and how X99 Intel USB 3.0 XHCI deals with that. If I can narrow down the start/change point, I can toss other troubleshooting into the mix like disabling exclusive mode for devices and the like, and continue to feel out the problem... either to give that data to Jim for a possible workaround on the OBS side, or to figure out if the Chromium project or Microsoft would need to poke at it for a proper long-term fix once there's a better picture of the actual root cause.
 

FerretBomb

Active Member
@Osiris is there any way that the ancient Classic browser source plugin could be ported to Studio, for those (very few) of us with the XHCI crash issue, as a workaround?

After speaking with Intel at length, they've told me to talk to MS support as MS devs the W10 driver. Meaning that it will never ever be fixed, ever. Talking to MS support has ended up in one 'clean reinstall Windows', one circular script-reader insisting that I needed to update WSUS, and one who stopped replying entirely. No chance of talking to someone who can find their ass with both hands and a map before I'm long dead and dust.

Again, trying to switch up from Classic, but if I lose all my USB devices at random when (I assume) OBS restarts a browser source on the back-end, it's just not viable. Classic I can just make sure to remember to start Chrome and Ankhbot before I start OBS, and it's good to go.
 

FerretBomb

Active Member
On further testing, I have another workaround. Plugging both my webcams into the USB 3.1 ports (handled by a separate on-mobo ASMedia XHCI controller) seems to be stopping the CEF on-demand crash. Which confuses me greatly, as having them NOT plugged in AT ALL kept having it occur. Will continue to test for the long-term crash, but potential workaround found (?).
 
Top