Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Opencv 3.0 java fatal error

Hi, I use openCv 3.0 from java. I am getting error when call detectMultiscale method.

A fatal error has been detected by the Java Runtime Environment:

#

SIGSEGV (0xb) at pc=0x00007f42e9d096ba, pid=21964, tid=139918287292160

#

JRE version: Java(TM) SE Runtime Environment (8.0_60-b27) (build 1.8.0_60-b27)

Java VM: Java HotSpot(TM) 64-Bit Server VM (25.60-b23 mixed mode linux-amd64 compressed oops)

Problematic frame:

C [libopencv_java300.so+0x8f56ba] cv::FeatureEvaluator::setImage(cv::_InputArray const&, std::vector<float, std::allocator<float=""> > const&)+0x40a

#

Stack: [0x00007f4143bfc000,0x00007f4143cfd000], sp=0x00007f4143cfa8a0, free space=1018k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [libopencv_java300.so+0x8f56ba] cv::FeatureEvaluator::setImage(cv::_InputArray const&, std::vector<float, std::allocator<float=""> > const&)+0x40a

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) J 2939 org.opencv.objdetect.CascadeClassifier.detectMultiScale_1(JJJ)V (0 bytes) @ 0x00007f43851cd407 [0x00007f43851cd3c0+0x47]

click to hide/show revision 2
No.2 Revision

updated 2015-10-07 08:47:35 -0600

berak gravatar image

Opencv 3.0 java fatal error

Hi, I use openCv 3.0 from java. I am getting error when call detectMultiscale method.

# A fatal error has been detected by the Java Runtime Environment:

#

Environment: # # SIGSEGV (0xb) at pc=0x00007f42e9d096ba, pid=21964, tid=139918287292160

#

tid=139918287292160 # # JRE version: Java(TM) SE Runtime Environment (8.0_60-b27) (build 1.8.0_60-b27)

1.8.0_60-b27) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.60-b23 mixed mode linux-amd64 compressed oops)

oops) # Problematic frame:

frame: # C [libopencv_java300.so+0x8f56ba] cv::FeatureEvaluator::setImage(cv::_InputArray const&, std::vector<float, std::allocator<float=""> std::allocator<float> > const&)+0x40a

const&)+0x40a #

#

Stack: [0x00007f4143bfc000,0x00007f4143cfd000], sp=0x00007f4143cfa8a0, free space=1018k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [libopencv_java300.so+0x8f56ba] cv::FeatureEvaluator::setImage(cv::_InputArray const&, std::vector<float, std::allocator<float=""> std::allocator<float> > const&)+0x40a

const&)+0x40a

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) J 2939 org.opencv.objdetect.CascadeClassifier.detectMultiScale_1(JJJ)V (0 bytes) @ 0x00007f43851cd407 [0x00007f43851cd3c0+0x47]

[0x00007f43851cd3c0+0x47]

Opencv 3.0 java fatal error

Hi, I use openCv 3.0 from java. I am getting error when call detectMultiscale method.

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f42e9d096ba, pid=21964, tid=139918287292160
#
# JRE version: Java(TM) SE Runtime Environment (8.0_60-b27) (build 1.8.0_60-b27)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.60-b23 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libopencv_java300.so+0x8f56ba]  cv::FeatureEvaluator::setImage(cv::_InputArray const&, std::vector<float, std::allocator<float> > const&)+0x40a
#



Stack: [0x00007f4143bfc000,0x00007f4143cfd000],  sp=0x00007f4143cfa8a0,  free space=1018k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libopencv_java300.so+0x8f56ba]  cv::FeatureEvaluator::setImage(cv::_InputArray const&, std::vector<float, std::allocator<float> > const&)+0x40a

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J 2939  org.opencv.objdetect.CascadeClassifier.detectMultiScale_1(JJJ)V (0 bytes) @ 0x00007f43851cd407 [0x00007f43851cd3c0+0x47]

this code crashes jvm in 5 seconds

for (int i = 0; i < 500; ++i) {
    Thread t = new Thread(new Runnable() {
        public void run() {

            CascadeClassifier faceDetector = new CascadeClassifier(CLASSIFIER_FACE);
            MatOfRect faceDetections = new MatOfRect();
            Mat uncroppedImage = Imgcodecs.imread(tmpFile.getAbsolutePath());

            faceDetector.detectMultiScale(uncroppedImage,
            faceDetections);
        }
    });
    t.start();

    }