0

I've made a program in Visual Studio, it's a gui meant to control a camera and the functions of it that my problem rotate about are the functions to open and close the link to the camera. The program seems to run but when I run the program outside visual studio(I double click on it in explorer) and open the camera the release version just closes and the debug version tells me a debug assertion failed,

Expression: _CrtIsValidHeapPointer(pUserData)

I'm not sure how to debug this because it runs fine in visual studio.

I'm kind of stumped and I hoped somebody could nudge me in the right direction based on this information. If I post the relevant code it'll be lengthy and it'll make many references other parts of code, and you might need to know something about pixci cameras.

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by Salem
0

> Expression: _CrtIsValidHeapPointer(pUserData)
The pointer you passed to realloc / free / delete was not valid.

I don't know why it "works" in the IDE and the debug version outside the IDE doesn't. AFAIK, it should be the same.

But the short of it is you need to start checking your use of dynamic memory. Bear in mind that when you find where the assert is coming from, you've found where it is reported. You've still got to find the root cause of the problem.

Don't you get a "debug" button with the popup assert?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.