Ask Your Question
2

A fatal error when running opencv tutorial example

asked 2013-06-25 00:55:39 -0600

ab16 gravatar image

updated 2013-06-25 00:56:18 -0600

Hello,

I followed the installation instructions in http://docs.opencv.org/doc/tutorials/introduction/desktop_java/java_dev_intro.html.
Afterwards I tried to run the example.
Unfortunately even when running only:
public static void main(String[] args) {
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
}
I get the following error:

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

SIGSEGV (0xb) at pc=0x00007feb929073d9, pid=34814, tid=140652798998272

JRE version: 6.0_27-b27

Java VM: OpenJDK 64-Bit Server VM (20.0-b12 mixed mode linux-amd64 compressed oops)

Derivative: IcedTea6 1.12.5

Distribution: Ubuntu 12.04 LTS, package 6b27-1.12.5-0ubuntu0.12.04.1

Problematic frame:

C [libopencv_java245.so+0x6ef3d9] cv::Mutex::~Mutex()+0x19

Will appreciate your advice on the issue.

Thanks.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-10-01 17:25:33 -0600

lobi gravatar image

I have the sam problem when I runing this program.

import org.opencv.core.CvType;
import org.opencv.core.Mat;
import org.opencv.core.Core;

public class Main {
    public static void main(String[] args) {
        System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
        Mat m  = Mat.eye(3, 3, CvType.CV_8UC1);
        System.out.println("m = " + m.dump());
    }
}

Output:

  m = [1, 0, 0;
  0, 1, 0;
  0, 0, 1]
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f1d0f572ff4, pid=21349, tid=139763725203264
#
# JRE version: 7.0_25-b30
# Java VM: OpenJDK 64-Bit Server VM (23.7-b01 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libopencv_java246.so+0x37cff4]  cv::Mutex::~Mutex()+0x14
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# ~/eclipse_work/hihi/hs_err_pid21349.log
#
edit flag offensive delete link more

Comments

I found a solution. I made new installation (follow this steps https://help.ubuntu.com/community/OpenCV). Before I follow this steps http://docs.opencv.org/2.4.4-beta/doc/tutorials/introduction/desktop_java/java_dev_intro.html)

Then I copy libopencv_java246.so from new installation to lib folder of old installation.

Best

lobi gravatar imagelobi ( 2013-10-01 19:29:29 -0600 )edit

Question Tools

Stats

Asked: 2013-06-25 00:55:39 -0600

Seen: 1,539 times

Last updated: Oct 01 '13