Fatal Errors and their Messages

137 views
Skip to first unread message

dlo...@googlemail.com

unread,
Sep 3, 2013, 4:21:08 PM9/3/13
to jav...@googlegroups.com
Hi,


i have had my fair share of fatal errors, never knew what to do and had to insert lots of system.outs to find the specific line of code that produced the error.
Such an error looks like this:
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_UNCAUGHT_CXX_EXCEPTION (0xe06d7363) at pc=0x7575c6e3, pid=10652, tid=12088
#
# JRE version: 7.0_25-b17
# Java VM: Java HotSpot(TM) Client VM (23.25-b01 mixed mode, sharing windows-x86 )
# Problematic frame:
# C  [KERNELBASE.dll+0xc6e3]  RaiseException+0x54

Now i know that all i have to do is look into the newest error report file, which contains this:
Stack: [0x016e0000,0x01730000],  sp=0x0171f0b8,  free space=252k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [KERNELBASE.dll+0xc6e3]  RaiseException+0x54
C  [msvcr100.dll+0x27819]  CxxThrowException+0x45
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  com.googlecode.javacv.cpp.opencv_imgproc.cvGetRectSubPix(Lcom/googlecode/javacv/cpp/opencv_core$CvArr;Lcom/googlecode/javacv/cpp/opencv_core$CvArr;Lcom/googlecode/javacv/cpp/opencv_core$CvPoint2D32f;)V+0
j  LEDPos.getRefinedLEDPosPerFrame([Ljava/awt/geom/Point2D$Double;Lcom/googlecode/javacv/cpp/opencv_core$IplImage;)[Ljava/awt/geom/Point2D$Double;+128
j  Driver.extractVideoData(Ljava/lang/String;Ljava/lang/String;)V+1009
j  Driver.<init>([Ljava/lang/String;)V+326
j  Driver.main([Ljava/lang/String;)V+5
v  ~StubRoutines::call_stub

That way i can pinpoint the location of the error without much hassle.

Now i'm wondering:
Is there a way to display this last list without having to look at the report files?
I've got no clue if it's possible to catch such a fatal error. But maybe it is. Or maybe there is a way to do some c/c++ wonders?


Cheers,

Chris

Samuel Audet

unread,
Sep 15, 2013, 10:58:15 AM9/15/13
to jav...@googlegroups.com
Hello,

On 09/04/2013 05:21 AM, dlo...@googlemail.com wrote:
> Now i'm wondering:
> Is there a way to display this last list without having to look at the report files?
> I've got no clue if it's possible to catch such a fatal error. But maybe
> it is. Or maybe there is a way to do some c/c++ wonders?

Hum, apart from "grepping" your way into the report files, there's no
other option that I know of. It's possible to compile OpenCV in debug
mode, and get more details with something like GDB, but I don't think
there's anything better offered for Java w.r.t. native development.

Anybody knows?

Ideally we would create an additional wrapper on top of all the OpenCV
functions that would check everything to not allow such errors to happen
on the native side, but this would require a lot of development...

Samuel

dlo...@googlemail.com

unread,
Sep 20, 2013, 12:39:50 PM9/20/13
to jav...@googlegroups.com
Hi Samuel,

thanks for the reply.

Yeah, i figured it wouldn't be that easy, but a man can dream. :)

I'm just thinking about the fatal error i posted to your error tracker since i (at that point) didn't know that the error would become clear once i checked the log file.
Maybe you can add some "if you have a fatal error, CHECK THE LOG FILE" to prevent such postings. :)

Chris

Samuel Audet

unread,
Sep 21, 2013, 9:40:06 AM9/21/13
to jav...@googlegroups.com
Hello,

On 09/21/2013 01:39 AM, dlo...@googlemail.com wrote:
> Hi Samuel,
>
> thanks for the reply.
>
> Yeah, i figured it wouldn't be that easy, but a man can dream. :)
>
> I'm just thinking about the fatal error i posted to your error tracker
> since i (at that point) didn't know that the error would become clear
> once i checked the log file.
> Maybe you can add some "if you have a fatal error, CHECK THE LOG FILE"
> to prevent such postings. :)

Ah, I see. Now that you mention it, there must be some nice page
somewhere on the net detailing debugging tricks for JNI. I'll keep that
in mind and post a link when I find one.

Let me know if you find one, thanks!

Samuel
Reply all
Reply to author
Forward
0 new messages