huanganhen / javacv

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

Codecs not getting loaded for the latest release. #449

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Attaching a sample project. Run the MainActivity.java in android environment
2.It has all the supporting jars and libraries.
3.(Exception)java.lang.UnsatisfiedLinkError: Couldn't load gnustl_static from 
loader 
dalvik.system.PathClassLoader[dexPath=/data/app/com.example.javacv.test-1.apk,li
braryPath=/data/app-lib/com.example.javacv.test-1]: findLibrary returned null

Cannot load library: soinfo_relocate(linker.cpp:976): cannot locate symbol 
"avcodec_alloc_context2" referenced by "libjniavcodec.so".

What is the expected output? What do you see instead?

Load all the codes and convert the video file along with the audio. 
What version of the product are you using? On what operating system?
beb7137485d0 revision from latest changes. We tried with OS including linux and 
windows. Its an android application.

Please provide any additional information below.
We are trying to convert the video file along with the audio using the android 
app.
Please note that the attached jar files are from the latest revision of source 
code changes available on the website. We have used Maven project to create 
these jars. Any help is appreciated. :) 

Original issue reported on code.google.com by abhilash...@gmail.com on 22 Mar 2014 at 11:46

Attachments:

GoogleCodeExporter commented 9 years ago
How is this different from issue #446?

Original comment by samuel.a...@gmail.com on 23 Mar 2014 at 1:17

GoogleCodeExporter commented 9 years ago
Hey Samuel, i wasn't able to find an option to delete that post; hence you can 
ignore post 446 and help me with this (post 449) . thanks :)

Original comment by abhilash...@gmail.com on 23 Mar 2014 at 3:29

GoogleCodeExporter commented 9 years ago
I have managed to solve the problem. tickets can be close. thanks :)

Original comment by abhilash...@gmail.com on 25 Mar 2014 at 1:22

GoogleCodeExporter commented 9 years ago
Could you please provide a list of files that you have in your project 
directory? Thanks

Original comment by samuel.a...@gmail.com on 25 Mar 2014 at 1:23

GoogleCodeExporter commented 9 years ago
Ok, good!

BTW, if you could provide some details about how you fixed the issue, it might 
help someone else in the future that is having the same problem, thanks!

Original comment by samuel.a...@gmail.com on 25 Mar 2014 at 1:29

GoogleCodeExporter commented 9 years ago
Actually the main problem was that i had not included necessary " .so " files 
that are required inside "/libs/armeab" folder inside our main android project 
structure.
As far as the files are concerned, i had only one class file inside my android 
project along with the javacp and javacpp jar dependencies.

Original comment by abhilash...@gmail.com on 25 Mar 2014 at 5:58

GoogleCodeExporter commented 9 years ago
Having a similar problem running under android-x86:

Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol 
"av_fopen_utf8" referenced by "libjniavutil.so"...
    at java.lang.Runtime.loadLibrary(Runtime.java:364)
    at java.lang.System.loadLibrary(System.java:526)
    at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:535)
    at org.bytedeco.javacpp.Loader.load(Loader.java:410)
    at org.bytedeco.javacpp.Loader.load(Loader.java:353)
    at org.bytedeco.javacpp.avutil.<clinit>(avutil.java:10)
    ... 8 more

 Caused by: java.lang.UnsatisfiedLinkError: Couldn't load gnustl_static from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/data/app/xxx-app.apk", zip file "/data/data/xxx.app/code_cache/secondary-dexes/xxx-app.apk.classes2.zip", zip file "/data/data/xxx.app/code_cache/secondary-dexes/xxx-app.apk.classes3.zip", zip file "/data/data/xxx.app/code_cache/secondary-dexes/xxx-app.apk.classes4.zip"],nativeLibraryDirectories=[/data/app-lib/xxx-app, /vendor/lib, /system/lib, /system/lib/arm]]]: findLibrary returned null
    at java.lang.Runtime.loadLibrary(Runtime.java:358)
    at java.lang.System.loadLibrary(System.java:526)
    at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:535)
    at org.bytedeco.javacpp.Loader.load(Loader.java:401)
    ... 10 more

Any suggestions?

Original comment by roberto.andrade on 1 May 2015 at 6:01

GoogleCodeExporter commented 9 years ago
The .so files seem to all be there (javacv ones at least). Should there be a 
libgnustl_static.so either on system folders or included with the app?

Original comment by roberto.andrade on 1 May 2015 at 6:03

GoogleCodeExporter commented 9 years ago
@roberto.andrade gnustl_static is a _static_ library so there is no such thing 
as libgnustl_static.so, that's normal. JavaCPP is only trying to guess what the 
problem is, but this isn't it. Check your log files: Some helpful error message 
might be there.

Original comment by samuel.a...@gmail.com on 2 May 2015 at 11:41

GoogleCodeExporter commented 9 years ago
I did check the logs. Thats all I get. When I try to invoke the loader and
give it avutil.class to load I get the same issue. It can't load the class
because the native portion of it can't find this one function which
presumably by the prefix shouldnt be in that lib so wondering what the real
issue could be.

Original comment by roberto.andrade on 2 May 2015 at 11:55

GoogleCodeExporter commented 9 years ago
@roberto.andrade Let's see, if we can't get any more information about a crash 
that occurs on the Android platform, we should ask the Android guys about how 
to get more information. Could you do that for me?

Original comment by samuel.a...@gmail.com on 3 May 2015 at 12:16

GoogleCodeExporter commented 9 years ago
So the function its complaining it can't find should be also on the x86
version of avutil.so?

Original comment by roberto.andrade on 3 May 2015 at 1:19

GoogleCodeExporter commented 9 years ago
@roberto.andrade Yes, it works perfectly in the x86 emulator.

Original comment by samuel.a...@gmail.com on 3 May 2015 at 4:57

GoogleCodeExporter commented 9 years ago
OK. I'll try that. I'm actually running it on an android-x86.org VM.

Original comment by roberto.andrade on 3 May 2015 at 5:04