You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have built a test program with harfbuzz and cairo in MSVC2022 (MSBuild project, language c++20) in debug configuration. The code has a line cairo_glyph_path(cr, cairoglyphs, glyph_count);. When running the program (F5, Start Debugging), I receive a debug assert in cairo-dwrite-font.cpp, line 739, function _controlfp_s(&control_word, _CW_DEFAULT, MCW_PC);
"Debug Assertion Failed! ... File: minkernel/crts/ucrt/appcrt/tran/amd64/ieee.c"
resulting from use of an unassigned variable unsigned int control_word;.
When the same program is built in MSVC CMake project (platform Local machine (Windows10), language C++20), it runs without these annoying debug assert message popups. The reason is obvious: the MSBuild project copies the file \vcpkg\installed\x64-windows\debug\bin\cairo-2.dll into the \x64\debug folder, while the CMake project does not copy dll files into the ...\out\build<projectName> folder but the project executable directly loads dll modules from the directories specifies with the PATH environment (like \vcpkg\installed\x64-windows\debug\bin, \vcpkg\installed\x64-windows\bin) and selects the cairo-2.dll linked in the release configuration.
To be able to debug my MSBuild-linked program, I have to specify what cairo-2.dll of the two MSVC should use, adding the Postbuild event copy /Y "C:\vcpkg\installed\x64-windows\bin\cairo-2.dll" $(TargetDir) for the debug configuration.
The cairo-dwrite-font.cpp code update initializing the control_word variable before its use would solve the issue.
The text was updated successfully, but these errors were encountered:
I have built a test program with harfbuzz and cairo in MSVC2022 (MSBuild project, language c++20) in debug configuration. The code has a line
cairo_glyph_path(cr, cairoglyphs, glyph_count);
. When running the program (F5, Start Debugging), I receive a debug assert in cairo-dwrite-font.cpp, line 739, function_controlfp_s(&control_word, _CW_DEFAULT, MCW_PC);
"Debug Assertion Failed! ... File: minkernel/crts/ucrt/appcrt/tran/amd64/ieee.c"
resulting from use of an unassigned variable
unsigned int control_word;
.When the same program is built in MSVC CMake project (platform Local machine (Windows10), language C++20), it runs without these annoying debug assert message popups. The reason is obvious: the MSBuild project copies the file \vcpkg\installed\x64-windows\debug\bin\cairo-2.dll into the \x64\debug folder, while the CMake project does not copy dll files into the ...\out\build<projectName> folder but the project executable directly loads dll modules from the directories specifies with the PATH environment (like \vcpkg\installed\x64-windows\debug\bin, \vcpkg\installed\x64-windows\bin) and selects the cairo-2.dll linked in the release configuration.
To be able to debug my MSBuild-linked program, I have to specify what cairo-2.dll of the two MSVC should use, adding the Postbuild event
copy /Y "C:\vcpkg\installed\x64-windows\bin\cairo-2.dll" $(TargetDir)
for the debug configuration.The cairo-dwrite-font.cpp code update initializing the
control_word
variable before its use would solve the issue.The text was updated successfully, but these errors were encountered: