Ask Your Question
0

Illegal instruction (SIGILL) a runtime

asked 2015-12-03 18:59:18 -0600

updated 2015-12-05 07:26:11 -0600

Hi everybody.

I received SIGILL on function convertTo() in this code:

int main()
{
    Mat Image = imread("d:\\TIMA\\baboon256.bmp", CV_LOAD_IMAGE_COLOR);
    namedWindow( "Original", CV_WINDOW_AUTOSIZE );
    imshow( "Original", Image );
    Mat ImageF;
    Image.convertTo(ImageF,CV_32FC3); 
}

I'm using openCV 3.0.0 compiled from sources with GCC 5.2 and i work under Code::Blocks IDE I have compiled openCV with SSE3 and SSE2 enabled . Since I use a very OLD computer may be this the cause? I must recompile all openCV libraries disabling SSE flags in CMake? Or exist another solution. Thank in advance for help and sorry for my very poor english ;-)

Processor is AMD Sempron 2600 + running on XP Sp3 (I will ask Santa Claus for a new PC ;-)

This is a fragment of disassembled output:

. . .

0x00409A49 movl $0x7,-0x288(%ebp)

0x00409A53 mov %eax,%ecx

0x00409A55 call 0x40b7f8 <cv::mat::convertto(cv::_outputarray const&amp;,="" int,="" double,="" double)="" const="">

0x00409A5A sub $0x18,%esp

0x00409A5D lea -0xa8(%ebp),%eax

0x00409A63 mov %eax,%ecx

0x00409A65 call 0x411d94 <cv::_outputarray::~_outputarray()< p="">

. . .

problem signaled at sub instruction following call to function convetTo

Tanks for the interest.

edit retag flag offensive close merge delete

Comments

What is your CPU model?

mshabunin gravatar imagemshabunin ( 2015-12-04 02:05:06 -0600 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-12-09 13:35:38 -0600

Finally i resolved my problem! Recompiling with GCC 4.8.1 toolchain (and with same Cmake configuration excluding as correctly suggested by mshabunin support for SSE>=2) everything seems to work fine. So I think that should be involved guys a GNU project rather than developers at OpenCV ! Because of the vastness of GNU GCC and OpenCV projects it's impossible for me to investigate autonomously the problem.

edit flag offensive delete link more
0

answered 2015-12-07 02:47:09 -0600

mshabunin gravatar image

Your CPU does not support SSE2 and later. You have to recompile OpenCV with these optimizations disabled. Use following cmake flags:

-DENABLE_SSE3=OFF -DENABLE_SSE2=OFF
edit flag offensive delete link more

Comments

I recompiled disabling support to SSE2 and SSE3 in cmake-gui but problem still stay. Anyhow thanks a lot for your interest in my problem.

Guido.Tuberoni gravatar imageGuido.Tuberoni ( 2015-12-08 15:16:32 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2015-12-03 18:59:18 -0600

Seen: 325 times

Last updated: Dec 09 '15