EXCEPTION_ACCESS_VIOLATION (0xc0000005)

157 views
Skip to first unread message

nourab

unread,
Oct 29, 2013, 2:31:17 PM10/29/13
to jav...@googlegroups.com
I'm developing an application that implements BOW model using javacv
I have a c++ code written using opencv that implements BOW model  (cpp jointed file ) that I try to convert it to javacv  (2 jointed java  file ) 

when I trying to run it I got this error : 
_____________________________
A fatal error has been detected by the Java Runtime Environment:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7350b1f2, pid=6900, tid=3984

JRE version: Java(TM) SE Runtime Environment (7.0_45-b18) (build 1.7.0_45-b18)
Java VM: Java HotSpot(TM) Client VM (24.45-b08 mixed mode, sharing windows-x86 )
Problematic frame:
C  [MSVCR90.dll+0x3b1f2]

Failed to write core dump. Minidumps are not enabled by default on client versions of Windows

An error report file with more information is saved as:
C:\Users\Desktop\workspaceJAVACV\demo\hs_err_pid6900.log

If you would like to submit a bug report, please visit:
http://bugreport.sun.com/bugreport/crash.jsp
The crash happened outside the Java Virtual Machine in native code.
See problematic frame for where to report the bug.
____________________
how to solve this problem ?
main.cpp
BOW.java
Main.java

Samuel Audet

unread,
Nov 3, 2013, 8:16:53 AM11/3/13
to jav...@googlegroups.com
Can you look inside the "C:\Users\Desktop\workspaceJAVACV\demo\hs_err_pid6900.log" file and find at which line exactly your code crashes? thanks!

nourab

unread,
Nov 13, 2013, 3:47:51 PM11/13/13
to jav...@googlegroups.com
Hi , 

I tried to run my code on ubuntu rather than on windows and i change it 
but i still have a fatal exception !

__________


# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xb6d2929a, pid=4484, tid=3062090560
#
# JRE version: Java(TM) SE Runtime Environment (7.0_45-b18) (build 1.7.0_45-b18)
# Java VM: Java HotSpot(TM) Server VM (24.45-b08 mixed mode linux-x86 )
# Problematic frame:
# V  [libjvm.so+0x4c029a]  jni_SetIntField+0x7a
#
# 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:
# /home/noura/workspaceJAVACV/demo/hs_err_pid4484.log
#
# If you would like to submit a bug report, please visit:
#
_____________


this is the code that i think it is the source of the error 
 _______________

public void extractBOWDescriptor (String baseurl , CvMat descriptors ) 
 {
File dir = new File(baseurl);

for (File child : dir.listFiles())
{
if (child.isDirectory())
{
System.out.println("Processing directory"+child.getAbsolutePath());
System.out.println("+"+child.getName());
extractBOWDescriptor(child.getAbsolutePath(), descriptors);
}
 
else 
{
if (child.getName().contains(".jpg"))
{
System.out.println("Processing file" + child.getName());
 
final CvMat image = cvLoadImageM(child.getAbsolutePath());
 
if (!image.empty())
{
   KeyPoint keypoints = new KeyPoint(null); // a verifier 
featureDetector.detect(image, keypoints, null);
 
   if (keypoints.isNull())
   {
    System.out.println("Warning: Could not find key points in image: "+
   
    child.getName()
    );
   }
 
   else 
   {
    CvMat BoWdescriptors = CvMat.create(keypoints.capacity(),128, opencv_core.CV_32F , 1);
    bDescriptorExtractor.compute(image, keypoints, BoWdescriptors, null, null);
   
       descriptors.put(descriptors);
  //     float label=Float.parseFloat(child.getName());
// labels.put(label);
   
    }
}
 
else 
{
System.out.println("Warning: Could not read image: "+ child.getName());
}
 
}
}
}
 
 }
______________________________________


---------------  T H R E A D  ---------------

Current thread (0xb6607800):  JavaThread "main" [_thread_in_vm, id=4490, stack(0xb67ec000,0xb683d000)]

siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x00000000

Registers:
EAX=0x00000000, EBX=0xb712c574, ECX=0xb774f000, EDX=0xb7154200
ESP=0xb683bce0, EBP=0xb683bd08, ESI=0xb6607800, EDI=0x00000052
EIP=0xb6d2929a, EFLAGS=0x00010246, CR2=0x00000000

Top of Stack: (sp=0xb683bce0)
0xb683bce0:   000007d0 00000004 0000000e 9fa3d330
0xb683bcf0:   b6607930 b6607800 b6607800 6d616270
0xb683bd00:   42420000 00000000 b6607930 6d5f88f9
0xb683bd10:   b6607930 00000000 00000052 00000000
0xb683bd20:   b683bd9c 00000000 b3624800 b35e9b59
0xb683bd30:   b712c574 b683be94 00000001 00000000
0xb683bd40:   00000000 00000000 63345a80 00000000
0xb683bd50:   597867b0 00000000 00000000 00000000 

Instructions: (pc=0xb6d2929a)
0xb6d2927a:   85 a9 00 00 00 8b 46 18 a9 00 00 00 30 0f 85 9b
0xb6d2928a:   00 00 00 c7 86 6c 01 00 00 06 00 00 00 8b 45 0c
0xb6d2929a:   8b 10 8b 83 a0 e2 ff ff 8b 4a 04 80 38 00 74 20
0xb6d292aa:   8b 45 14 89 45 ec 8d 45 ec 50 8b 45 0c 6a 49 6a 

Register to memory mapping:

EAX=0x00000000 is an unknown value
EBX=0xb712c574: <offset 0x8c3574> in /usr/lib/jvm/java-7-oracle/jre/lib/i386/server/libjvm.so at 0xb6869000
ECX=0xb774f000 is an unknown value
EDX=0xb7154200: <offset 0x8eb200> in /usr/lib/jvm/java-7-oracle/jre/lib/i386/server/libjvm.so at 0xb6869000
ESP=0xb683bce0 is pointing into the stack for thread: 0xb6607800
EBP=0xb683bd08 is pointing into the stack for thread: 0xb6607800
ESI=0xb6607800 is a thread
EDI=0x00000052 is an unknown value


Stack: [0xb67ec000,0xb683d000],  sp=0xb683bce0,  free space=319k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x4c029a]  jni_SetIntField+0x7a

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  com.googlecode.javacv.cpp.opencv_features2d$BOWImgDescriptorExtractor.compute(Lcom/googlecode/javacv/cpp/opencv_core$CvArr;Lcom/googlecode/javacv/cpp/opencv_features2d$KeyPoint;Lcom/googlecode/javacv/cpp/opencv_core$CvMat;Lcom/googlecode/javacv/cpp/opencv_core$IntVectorVector;Lcom/googlecode/javacv/cpp/opencv_core$CvMat;)V+0
j  pack.BOW.extractBOWDescriptor(Ljava/lang/String;Lcom/googlecode/javacv/cpp/opencv_core$CvMat;)V+248
j  pack.BOW.extractBOWDescriptor(Ljava/lang/String;Lcom/googlecode/javacv/cpp/opencv_core$CvMat;)V+99
j  pack.Main.main([Ljava/lang/String;)V+67
v  ~StubRoutines::call_stub
__________________________________________________
Reply all
Reply to author
Forward
0 new messages