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

OBS is not working anymore with new version, Vcredist microsoft C++ bug (2015-2022) #10988

Closed
wblanc77 opened this issue Jul 15, 2024 · 34 comments

Comments

@wblanc77
Copy link

Operating System Info

Windows 10

Other OS

No response

OBS Studio Version

30.2.0

OBS Studio Version (Other)

No response

OBS Studio Log URL

Can't launch OBS...

OBS Studio Crash Log URL

No response

Expected Behavior

Worked as usual...

Current Behavior

Not working, Crash at beginning because of the new version, telling me that my vcredist is not updated (this is wrong). I can't repair vcredit, i can't reinstall, many people have the same problem, what can i do ?

Steps to Reproduce

  1. Launching OBS
  2. Accepting to reinstall Vcredist
  3. Not Working
  4. Reboot and try to repair or anything
  5. Not Working
  6. Ask to you what can i do ?

Anything else we should know?

This only happened because of the new version, i've never have this BUG from all this time.

Look at this screen, thank you.
OBS bug vcredist

@notr1ch
Copy link
Member

notr1ch commented Jul 15, 2024

You will need to resolve whatever issue prevents you from installing / repairing the updated Visual Studio runtimes, this is outside the scope of OBS.

@ceruleanight
Copy link

I'm facing the same problem on win10. Both versions have been downloaded and installed from the obs website, and it still gives that error. I ended up just downgrading to 30.1.2 without issue.

@tripathi-abhishek
Copy link

Click Ok -> Goto download page -> then download the "Vcredist microsoft C++ bug (2015-2022)" and try installing it. It will show repair button if already installed. Click on repair. then restart PC.

This worked for me.

@wblanc77
Copy link
Author

I'm facing the same problem on win10. Both versions have been downloaded and installed from the obs website, and it still gives that error. I ended up just downgrading to 30.1.2 without issue.

This is what i did.

@wblanc77
Copy link
Author

Click Ok -> Goto download page -> then download the "Vcredist microsoft C++ bug (2015-2022)" and try installing it. It will show repair button if already installed. Click on repair. then restart PC.

This worked for me.

It was impossible for me, i will try something with this => https://answers.microsoft.com/en-us/windows/forum/all/unable-to-delete-microsoft-visual-c-2015-2019/73bd3a00-228d-4670-b3b5-f7ed1f62f70e

@derrod
Copy link
Member

derrod commented Jul 16, 2024

I'm facing the same problem on win10. Both versions have been downloaded and installed from the obs website, and it still gives that error. I ended up just downgrading to 30.1.2 without issue.

If running the installer worked, please let us know the following:

  1. If there are any files called msvcp140.dll in the OBS installation directory

  2. The version of msvcp140.dll in C:\Windows\System32 (right click -> properties -> details)
    DLL proerties

  3. Which msvcp140.dll is loaded by the OBS process (you can see this in process explorer)
    process explorer

@hgouveia
Copy link

i am facing the same issue, i downloaded both x64/x86 version from the OBS provided urls, click repair, restarted, nothing, tried once again after restart and restarted again, same issue

image

@derrod
Copy link
Member

derrod commented Jul 17, 2024

Please provide the information I asked for in the above comment #10988 (comment)

@hgouveia
Copy link

Please provide the information I asked for in the above comment #10988 (comment)

hey sure

C:\Windows\System32\msvcp140.dll
image

obs64.exe
image

@derrod
Copy link
Member

derrod commented Jul 17, 2024

Yeah that DLL should not be there (the OBS install folder). And we don't put it there either. Can you provide us with a log from the last time you successfully launched OBS (in %APPDATA%\obs-studio\logs)? Afterwards try to uninstall and reinstall OBS.

@hgouveia
Copy link

Yeah that DLL should not be there (the OBS install folder). And we don't put it there either. Can you provide us with a log from the last time you successfully launched OBS (in %APPDATA%\obs-studio\logs)? Afterwards try to uninstall and reinstall OBS.

Yeap, after removing msvcp140.dll from the bin folder in my obs installation, solved the issue i didnt need to uninstall/reinstall, not sure why those dll were there ,i guess was an addon, but at this point i can't be sure which one tbh

logs
2024-07-16 16-46-02.txt

@ddescham74
Copy link

I have the exact same issue, msvcp140.dll is not in the obs folder, I have it in System32 and the version is 14.29.30133.0.
Everything is installed correctly, I tried repairing vcredist, didn't do nothing.
It worked twice with the new version, then it stopped working and had to downgrade. I didn't change anything on my system between the time it worked and the time the error appeared.
Here are the logs of when it worked.
2024-07-14 11-43-36.txt
2024-07-15 10-53-56.txt

@RytoEX
Copy link
Member

RytoEX commented Jul 17, 2024

Version 14.29.30133.0 is outdated. The current version is 14.40.33810.0.

