Assertion failed (ssize.area > 0) cv::resize, Bus error on ARMHF
Edit: I have found out that the error listed in the title also occurs on amd64 machines after attempting to debug the application and terminating it prematurely. All I can assume is buggy OpenCV/V4L code causing this. Once again a reboot fixes the issue until the next debug attempt. Running works fine.
This problem occurs only sometimes: when calling cv::resize my application crashes and prints "Assetion failed (ssize.area > 0)." I use the same size (30, 32) to scale my matrix every time and the src matrix is set by the camera. I have a feeling this is a bug in opencv or the camera API it uses (V4L). Using a different camera temporarily solves the problem. When I run this program on a machine using ARMHF instead of AMD64 the program quits printing "Bus error." The OpenCV version I used to write the application is 2.4.8, the version on the ARMHF machine is 2.3.1. I am using Debian and c++11 if it matters.
The offending code is
cv::resize(videoMat, scaled, scaledSize, 0, 0, CV_INTER_AREA);
Where videoMat is a cv::Mat updated by an instance of cv::VideoCapture, scaled is a cv::Mat to hold the scaled matrix information, and scaledSize is the size I wish to scaled to (30, 32).
if assert(ssize>0) failed, it means that your src image had empty size(was invalid).
After a reboot the application stops crashing and printing that error message, it must be a bug in the camera API. I can probably work around this problem, but what about the bus error on ARMHF?
oh, dear, honestly - i got no idea, what you're talking about. (ARMHF ?)
might be a good idea now, to edit your question again, and show some (offending) code.
Sorry for the late reply, I have a cubieboard (an embeded system) which uses the ARMHF architecture (HF stands for hardware float, but it is not too important). The program is running on this embeded system. The offending code is simply a call to cv::resize(), however the error seems to cease on my AMD64 system (a laptop computer) after a reboot. On my embeded system I always get the error "Bus error" when trying to run the program.