1
votes

I try to run the code from calibration, and i'm stuck with this error:

Debug Assertion Failed!

Program:
C:\Users\openCV\Desktop\Git\AzTest\Debug\AzTest.exe
File: c:\program files (x86)\microsoft visual studio 14.0\vc\include\xmemory0
Line: 94

Expression: "_Count <= (size_t)(-1) / _Sz" && 0

For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts.

(Press Retry to debug the application)

To be honest I don't know what else should I do, or why is this error happening.

What is to be noted is that the code used to work on the same PC.

I've modified the code (when it worked, and it worked after I done the changes), code can be found here (The project is there, also it is configured for having the OpenCV directory on C:\opencv.

1
The assertion contain the "&& 0" which is the same as "false" -- so the assertion is always false -- that sounds like intentional, and you will have to get the original author of the code to look at the problem, or look at the surround code parts yourself. - Soren
@Soren, the problem is that I even reinstalled windows, visual & openCV, thus the problem it is still there. What bothers me even more, is that it worked. - EnkiduSlayer
You don't have sufficient information to diagnose the problem -- the surrounding code to the assert will have to be posted in the question as a minimum. - Soren

1 Answers

0
votes

After hours of digging I found the answer. It was a miss configuration imported from another project. *Project properties -> Linker -> Input -> Additional Dependencies: opencv_ts300d.lib;opencv_world300d.lib;; (the right way for opencv3). Mine was: opencv_ts300d.lib;opencv_world300.lib; Afterwards I get intro "missing MSVCR120D.dll", I fixed that by changing the opencv version to OpenCV310. Tried to fix that missing dll problem by uninstalling and reinstalling all the redistributable that I could find on Microsoft website.

Also if you will have "opencv_world310d.dll" missing, just copy&paste it into the project release/debug folder.