I am receiving the following crash, mentioning:
/build/buildd/zbar-0.10+doc/zbar/refcnt.h:62: _zbar_refcnt: Assertion `rc >= 0' failed.
I would like to use to detect the position of the patterns finder. For the first loop, it succeeds but when it comes to the second loop, the program crashes there.
The code snippet that is relevent is as follows:
I instatiate 2 objects as private members as below:
In the constructor:
scanner.set_config(zbar::ZBAR_QRCODE, zbar::ZBAR_CFG_POSITION, 1);
In the detection function(to detect patterns finder):
std::cout << "Point1.." << std::endl;
//Set image data
std::cout << "Points2.." << std::endl; //not detected in the second loop at all
// Scan image
It is important to not that it is not reaching where I output as "Point2" at all in the second loop. I've checked any possible resource management issue, like forgetting to destroy object or similar but I couldn't find, in fact, I didn't use any object in the loop other than ones related to ZBar, even so, all of them are allocated on the stack.
My enviroments are:
Linux Ubuntu 10.04LTS
Thanks in advance.
Log in to post a comment.