Skip to content

Fix binary compatibility with older C runtimes on Windows - #2612

Merged
hoffstadt merged 2 commits into
hoffstadt:masterfrom
v-ein:feature/build-issues
Mar 10, 2026
Merged

Fix binary compatibility with older C runtimes on Windows#2612
hoffstadt merged 2 commits into
hoffstadt:masterfrom
v-ein:feature/build-issues

Conversation

@v-ein

@v-ein v-ein commented Mar 3, 2026

Copy link
Copy Markdown
Collaborator

name: Pull Request
about: Create a pull request to help us improve
title: Fix binary compatibility with older C runtimes on Windows
assignees: ''


Description:

At some point, Visual Studio 2022 started producing code no longer compatible with older versions of msvcp140.dll, which is a part of VC redistributable package. Since VS 2022 is used on GitHub for our release builds, this issue shows up in DPG versions 2.1 and 2.2 where most DPG API calls segfault for no obvious reason. A number of DPG users reported this, e.g. in #2535 and on Discord.

Here are some discussions related to this change in Visual Studio:
https://stackoverflow.com/questions/78598141/first-stdmutexlock-crashes-in-application-built-with-latest-visual-studio
actions/runner-images#10004

This fix adds _DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR to circumvent the issue and make DPG compatible with the older runtimes again.

Another thing it fixes is a warning from PVS Studio on how mvFontManager overrides a field in the base class. I decided to combine these two fixes rather than put each of them into a separate tiny PR.

Concerning Areas:
None.

@v-ein
v-ein requested a review from hoffstadt as a code owner March 3, 2026 15:44
@hoffstadt
hoffstadt merged commit 0398ff4 into hoffstadt:master Mar 10, 2026
4 checks passed
@v-ein
v-ein deleted the feature/build-issues branch March 23, 2026 20:59
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

Successfully merging this pull request may close these issues.

2 participants