johnson-pkt / javacv

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

UnsatisfiedLinkError PatchGenerator.allocate #142

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. new opencv_features2d.PatchGenerator();

What version of the product are you using? On what operating system?
OSX 10.6.8
Java 1.6.0.29
Javacv 20111001

Please provide any additional information below.

Other javacv calls are working fine. It doesn't appear to be a library path 
issue, I wonder if the JNI bindings are correct?

Also I have:
DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib

Exception in thread "main" java.lang.UnsatisfiedLinkError: 
com.googlecode.javacv.cpp.opencv_features2d$PatchGenerator.allocate()V
    at com.googlecode.javacv.cpp.opencv_features2d$PatchGenerator.allocate(Native Method)
    at com.googlecode.javacv.cpp.opencv_features2d$PatchGenerator.<init>(opencv_features2d.java:493)
    at com.gong.jtld.test.TestPatchGen.main(TestPatchGen.java:38)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

Original issue reported on code.google.com by jerda...@speakeasy.net on 29 Dec 2011 at 7:19

GoogleCodeExporter commented 8 years ago
OpenCV 2.3.1a rev1

Original comment by jerda...@speakeasy.net on 29 Dec 2011 at 7:24

GoogleCodeExporter commented 8 years ago
Ok, weird work around on this...

opencv_features2d.LDetector unusedLd = new opencv_features2d.LDetector();
opencv_features2d.PatchGenerator gen = new opencv_features2d.PatchGenerator();
//success

So I think this is just not loading the JNI at all..
I notice LDetector has a 
static { load(); }
but PatchGenerator does not.

Original comment by jerda...@speakeasy.net on 29 Dec 2011 at 7:35

GoogleCodeExporter commented 8 years ago
Yes, seems to be missing. Thanks for reporting!

Original comment by samuel.a...@gmail.com on 30 Dec 2011 at 3:42

GoogleCodeExporter commented 8 years ago
Fixed in latest release

Original comment by samuel.a...@gmail.com on 8 Jan 2012 at 3:32