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

Sudden random crashes (due to incompatible MSVCP140.DLL in the program folder) #49

Open
gerwaric opened this issue Jul 23, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@gerwaric
Copy link
Owner

gerwaric commented Jul 23, 2024

PROBLEM: Acquisition is crashing randomly for a number of users. This happens at startup or shortly thereafter.

CAUSE: The common issue seems to be that these users have .DLL files from an incompatible version of the Microsoft Visual C++ Runtime such as msvcp140.dll, msvcp140_1.dll, and msvcp140_2.dll copied into Acquisition's program folder. Acquisition is compiled with the most recent C++ runtime, but those files are from a slightly older, incompatible version. These files are not removed during the installation process, so installing a new version of Acquisition will leave behind these older files if they exist.

(I'm not sure how these files ended up in Acquisition's program folder, but if it were me, I can imagine copying them manually at some point due to an error like "Missing MSVCP140.dll" --@gerwaric)

SOLUTION: This problem will persist until the deletes those files from Acquisition's program folder and installs the necessary Visual C++ runtime. To make this easiear, the installer for acquisition now offers to install the MSVC runtime.

SPECIFICS: The crash is happening within the code for std::mutex as described here: https://developercommunity.visualstudio.com/t/Access-violation-in-_Thrd_yield-after-up/10664660

POSSIBLE WORKAROUNDS:

  • At the moment, it's possible to compile acquisition with _DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR. This is supposed to prevent the immediate problem, but I haven't tested it. However, it's likely that future version of the C++ runtime will come with additional changes that will again cause crashes when trying to run with older DLL files.
  • The installer for Acquisition could be scripted to look for and delete those files from the installation director. This is also problematic, because the user might not be aware that Acquisition is deleting files or folder, and there may be other unintended consequences.

Currently Acquisition tries to detect the presence of these incompatible DLLs and warn the user, but this may not be the best solution, either.

@gerwaric gerwaric added the bug Something isn't working label Jul 23, 2024
@gerwaric gerwaric self-assigned this Jul 23, 2024
@gerwaric gerwaric changed the title Sudden random crashes shortly after startup due to MSVCP140.DLL Sudden random crashes shortly after startup (due to MSVCP140.DLL) Jul 23, 2024
@gerwaric
Copy link
Owner Author

@gerwaric
Copy link
Owner Author

I'm still seeing a fair number of these crashes on Bugsplat, so I'm reopening this issue so that people will see it if they come here.

@gerwaric gerwaric reopened this Jul 31, 2024
@gerwaric gerwaric changed the title Sudden random crashes shortly after startup (due to MSVCP140.DLL) Sudden random crashes (due to incompatible MSVCP140.DLL in the program folder) Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant