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

Release crashes in Visual Studio 2022 vcxproj type project (so no cmake) #162

Open
thegam3r2045 opened this issue Nov 22, 2023 · 1 comment

Comments

@thegam3r2045
Copy link

I am on Windows10 x64. I downloaded the Windows_x64_1369.zip file.
In the Project properties (All Configurations selected):

  • added the include folder to "Additional Include Directories"
  • added the lib folder to "Additional Library Directories"
  • added screen_capture_lite_shared.lib;glfw3dll.lib; to Additional Dependencies

Added screen_capture_lite_shared.dll and glfw3.dll files to the folder where the vcxproj file is.

This works fine in Debug mode. But when I run it in Release mode then the program crashes with "read access violation" when it prints the available monitors because the monitors count is 18446744073709551337. This is the first part of the output, it goes on for a while, and then crashes:

Library is requesting the list of monitors to capture!
Monitors count: 18446744073709551337
Id=-50333240 Index=60 Height=0 Width=-33686019 OffsetX=-1946144430 OffsetY=1323035824 Name=U☺
Id=638 Index=0 Height=-33686019 Width=1752457552 OffsetX=544039282 OffsetY=1701603654 Name=VMware\VMware Workstation\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Microsoft SQL Server\150\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files\VisualSVN Server\bin;C:\Program Files\TortoiseSVN\bin;C:\opencv\build\x64\vc16\bin;C:\Program Files\dotnet;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Users\Zoli\AppData\Local\Microsoft\WindowsApps;C:\Users\Zoli.dotnet\tools
Id=1767332922 Index=2003788910 Height=1835365491 Width=1331442227 OffsetX=1348221507 OffsetY=1919381362 Name= (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Microsoft SQL Server\150\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files\VisualSVN Server\bin;C:\Program Files\TortoiseSVN\bin;C:\opencv\build\x64\vc16\bin;C:\Program Files\dotnet;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Users\Zoli\AppData\Local\Microsoft\WindowsApps;C:\Users\Zoli.dotnet\tools ................etc.

The code I use is copied from Screen_Capture_Example.cpp

@jferdelyi
Copy link

jferdelyi commented Dec 21, 2023

  • Windows 11 x64
  • VS 2022 (VC143)
  • C++14 (tested in C++20 also)

Same problem... I also notice that the number of monitors is HUGE for no reason. In debug mode the number of monitor is correct and no problem with windows, everythings is fine.

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

2 participants