@ddescham74
Copy link

Well, I don't know what to do, I installed the version of vcredit that is on the OBS wensite, it says it is already installed and repairing didn't do anything.
Well, I am gonna investigate then

@RytoEX
Copy link
Member

RytoEX commented Jul 17, 2024

If Repair does not work, then you need to uninstall and reinstall it. This is outside the scope of this Issue though. Please visit our support channels if you require further assistance with that.

If you still have issues after confirming that the version in System32 is the latest version, then please provide the info requested in the comment above: #10988 (comment)

@hgouveia
Copy link

I have the exact same issue, msvcp140.dll is not in the obs folder, I have it in System32 and the version is 14.29.30133.0. Everything is installed correctly, I tried repairing vcredist, didn't do nothing. It worked twice with the new version, then it stopped working and had to downgrade. I didn't change anything on my system between the time it worked and the time the error appeared. Here are the logs of when it worked. 2024-07-14 11-43-36.txt 2024-07-15 10-53-56.txt

in my case, in the bin folder i had 3 msvcp140.dll. i removed all of them

msvcp140.dll
msvcp140-1.dll
msvcp140-2.dll

@ddescham74
Copy link

Yeah no I had no msvcp140 dlls in the obs folder whatsoever
I fixed the issue tho, I had to repair the vcredist 3 times and then upgrade OBS which installed the vcredist again as well and it finally worked.
The joys of windows
Thanks for your help everyone!

@IanJSaul
Copy link

I ran into this same issue after using OBS without a problem yesterday. The only change was that I updated Davinci Resolve to the 19 Beta 5 release, restarted - and OBS stopped working.

A quick REPAIR to both of the 2015-2022 C++ Redistributable for x86/x64 - and OBS now opens.

@yunytuny
Copy link

yunytuny commented Jul 26, 2024

Agree with @IanJSaul. I also update Davinci Resolve to 19 public beta 5 release an OBS stoped working. I wonder what this is related to

@RytoEX
Copy link
Member

RytoEX commented Jul 26, 2024

If you're having issues running OBS Studio after installing DaVinci Resolve, please report that to their developers.

@kikosgc
Copy link

kikosgc commented Aug 4, 2024

If you're having issues running OBS Studio after installing DaVinci Resolve, please report that to their developers.

@RytoEX I have that exact same situation!

@RytoEX
Copy link
Member

RytoEX commented Aug 5, 2024

@kikosgc Please report the issue to the DaVinci Resolve team.

@davidfiala
Copy link

---------------------------
Outdated Visual C++ Runtime
---------------------------
OBS Studio requires a newer version of the Microsoft Visual C++ Redistributables.

You will now be directed to the download page.
---------------------------
OK   Cancel   
---------------------------

Easiest steps that worked for me (no reboot required). I was hit b/c of Da Vinci too.

(1) Uninstall OBS. OK to leave scenes/settings in place.
(2) Run VC_redist.x64.exe and select repair
(3) Reinstall OBS

Works without any restarts, nor multiple repairs. Hopefully no one else has to do it multiple times.

I wonder what integrity/version check is occurring that prevents runnning OBS. I wonder if it could have run without having to re-do VC redist.

@RytoEX
Copy link
Member

RytoEX commented Aug 15, 2024

I wonder what integrity/version check is occurring that prevents runnning OBS. I wonder if it could have run without having to re-do VC redist.

No. Without the correctly updated VC redist, OBS Studio will crash.

@hannahbellelee
Copy link

I installed the update, but it immediately threw an exception when i tried to launch it. I'm a Sr. Software Eng. (for goin on 2 decades) and already have that vcredist version TRUST ME.... And I update my OS, Visual Studio 2022, and all dev tools regularly. And not only that, but I'm really confused as to why your software would require both x86 and 64bit versions. This is not a requirement of the OS nor of the Redistributable... So that leaves your software or 3rd party libraries. Either way, I will not overwrite my working version of a 2yr/old C++ redist unless Visual Studio prompts me to, and I'm guessing if I try to uninstall the OBS version and reinstall the last version I had that was working, It's probably already too late. So I guess I won't be using it anymore with a requirement like that, anyway. Hope you figure it out soon.

@RytoEX
Copy link
Member

RytoEX commented Aug 31, 2024

I installed the update, but it immediately threw an exception when i tried to launch it. I'm a Sr. Software Eng. (for goin on 2 decades) and already have that vcredist version TRUST ME.... And I update my OS, Visual Studio 2022, and all dev tools regularly. And not only that, but I'm really confused as to why your software would require both x86 and 64bit versions. This is not a requirement of the OS nor of the Redistributable... So that leaves your software or 3rd party libraries. Either way, I will not overwrite my working version of a 2yr/old C++ redist unless Visual Studio prompts me to, and I'm guessing if I try to uninstall the OBS version and reinstall the last version I had that was working, It's probably already too late. So I guess I won't be using it anymore with a requirement like that, anyway. Hope you figure it out soon.

The requirement for a newer VC++ Redistributable is due to a change in the Microsoft STL shipped with Visual Studio 2022 17.10, which is then used in any software built with VS 2022 17.10 or newer. Microsoft considers this change by design. See:

As noted earlier in this thread, some installers will overwrite existing newer/current vcredist installs with older versions (Blackmagic's DaVinci Resolve does this). Unfortunately, that is outside of our control. Some installers targeting the OBS Studio directory may install their own versions into OBS Studio's directory. Unfortunately, that is also outside of our control.

OBS Studio requires both x86 and x64 versions because it has both x86 and x64 components for Game Capture and Virtual Camera. This is so that those components can work with x86 software instead of just working with x64 software.

Installers for older versions of OBS Studio are available on the Releases Page. Older versions of OBS Studio should work with newer versions of the VC++ Redistributable.

This GitHub Issue remains open due to cases where some other installer ships its own copy of msvcp140.dll as a reminder that we would like to find a way to detect such rogue DLLs. We suspect that these cases are due to some OBS Studio plugin installers, but we have been unable to confirm. Thank you for your understanding.

@hannahbellelee
Copy link

I am running VS2022 17.11.2. Still no other apps are crashing Maybe I read that differently than you did. My runtimes/redists are installed when I select them in Visual Studio Installer, not "independently". And I have customers using the older Redists. I can't just go and change the redistributable prereqs that get published to my customers. If I did, then all my devs that build and/or publish those apps would have to do the same...then every user of every computer that runs our software will also have to update. And some companies don't allow that at all. This would be the equivalent of me changing one of my apps from >net Framework 4.72 to .NET8 without planning it with my customers.

Sorry, I can't install those redists. I can't do that to my customers. And really, I can't understand why you'd push such a change to all your users, because let's be honest here, the latest redist that uses the latest c++ features, is a breaking change for many of your users, and now you've locked them in to either using older versions of OBSStudio or updating their own redists.

And again, maybe I'm reading the devcommunity response incorrectly or understanding it differently, but the post seems to focus on the way the mutex is implemented, and that is the root cause of the app crashing. I took it to mean either you are deploying an app with newer headers than EVERYONES INSTALLED REDIST VERSIONS, and all of our versions must be updated to meet a minimum requirement based on YOUR headers, or "When you mix binaries built by different supported versions of the toolset, the Redistributable version must be at least as new as the latest toolset used by any app component." And whether it was your code or a 3rd party vendors code, it doesn't matter. You pushed a breaking change to your customers and now they can choose to remain on your now-frozen-in-time legacy builds, or they unnecessarily update. Either way, this wasnt "by Microsoft's Design".... good luck

@RytoEX
Copy link
Member

RytoEX commented Sep 3, 2024

Sorry, I can't install those redists. I can't do that to my customers. And really, I can't understand why you'd push such a change to all your users, because let's be honest here, the latest redist that uses the latest c++ features, is a breaking change for many of your users, and now you've locked them in to either using older versions of OBSStudio or updating their own redists.

My understanding is that any application built with VS 17.10+ (which shipped the updated Microsoft STL headers) that uses mutexes would be affected. The root cause is a change in the mutex constructor in the Microsoft STL at that time, which is mentioned in the linked release notes as a "bug fix" ("Fixed mutex's constructor to be constexpr"). As soon as GitHub Actions updated Visual Studio to 17.10, our CI builds were affected.

Per the Microsoft Resolution on the devcommunity thread:

You can define _DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR as an escape hatch.
That is, if you’re seeing crashes due to null dereferences in mutex locking machinery, you’re deploying a program built with new STL headers, but without a sufficiently new msvcp140.dll, which is unsupported. You need to be (re)distributing a new STL DLL too. (If a VS 2022 17.10 VCRedist has been independently installed on the machine - then everything will happen to work.)

We elected not to use the escape hatch, because there's no guarantee that that will work forever, and instead advise users to update the VC++ Redistributable if they wanted to update OBS. If a user does not want to, or is not able to, update the VC++ Redistributable on their system, then they do not have to update OBS.

We are aware that it is frustrating, as it was frustrating to us at the time to have it become something we had to address. However, it was a change in the Microsoft STL to the mutex constructor.

I would prefer that this GitHub Issue would remain focused on discussion about rogue/unexpected msvcp140.dll files inside the OBS Studio directory and possibly finding a root cause or a solution for that.

@natereprogle
Copy link

natereprogle commented Sep 14, 2024

Sorry, I can't install those redists. I can't do that to my customers. And really, I can't understand why you'd push such a change to all your users, because let's be honest here, the latest redist that uses the latest c++ features, is a breaking change for many of your users, and now you've locked them in to either using older versions of OBSStudio or updating their own redists.

My understanding is that any application built with VS 17.10+ (which shipped the updated Microsoft STL headers) that uses mutexes would be affected. The root cause is a change in the mutex constructor in the Microsoft STL at that time, which is mentioned in the linked release notes as a "bug fix" ("Fixed mutex's constructor to be constexpr"). As soon as GitHub Actions updated Visual Studio to 17.10, our CI builds were affected.

Per the Microsoft Resolution on the devcommunity thread:

You can define _DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR as an escape hatch.
That is, if you’re seeing crashes due to null dereferences in mutex locking machinery, you’re deploying a program built with new STL headers, but without a sufficiently new msvcp140.dll, which is unsupported. You need to be (re)distributing a new STL DLL too. (If a VS 2022 17.10 VCRedist has been independently installed on the machine - then everything will happen to work.)

We elected not to use the escape hatch, because there's no guarantee that that will work forever, and instead advise users to update the VC++ Redistributable if they wanted to update OBS. If a user does not want to, or is not able to, update the VC++ Redistributable on their system, then they do not have to update OBS.

We are aware that it is frustrating, as it was frustrating to us at the time to have it become something we had to address. However, it was a change in the Microsoft STL to the mutex constructor.

I would prefer that this GitHub Issue would remain focused on discussion about rogue/unexpected msvcp140.dll files inside the OBS Studio directory and possibly finding a root cause or a solution for that.

To add my $0.02, I just updated OBS on my PC and I did not have that rogue msvcp140.dll in my OBS install folder, however it was still prompting me to install a newer version of the redist and would fail to launch. I had both the x32 and x64 versions of the specific redist on your website already installed. What did work was this suggestion above. So, I can't say that it was the msvcp140.dll file that caused the issue since it never existed in the first place. I, too, did not have to restart my PC after repairing the redist for OBS to launch (Even though the repair claims it's necessary). Not sure if that's any assistance or not.

