Skip to content

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

Description

@thegam3r2045

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions