cvWarpAffine crashes gives Illegal instruction on 64bit Ubuntu 10.04 (Bug #1650)


Added by Jan Nörtemann about 13 years ago. Updated almost 13 years ago.


Status:Cancelled Start date:2012-03-05
Priority:Normal Due date:
Assignee:Marina Kolpakova % Done:

0%

Category:imgproc, video
Target version:2.4.0
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

Hello,

this code keeps crashing on my machine:

#include <opencv/cv.h>

int main()
{
                IplImage* src = cvCreateImage(cvSize(100, 100), IPL_DEPTH_8U, 1);
                IplImage* dst = cvCreateImage(cvSize(100, 100), IPL_DEPTH_8U, 1);

                float m[6];
                CvMat M = cvMat( 2, 3, CV_32F, m );
                int w = src->width;
                int h = src->height;
                cv2DRotationMatrix(cvPoint2D32f(w*0.5f, h*0.5f), 45.0, 1.0, &M);
                cvWarpAffine(src, dst, &M);
                printf("done.\n");
                return 0;
}

I've compiled it on Ubuntu 10.04: 2.6.32-38-generic #83-Ubuntu SMP Wed Jan 4 11:12:07 UTC 2012 x86_64 GNU/Linux with g++ (Ubuntu 4.4.3-4ubuntu5) 4.4.3. I have an Intel Core2Duo L7400 and I am using OpenCV 2.3.1 which I've installed by following your install guide: http://opencv.willowgarage.com/wiki/InstallGuide. This is was gdb says:

(gdb) run
Starting program: /tmp/warpTest 
[Thread debugging using libthread_db enabled]

Program received signal SIGILL, Illegal instruction.
0x00007ffff68c2b0e in cv::RemapVec_8u::operator()(cv::Mat const&, void*, short const*, unsigned short const*, void const*, int) const ()
   from /usr/local/lib/libopencv_imgproc.so.2.3
(gdb) bt
#0  0x00007ffff68c2b0e in cv::RemapVec_8u::operator()(cv::Mat const&, void*, short const*, unsigned short const*, void const*, int) const ()
   from /usr/local/lib/libopencv_imgproc.so.2.3
#1  0x00007ffff68d0b0c in void cv::remapBilinear<cv::FixedPtCast<int, unsigned char, 15>, cv::RemapVec_8u, short>(cv::Mat const&, cv::Mat&, cv::Mat const&, cv::Mat const&, void const*, int, cv::Scalar_<double> const&) () from /usr/local/lib/libopencv_imgproc.so.2.3
#2  0x00007ffff68dce12 in cv::remap(cv::_InputArray const&, cv::_OutputArray const&, cv::_InputArray const&, cv::_InputArray const&, int, int, cv::Scalar_<double> const&) () from /usr/local/lib/libopencv_imgproc.so.2.3
#3  0x00007ffff68e142c in cv::warpAffine(cv::_InputArray const&, cv::_OutputArray const&, cv::_InputArray const&, cv::Size_<int>, int, int, cv::Scalar_<double> const&) () from /usr/local/lib/libopencv_imgproc.so.2.3
#4  0x00007ffff68e5fff in cvWarpAffine () from /usr/local/lib/libopencv_imgproc.so.2.3
#5  0x0000000000400fa7 in main ()

With 3 channel images the code works fine.

cheers,
jan


Associated revisions

Revision dd01861d
Added by Marina Kolpakova almost 13 years ago

test case from ticket #1650

Revision 9bc347c8
Added by Roman Donchenko over 11 years ago

Merge pull request #1650 from jet47:fix-gpu-bgsegm-sample

History

Updated by Alexander Shishkov almost 13 years ago

  • Target version deleted ()
  • Category set to imgproc, video

Updated by Marina Kolpakova almost 13 years ago

We can not reproduce your bug on our build-bot system with analogical build configuration. I added your test sample in our automated tests.

Updated by Marina Kolpakova almost 13 years ago

  • Status changed from Open to Cancelled
  • Assignee set to Marina Kolpakova

Updated by Alexander Shishkov almost 13 years ago

  • Target version set to 2.4.0

Also available in: Atom PDF