@SBarkovskiy
Copy link

SBarkovskiy commented Sep 18, 2024

A solution which helped me:

  1. Go to installed Apps within your Windows Settings app
  2. Search for C++
  3. Look for Microsoft C++ 2015-2022 Redistributable (x64) - 14.40.33810
  4. Hit ... => Modify => Repair
  5. Allow to restart your machine at the end
  6. After the restart - lunch OBS

@kfrncs
Copy link

kfrncs commented Sep 19, 2024

This was happening for me, also after installing Da Vinci. Repairing both x64 and x86 did not work, even with a restart. I uninstalled both msvcpp's and obs, then installed the latest msvcpp's (mentioned above) and OBS and the problem is fixed. Just in case that info is useful or relevant. Would have to check what's up with the Da Vinci installer messing around with system dll's, because I did not have that .dll file in my install folder or in /bin

I don't know now if the linked version in the error message is the latest, or whether just updating may have solved. Could be unrelated. Thanks. I'll email this thread to Blackmagic support

@soundattacker13
Copy link

soundattacker13 commented Sep 20, 2024

This was happening for me, also after installing Da Vinci. Repairing both x64 and x86 did not work, even with a restart. I uninstalled both msvcpp's and obs, then installed the latest msvcpp's (mentioned above) and OBS and the problem is fixed. Just in case that info is useful or relevant. Would have to check what's up with the Da Vinci installer messing around with system dll's, because I did not have that .dll file in my install folder or in /bin

I don't know now if the linked version in the error message is the latest, or whether just updating may have solved. Could be unrelated. Thanks. I'll email this thread to Blackmagic support

Where du you install the new msvcp? in System32? only copy in there or with use of regsvr32 "File "?

@gubbsg2
Copy link

gubbsg2 commented Oct 6, 2024

This was happening for me, also after installing Da Vinci. Repairing both x64 and x86 did not work, even with a restart. I uninstalled both msvcpp's and obs, then installed the latest msvcpp's (mentioned above) and OBS and the problem is fixed. Just in case that info is useful or relevant. Would have to check what's up with the Da Vinci installer messing around with system dll's, because I did not have that .dll file in my install folder or in /bin

how the fuck did you uninstall it if the uninstall button doesn't work?

@obsproject obsproject deleted a comment from Edvando Oct 6, 2024
@Fenrirthviti
Copy link
Member

As this issue is caused by third party applications and other unrecommended practices by applications outside OBS, this issue is now considered closed. If you are experiencing issues launching OBS and getting a similar error message, make sure to check that all VC Redist packages are up to date, and there are no improperly installed libraries in the OBS program directory.

If this does not resolve the issue, please use our forums or Discord for further assistance.

Thank you!

@Fenrirthviti Fenrirthviti closed this as not planned Won't fix, can't repro, duplicate, stale Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests