rindarith / javacv

Automatically exported from code.google.com/p/javacv
GNU General Public License v2.0
0 stars 0 forks source link

JNI crash on image filter functions (cvSmooth) #36

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Compile the java code.
2.Run the class file and specify the input image file, for example, java CvTest 
cloud.jpg
3.The error message will display

What is the expected output? What do you see instead?
It is a fairly simple javacv code and the expected output is "Program 
terminated normally". Instead I saw a fatal JVM error. The screenshot is 
included in the attached file.

What version of the product are you using? On what operating system?
I am using OpenCV 2.1.0 and the latest version of javacv. 
(javacv-bin-20101104.zip from the download page). The Java version I use is as 
follows:
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Server VM (build 17.1-b03, mixed mode)

The operating system is Ubuntu 10.04 LTS

Please provide any additional information below.
1. I wrote a C++ version of the CvTest class. It works on my machine using 
OpenCV.
2. Besides cvSmooth() method, cvFilter2D also crashed in the same environment. 
3. The CvTest.java is the source file. I also included a sample image.
4. The search results I found on the Internet suggest some relation between 
this error and the SSE instructions. But I found few details about how to fix 
this problem.

Original issue reported on code.google.com by weiyi...@gmail.com on 27 Nov 2010 at 4:38

Attachments:

GoogleCodeExporter commented 9 years ago
I can add that I have just encountered what might be a related issue. 

We crash in cvDliate or cvErode on an IplImage.create(640, 480, IPL_DEPTH_8U, 
1) image that is otherwise perfectly well behaved (for example, we can 
cvFindContours and they are valid). cvSmooth does however work fine.

Fresh download and build of OpenCV 2.1.0. OS X 10.6.4, 64 bit VM. Specifically:

java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)

The docs claim SSE issue does not apply to 64 bit environments, but I'll try 
disabling SSE and report back. 

Original comment by marc%ope...@gtempaccount.com on 27 Nov 2010 at 5:27

GoogleCodeExporter commented 9 years ago
I managed to solve the problem after reading the Wiki. I recompiled OpenCV with 
SSE, SSE2 and MMX options off and now the problem works correctly.

Original comment by weiyi...@gmail.com on 27 Nov 2010 at 9:10

GoogleCodeExporter commented 9 years ago
This SSE issue really does need to be fixed...

Marc, does disabling SSE actually help with 64-bit Java on Mac OS X?

Original comment by samuel.a...@gmail.com on 2 Dec 2010 at 3:08

GoogleCodeExporter commented 9 years ago
Should be fixed in latest version. If not, please reopen. Otherwise, please 
change status to "Verified", thank you.

Original comment by samuel.a...@gmail.com on 19 Feb 2011 at 3:50