Stack error while running code samples

Share source code samples for use with the Camera SDK
Post Reply
nirvik
Posts: 4
Joined: Thu Aug 05, 2021 10:30 am

Stack error while running code samples

Post by nirvik »

I am trying to use the camera SDK sample Visual Cpp codes with Optitrack prime cameras. While running the simpleCameraTest.cpp project, the cameras are listed as expected but at the end of the main function the debugger pops up the following error:

Code: Select all

Run-Time Check Failure #2 - Stack around the variable 'list' was corrupted.
An extensive googling of this issue did not reveal much insights except that something might be incorrect inside the cameralist class def. 
I would appreciate any help on this issue?
nirvik
Posts: 4
Joined: Thu Aug 05, 2021 10:30 am

Re: Stack error while running code samples

Post by nirvik »

Apparently using a pointer to the cameralist instead somehow removes the error, not sure why though:

Code: Select all

	CameraList* list = new CameraList;
	printf("Available cameras and/or other hardware:\n");
	int cameraCount = list->Count();
	for (int i = 0; i < cameraCount; i++)
	{
		printf("Camera %d : %s\n", i, (*list)[i].Name());
	}
	if (cameraCount == 0)
		printf("None\n");
serdar
Posts: 1
Joined: Tue Aug 10, 2021 1:19 am
Location: Ankara
Contact:

Re: Stack error while running code samples

Post by serdar »

Hi Nirvik,

Which version of camera SDK you are using? I have the same problem. It started when I updated the camera SDK to 2.3.0.
Serdar ARITAN
In the 1980s, we didn’t have access to the Internet, integrated development environments, rich graphics, or even a choice of languages. What we had were 8-bit home computers, a blinking cursor, and Basic. And it was wonderful.
Post Reply