Exception access violation
Closed this issue · 9 comments
GoogleCodeExporter commented
What steps will reproduce the problem?
Run code
What is the expected output? What do you see instead?
Execution protection violation
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00905a4d, pid=1184, tid=2212
#
# JRE version: 6.0_26-b03
# Java VM: Java HotSpot(TM) Client VM (20.1-b02 mixed mode, sharing windows-x86
)
# Problematic frame:
# C 0x00905a4d
#
# An error report file with more information is saved as:
# D:\Programing\Programi\OpenCV\hs_err_pid1184.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
What version of the product are you using? On what operating system?
Windows 7 (64bit), java 32bit, opencv 2.2 32bit
Please provide any additional information below.
That is the code:
import static com.googlecode.javacv.cpp.opencv_core.*;
import static com.googlecode.javacv.cpp.opencv_imgproc.*;
import static com.googlecode.javacv.cpp.opencv_highgui.*;
public class Vision {
public static void main(String [] args){
//smooth("pic.jpg");
openVideo("tree.avi");
}
public static void smooth(String filename) {
IplImage image = cvLoadImage(filename);
if (image != null) {
cvSmooth(image, image, CV_GAUSSIAN, 3);
cvSaveImage(filename, image);
cvReleaseImage(image);
}
}
public static void openVideo(String filename){
CvCapture video=cvCreateFileCapture(filename);
if(video==null){
return ;
}
cvReleaseCapture(video);
}
}
Smooth image works good. But opening window brings the error.
Original issue reported on code.google.com by klavdij....@gmail.com
on 9 Jul 2011 at 8:48
GoogleCodeExporter commented
This is a known problem with OpenCV on Windows. Don't use OpenCV, use
FFmpegFrameGrabber.
Original comment by samuel.a...@gmail.com
on 10 Jul 2011 at 2:41
- Changed state: Done
GoogleCodeExporter commented
I changed to FFmpegFrameGrabber but now I get UnsatisfiedLinkError.
I have downloaded FFmpeg (32 bit) and set system path.
Original comment by klavdij....@gmail.com
on 10 Jul 2011 at 7:30
GoogleCodeExporter commented
What is "FFmpeg (32 bit)" exactly?
Original comment by samuel.a...@gmail.com
on 11 Jul 2011 at 1:39
GoogleCodeExporter commented
FFmpeg 0.6.x or 0.7.x Precompiled for Windows. I downloaded it from here
http://hawkeye.arrozcru.org/builds/win32/shared/. I supose I need that for
FFmpegFrameGrabber.
Original comment by klavdij....@gmail.com
on 11 Jul 2011 at 5:19
GoogleCodeExporter commented
And which one did you try?
Original comment by samuel.a...@gmail.com
on 11 Jul 2011 at 7:21
GoogleCodeExporter commented
ffmpeg-git-95f163b-win32-shared.7z 06-May-2011 10:27 4.4M
The newes one.
Original comment by klavdij....@gmail.com
on 11 Jul 2011 at 7:36
GoogleCodeExporter commented
And what does the README.txt file of JavaCV say?
Original comment by samuel.a...@gmail.com
on 11 Jul 2011 at 7:44
GoogleCodeExporter commented
Sory, miss that completly. Now FFmpegFrameGrabber works but when I try to use
IplImage, I get the same error (UnsatisfiedLinkError).
I have tried OpenCV 2.3, OpenCV 2.2 (compiled for MinGW) and OpenCV 2.2 VS2010,
all the same. I set PATH and install Microsoft Visual C++ 2010 Redistributable
Package (x86). Java, OpenCV and windows (different computer) are 32bit. My PATH
is C:\JavaCV\OpenCV2.2\bin.
Original comment by klavdij....@gmail.com
on 11 Jul 2011 at 10:51
GoogleCodeExporter commented
As indicated in the README.txt file, if you use the latest version of JavaCV,
you will need OpenCV 2.3.0, not OpenCV 2.2.0
Original comment by samuel.a...@gmail.com
on 11 Jul 2011 at 11:04