lulzsun / RePlays

Open-source game recording management software
GNU General Public License v3.0
161 stars 18 forks source link

Crashing on launch due to WebView2 Issues #223

Closed Bmilner88 closed 2 weeks ago

Bmilner88 commented 2 months ago

RePlays appears to be crashing instantly every time I try to launch. This has been an issue for me since I've started using the app, however, now it no longer launches even when running as admin.

Checking the log files, this is what seems to be relevant:

[8/19/2024 7:04:39 PM][Program.cs::Main(48)]: System Culture: en-US [8/19/2024 7:04:39 PM][SettingsService.cs::LoadSettings(38)]: Loaded userSettings.json [8/19/2024 7:04:39 PM][SettingsService.cs::SaveSettings(73)]: Saved userSettings.json [8/19/2024 7:04:39 PM][StorageService.cs::ManageStorage(25)]: Managing space with user defined values: spaceLimit: -1, days: -1 [8/19/2024 7:04:39 PM][KeybindService.cs::Start(17)]: Starting KeybindService... [8/19/2024 7:04:39 PM][Keybind.cs::SetKeybind(25)]: Set existing keybind: Action=CreateBookmark, Keys=F9 [8/19/2024 7:04:39 PM][Keybind.cs::SetKeybind(25)]: Set existing keybind: Action=StartStopRecording, Keys=F10 [8/19/2024 7:04:39 PM][v1.3.32][RecordingService.cs::Start(40)]: RecordingService starting... [8/19/2024 7:04:39 PM][v1.3.32][DetectionService.cs::Start(36)]: DetectionService starting... [8/19/2024 7:04:39 PM][v1.3.32][WindowService.cs::Start(265)]: WindowService starting... [8/19/2024 7:04:39 PM][v1.3.32][RecordingService.cs::Start(49)]: Creating a new ActiveRecorder [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(151)]: libobs version: 30.1.1 [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: error: CoInitializeEx failed: 0x80010106 [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: CPU Name: AMD Ryzen 7 5800X 8-Core Processor
[8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: CPU Speed: 3800MHz [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: Physical Cores: 8, Logical Cores: 16 [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: Physical Memory: 32695MB Total, 24117MB Free [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: Windows Version: 10.0 Build 22631 (release: 23H2; revision: 4037; 64-bit) [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: Running as administrator: true [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: Windows 10/11 Gaming Features: [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: Game Bar: On [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: Game DVR: On [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: Game DVR Background Recording: Off [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: Game Mode: Off [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: Sec. Software Status: [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: Malwarebytes: disabled (AV) [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: Microsoft Defender Antivirus: enabled (AV) [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: Windows Firewall: enabled (FW) [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: --------------------------------- [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: audio settings reset: samples per sec: 44100 speakers: 2 max buffering: 1044 milliseconds buffering type: dynamically increasing [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: --------------------------------- [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: Initializing D3D11... [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: Available Video Adapters: [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: Adapter 0: NVIDIA GeForce RTX 3070 [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: Dedicated VRAM: 8407482368 (7.8 GiB) [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: Shared VRAM: 17141680128 (16.0 GiB) [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: PCI ID: 10de:2488 [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: HAGS Status: Disabled (Default: No, Driver status: Supported) [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: Driver Version: 32.0.15.6070 [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: output 0: name=XG259CM pos={0, 0} size={1920, 1080} attached=true refresh=240 bits_per_color=8 space=RGB_FULL_G22_NONE_P709 primaries=[r=(0.675781, 0.319336), g=(0.297852, 0.637695), b=(0.147461, 0.058594), wp=(0.313477, 0.329102)] relative_gamut_area=[709=1.190263, P3=0.877427, 2020=0.629495] sdr_white_nits=80 nit_range=[min=0.000000, max=400.000000, max_full_frame=400.000000] dpi=96 (100%) id=\?\DISPLAY#AUS25B8#5&22e8e494&3&UID33028#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7} alt_id=\.\DISPLAY2 [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: output 1: name=G2460PG pos={0, -1080} size={1920, 1080} attached=true refresh=144 bits_per_color=8 space=RGB_FULL_G22_NONE_P709 primaries=[r=(0.639648, 0.330078), g=(0.299805, 0.599609), b=(0.150391, 0.059570), wp=(0.312500, 0.329102)] relative_gamut_area=[709=0.998664, P3=0.736186, 2020=0.528164] sdr_white_nits=80 nit_range=[min=0.500000, max=270.000000, max_full_frame=270.000000] dpi=96 (100%) id=\?\DISPLAY#AOC2460#5&22e8e494&3&UID33025#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7} alt_id=\.\DISPLAY1 [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: output 2: name=100002487 pos={1920, -930} size={1080, 1920} attached=true refresh=75 bits_per_color=8 space=RGB_FULL_G22_NONE_P709 primaries=[r=(0.646484, 0.346680), g=(0.322266, 0.629883), b=(0.155273, 0.060547), wp=(0.313477, 0.329102)] relative_gamut_area=[709=1.034726, P3=0.762770, 2020=0.547236] sdr_white_nits=80 nit_range=[min=0.500000, max=270.000000, max_full_frame=270.000000] dpi=96 (100%) id=\?\DISPLAY#ONN0000#5&22e8e494&3&UID33027#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7} alt_id=\.\DISPLAY3 [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: Loading up D3D11 on adapter NVIDIA GeForce RTX 3070 (0) [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: D3D11 loaded successfully, feature level used: b000 [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: DXGI increase maximum frame latency success [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: --------------------------------- [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: video settings reset: base resolution: 1920x1080 output resolution: 1920x1080 downscale filter: Bilinear fps: 60/1 format: NV12 YUV mode: Rec. 709/Partial [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: NV12 texture support enabled [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: P010 texture support not available [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: --------------------------------- [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: Loading module: aja.dll [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: warning: Failed to load 'en-US' text for module: 'aja.dll' [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: warning: No AJA devices found, skipping loading AJA plugin [8/19/2024 7:04:40 PM][v1.3.32][SettingsService.cs::SaveSettings(73)]: Saved userSettings.json [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: warning: Failed to initialize module 'aja.dll' [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: --------------------------------- [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: Loading module: coreaudio-encoder.dll [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: warning: Failed to load 'en-US' text for module: 'coreaudio-encoder.dll' [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: warning: [CoreAudio encoder]: CoreAudio AAC encoder not installed on the system or couldn't be loaded [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: --------------------------------- [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: Loading module: decklink.dll [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: warning: Failed to load 'en-US' text for module: 'decklink.dll' [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: warning: A DeckLink iterator could not be created. The DeckLink drivers may not be installed [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: warning: Failed to initialize module 'decklink.dll' [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: --------------------------------- [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: Loading module: image-source.dll [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: warning: Failed to load 'en-US' text for module: 'image-source.dll' [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: --------------------------------- [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: Loading module: obs-ffmpeg.dll [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: warning: Failed to load 'en-US' text for module: 'obs-ffmpeg.dll' [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: NVENC supported [8/19/2024 7:04:40 PM][v1.3.32][SettingsService.cs::LoadSettings(38)]: Loaded userSettings.json [8/19/2024 7:04:40 PM][v1.3.32][Updater.cs::CheckForUpdates(70)]: Found no updates higher than current version 1.3.32 [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: warning: [NVENC] AV1 is not supported [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: amf_load: No AMF library [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: --------------------------------- [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: Loading module: obs-filters.dll [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: warning: Failed to load 'en-US' text for module: 'obs-filters.dll' [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: [noise suppress]: NVIDIA denoiser disabled, redistributable not found or could not be loaded. [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: error: Failed to get NVVideoEffects.dll version info size [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: [NVIDIA VIDEO FX]: FX disabled, redistributable not found or could not be loaded. [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: --------------------------------- [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: Loading module: obs-outputs.dll [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: warning: Failed to load 'en-US' text for module: 'obs-outputs.dll' [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: --------------------------------- [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: Loading module: obs-qsv11.dll [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: warning: Failed to load 'en-US' text for module: 'obs-qsv11.dll' [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: --------------------------------- [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: Loading module: obs-text.dll [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: warning: Failed to load 'en-US' text for module: 'obs-text.dll' [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: --------------------------------- [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: Loading module: obs-transitions.dll [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: warning: Failed to load 'en-US' text for module: 'obs-transitions.dll' [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: --------------------------------- [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: Loading module: obs-webrtc.dll [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: warning: Failed to load 'en-US' text for module: 'obs-webrtc.dll' [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: --------------------------------- [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: info: LoadLibrary failed for './obs-plugins/64bit/obs-websocket.dll': The specified module could not be found. (126) [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: warning: Module './obs-plugins/64bit/obs-websocket.dll' not loaded [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: Failed to load module file './obs-plugins/64bit/obs-websocket.dll', file not found [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: --------------------------------- [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: Loading module: obs-x264.dll [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: warning: Failed to load 'en-US' text for module: 'obs-x264.dll' [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: --------------------------------- [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: Loading module: rtmp-services.dll [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: warning: Failed to load 'en-US' text for module: 'rtmp-services.dll' [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: --------------------------------- [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: Loading module: text-freetype2.dll [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: warning: Failed to load 'en-US' text for module: 'text-freetype2.dll' [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: --------------------------------- [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: Loading module: win-capture.dll [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: warning: Failed to load 'en-US' text for module: 'win-capture.dll' [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: --------------------------------- [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: debug: Loading module: win-dshow.dll [8/19/2024 7:04:40 PM][v1.3.32][LibObsRecorder.cs::Start(110)]: warning: Failed to load 'en-US' text for module: 'win-dshow.dll'

Full Logs: logs.txt

I also checked the Event Viewer: image image image (cont. from above) image

I am running Windows 11. Please let me know if any more information is needed.

lulzsun commented 2 months ago

Does an older version still cause this crash? The issue may be because of some other third party program interfering with RePlays. Could be some sort of anti-virus or anti-cheat software.

Bmilner88 commented 2 months ago

I just uninstalled RePlays via Revo and reinstalled non-nightly version. It launches fine when I run as admin, but doesn't launch when running normally.

I have Firewall disabled and no other antivirus installed at the moment, is there any indication of what third party program could cause something like this?

I'll try to install Nightly in Windows Sandbox to see if that is working. I definitely feel like this could be something specific to my PC, but it's hard to nail down what could be causing this.

Bmilner88 commented 2 months ago

I just got this error on Windows Sandbox, and I have seen this on my personal machine as well: 2024-08-19 20_40_54-Windows Sandbox

I just installed Nightly on a completely separate machine running Windows 10, so it could be related to OS, but I'm not 100% certain.

lulzsun commented 2 months ago

There has been one or two users with this problem in the past, but they were unable to provide much information or dwell deeper to find the problem themselves. These event views definitely help with figuring this out, so thank you for looking further into the issue and providing them.

Given the logs, it appears the crashing is related to the loading of OBS modules. Recent updates to RePlays (the recent nightly versions) should not have changed anything major to or with LibOBS (responsible for video capture), which is why I believe it could be a third party program could be affecting this. Hardware configuration may potentially be playing a part as well.

LibOBS loads modules in the form of .dlls and could be seen suspicious behavior by an anti-virus or similar, which is why I suspected third party programs. But if you think that it isn't so, then I'm really not sure what else could be causing it.

I am currently developing and testing on Windows 10 and I don't have this issue. I think another dev is running Windows 11 and isn't getting this issue either, but I may try to spin up a clean Windows 11 system to confirm if needed.

I may also have to look into getting LibOBS to dump useful exit logs instead of having to rely on Event Viewer, because right now it isn't clear if it is another program interfering or not.

Segergren commented 2 months ago

Hi, I just wanted to add that I also encountered the same issue after a fresh Windows reinstall.

I downloaded Nvidia updates, installed US language pack, and installed OBS. After restarting, everything worked fine.

I'll also try to reproduce it in Sandbox.

Bmilner88 commented 2 months ago

I just now updated to latest Nvidia drivers, updated OBS and it still won't launch unfortunately :(

Is there a specific place that I could possibly install a previous Nightly version? Or are we only able to install the latest?

Segergren commented 2 months ago

@Bmilner88 I ran into the same issue in my Sandbox. At least it’s easier to debug now. image

Bmilner88 commented 2 months ago

@Bmilner88 I ran into the same issue in my Sandbox. At least it’s easier to debug now. image

Oh wow, is this on Win11 as well? It feels like something is blocking the OBS dependency or something..

Segergren commented 2 months ago

Yeah, It's on Win11 :)

Segergren commented 2 months ago

Okay. I got it to work. I downloaded and installed OBS (https://cdn-fastly.obsproject.com/downloads/OBS-Studio-30.2.3-Windows-Installer.exe) and then installed WebView2 Runtime (https://developer.microsoft.com/en-us/microsoft-edge/webview2/?form=MA13LH#download) and it opens :O.

OBS installation fixed the obs.dll warning and WebView2-installation fixed the "WebView2 not installed" popup

image Can you try to install the WebView2 runtime?

Bmilner88 commented 2 months ago

Wow, that totally fixed it (at least on Sandbox)

For whatever reason, I already have WebView2 installed, and I'm unable to uninstall it... I suspect there is something else on my machine that requires WebView2 that could be the culprit. I'll do some more digging and update here with what I find :)

Thank you!

Bmilner88 commented 2 months ago

I found the culprit!

I guess New Teams uses WebView2 in some way, because as soon as I uninstalled it, RePlays is able to launch - Even without running as admin!

I was able to re-install new Teams and found that RePlays is still launching fine after a reboot. My guess is that somehow New Teams corrupted the WebView2 installation? It appears to utilize WebView2 for multiple things: image

We can probably close this issue for now, unless you wanted to investigate the other issues further, but I appreciate the support and ideas leading to this solution! :)

lulzsun commented 2 months ago

Interesting, so the issue is actually related to WebView2 instead? Really odd behavior.

Sounds like RePlays' WebView2 version is outdated enough to cause problems when an another application uses a newer version? We can try updating it to see if that fixes it.

lulzsun commented 2 weeks ago

Closing this for now since issue has been resolved. Could look into this further in the future if it comes up again.