keke77 / javacv

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

Fatal error when trying to get the position of a found marker (ARToolKitPlus) #275

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try the attached program with standard files from ARToolKitPlus' "multi" 
sample (LogitechPro4000.dat, markerboard_480-499.cfg and jpg) 

What is the expected output? What do you see instead?
line 42: output of the current marker's id (which works)
line 45: output of the first entry of the DoublePointer that contains the 
marker's position

using pospointer.get(0) results in a fatal error:

# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6e60589d, pid=3924, tid=7768
#
# JRE version: 7.0_09-b05
# Java VM: Java HotSpot(TM) Client VM (23.5-b02 mixed mode, sharing windows-x86 
)
# Problematic frame:
# C  [jniopencv_core.dll+0x589d]  
Java_com_googlecode_javacpp_DoublePointer_get__I+0x5d
#

I also tried to access any of the functions of the ARMarkerInfo variable armi 
(for example armi.dir()) which also results in a fatal error:
# C  [jniARToolKitPlus.dll+0x1c248]  
Java_com_googlecode_javacv_cpp_ARToolKitPlus_00024ARMarkerInfo_dir__+0x58

What version of the product are you using? On what operating system?

OS: Windows 7 x86
OpenCV: 2.4.3
JavaCV: 0.3
(IDE is Eclipse 3.7.2, but i guess that doesn't matter?)

Original issue reported on code.google.com by Dlo...@googlemail.com on 31 Jan 2013 at 10:04

Attachments:

GoogleCodeExporter commented 9 years ago
This works fine here:
    for (int i = 0; i < tracker.getNumDetectedMarkers(); i++) {
        armi = tracker.getDetectedMarker(i);
        System.out.println(armi.dir());
    }
Let me know if it still doesn't work, and please post your questions on the 
mailing list next time if possible, thank you

Original comment by samuel.a...@gmail.com on 2 Feb 2013 at 1:25

GoogleCodeExporter commented 9 years ago
I wondered why it worked for you and installed everything on my home pc (the 
error occured at work).
Still got the same error.

And then i saw that you used tracker.getDetectedMarker(i), while i used 
tracker.getDetectedMarker(markercount.get(i))

Can't believe, i didn't see that. Yet i wonder why the getDetectedMarker() 
function didn't throw an "out of bounds" error or something similar.

Sorry for my blindness (and not posting this problem on the mailing list) and 
many thanks for looking into this so quickly.

Best regargds,
Chris

Original comment by Dlo...@googlemail.com on 2 Feb 2013 at 3:19

GoogleCodeExporter commented 9 years ago
Well, it would be nice of ARToolKitPlus to throw errors in such cases (this 
isn't JavaCV's responsibility). I wonder if newer version do that (issue #234)?

Original comment by samuel.a...@gmail.com on 2 Feb 2013 at 3:30

GoogleCodeExporter commented 9 years ago
FYI, I've made changes to support a newer version of ARToolKitPlus:
http://code.google.com/p/javacv/source/detail?r=b80bcf5cceacc8453511890fed9d93c8
7fa91d71
Maybe that fixes this issue...

Original comment by samuel.a...@gmail.com on 22 Jun 2013 at 3:01