Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.UnsatisfiedLinkError: org.bytedeco.javacpp.avutil in Marshmallow #245

Closed
boybeak opened this issue Oct 6, 2015 · 59 comments
Closed
Labels

Comments

@boybeak
Copy link

boybeak commented Oct 6, 2015

mFrameRecorder = new FFmpegFrameRecorder(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MOVIES).getAbsolutePath() + File.separator + "new.mp4", 480, 480, 1);

crash happened in this code after i update my nexus5 to Marshmallow,and it works fine before.And the error log below:

10-06 16:15:28.015 22095-22095/com.beak.petsfbi E/AndroidRuntime: FATAL EXCEPTION: main
10-06 16:15:28.015 22095-22095/com.beak.petsfbi E/AndroidRuntime: Process: com.beak.petsfbi, PID: 22095
10-06 16:15:28.015 22095-22095/com.beak.petsfbi E/AndroidRuntime: java.lang.UnsatisfiedLinkError: org.bytedeco.javacpp.avutil
10-06 16:15:28.015 22095-22095/com.beak.petsfbi E/AndroidRuntime:     at java.lang.Class.classForName(Native Method)
10-06 16:15:28.015 22095-22095/com.beak.petsfbi E/AndroidRuntime:     at java.lang.Class.forName(Class.java:324)
10-06 16:15:28.015 22095-22095/com.beak.petsfbi E/AndroidRuntime:     at org.bytedeco.javacpp.Loader.load(Loader.java:390)
10-06 16:15:28.015 22095-22095/com.beak.petsfbi E/AndroidRuntime:     at org.bytedeco.javacpp.Loader.load(Loader.java:358)
10-06 16:15:28.015 22095-22095/com.beak.petsfbi E/AndroidRuntime:     at org.bytedeco.javacpp.avcodec$AVPacket.<clinit>(avcodec.java:1407)
10-06 16:15:28.015 22095-22095/com.beak.petsfbi E/AndroidRuntime:     at org.bytedeco.javacv.FFmpegFrameRecorder.<init>(FFmpegFrameRecorder.java:149)
10-06 16:15:28.015 22095-22095/com.beak.petsfbi E/AndroidRuntime:     at com.beak.petsfbi.activity.VideoRecorderActivity.startRecord(VideoRecorderActivity.java:177)
10-06 16:15:28.015 22095-22095/com.beak.petsfbi E/AndroidRuntime:     at com.beak.petsfbi.activity.VideoRecorderActivity$1.onClick(VideoRecorderActivity.java:57)
10-06 16:15:28.015 22095-22095/com.beak.petsfbi E/AndroidRuntime:     at android.view.View.performClick(View.java:5198)
10-06 16:15:28.015 22095-22095/com.beak.petsfbi E/AndroidRuntime:     at android.view.View$PerformClick.run(View.java:21147)
10-06 16:15:28.015 22095-22095/com.beak.petsfbi E/AndroidRuntime:     at android.os.Handler.handleCallback(Handler.java:739)
10-06 16:15:28.015 22095-22095/com.beak.petsfbi E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:95)
10-06 16:15:28.015 22095-22095/com.beak.petsfbi E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:148)
10-06 16:15:28.015 22095-22095/com.beak.petsfbi E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5417)
10-06 16:15:28.015 22095-22095/com.beak.petsfbi E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method)
10-06 16:15:28.015 22095-22095/com.beak.petsfbi E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
10-06 16:15:28.015 22095-22095/com.beak.petsfbi E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
@phajduk
Copy link

phajduk commented Oct 6, 2015

+1 I have the same problem.

@saudet
Copy link
Member

saudet commented Oct 7, 2015

Did they break backward compatibility? Is there any info on that from Google?

@boybeak
Copy link
Author

boybeak commented Oct 7, 2015

@saudet My android studio version is 1.4, compileSdkVersion 23, buildToolsVersion 23.0.0

@boybeak
Copy link
Author

boybeak commented Oct 7, 2015

@saudet I've been tried all the solution in #133 ,but not working

@boybeak
Copy link
Author

boybeak commented Oct 7, 2015

@saudet Similar problem find here:https://code.google.com/p/android-developer-preview/issues/detail?id=3028 , it seems no solution.

@tomerhatav
Copy link

+1 I have the same problem here. :(

@boybeak
Copy link
Author

boybeak commented Oct 9, 2015

@zavadpe
Copy link

zavadpe commented Oct 21, 2015

As boybeak wrote, official release page explicitly refers to loading of shared libraries with text relocations:

On previous versions of Android, if your app requested the system to load a shared library with text relocations, the system displayed a warning but still allowed the library to be loaded. Beginning in this release, the system rejects this library if your app's target SDK version is 23 or higher.

@saudet
Copy link
Member

saudet commented Oct 21, 2015

@zavadpe If you know what we need to do for that, please update the instructions on this wiki page: https://github.com/bytedeco/javacpp-presets/wiki/Build-Environments

@zavadpe
Copy link

zavadpe commented Oct 21, 2015

I did only simple workaround for now as suggested in the text I quoted - I decreased target SDK to 22 in my project.
Long term solution requires ffmpeg libraries (I saw avutil causing an error) to be built without text relocations but I have no experience how to do that. But developer site suggests to go here where good instructions can be found how to find those textrels. However I may take look at it later.

@ryango
Copy link

ryango commented Nov 2, 2015

What version of ffmpeg is being used in the binary distro of javacv? According to
http://stackoverflow.com/questions/32346402/libavcodec-so-has-text-relocations there are 2 commits that change how android is built
FFmpeg/FFmpeg@f963f80
FFmpeg/FFmpeg@cb416a7
Looks like they have been around since 2.6?

@ryango
Copy link

ryango commented Nov 5, 2015

Actually not since 2.6. Seems like it's only in unreleased master. Pulling latest Ffmpeg master and compiling with ndk-r10e in checking avcodec.so. Looks like it'll be with 2.9 when they gm that release. Having linker issues now with the jni when I just swap out the .so files (expected). I guess I have to build javacv, javacpp and ffmpeg from scratch.

@ryango
Copy link

ryango commented Nov 5, 2015

Haha I'm just going to keep spamming here, apologies. Looks like has been in since 2.6. Verified building with r10e and 2.8 release HEAD I get no text relocations in avcodec. Same linker issue with the jni. Will try to rebuild all the deps, though you should consider pulling latest ffmpeg if you haven't and building the android libs before everyone who uses javacv in android comes calling.

@saudet
Copy link
Member

saudet commented Nov 6, 2015

JavaCV 1.1 links with FFmpeg 2.8.1, and that doesn't work? What is the difference between your binaries and the release?

@ryango
Copy link

ryango commented Nov 6, 2015

So our configure is likely a little different, not sure if that would do it. Combining my ffmpeg .so files with the rest in the JavaCV 1.1 distro yields

java.lang.UnsatisfiedLinkError: dlopen failed: cannot find "libavutil.so" from verneed[0] in DT_NEEDED list for "/data/app/<packagename>/lib/arm/libjniavcodec.so

Running arm-linux-androideabi-readelf interestingly shows no text relocations for my binaries but they are present for yours. Maybe theres an encoder enabled that causes that? I'm kinda feeling around in the dark right now as I'm not too experienced with native builds. We've had a working build for 2 years that we've remained as hands off as possible with since it just worked.

./configure \
--prefix=$HOME/android \
--enable-shared \
--enable-runtime-cpudetect \
--disable-encoders \
--disable-bsfs \
--disable-decoders \
--enable-decoder=ac3 \
--enable-encoder=libvorbis \
--enable-muxer=matroska \
--enable-muxer=webm \
--enable-decoder=binkaudio_dct \
--enable-decoder=binkaudio_rdft \
--disable-parsers \
--enable-libvpx --enable-encoder=libvpx_vp8 --extra-cflags="-I$thisdir/vpx/include" --extra-ldflags="-L$thisdir/vpx/lib" \
--enable-libvorbis --extra-cflags="-I$prefixdir/include " --extra-ldflags="-L$prefixdir/lib" \
--disable-outdevs \
--disable-indevs \
--disable-filters \
--enable-cross-compile \
--cc=$ANDROID_BIN/arm-linux-androideabi-gcc \
--sysroot=$ANDROID_ROOT \
--target-os=linux \
--arch=arm \
--extra-cflags="-DANDROID -fPIC -ffunction-sections -funwind-tables -fstack-protector -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mfpu=neon -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300" \
--extra-ldflags="-nostdlib -Wl,--fix-cortex-a8 -Werror=implicit-function-declaration" \
--extra-libs="-lgcc -ldl -lz -lm -lc -llog" \
--disable-stripping \
--disable-symver \
--disable-programs

@Iqra786
Copy link

Iqra786 commented Dec 23, 2015

Google already closed this issue:
https://code.google.com/p/android-developer-preview/issues/detail?id=3028
FFmpeg also closed this issue: They said this intended functionality and not a bug.
https://trac.ffmpeg.org/ticket/4928
I am stuck.

@saudet
Copy link
Member

saudet commented Dec 24, 2015

It seems to be a problem with one of the dependent libraries. So, FFmpeg rebuilt without any of them shouldn't cause this issue.

@Iqra786
Copy link

Iqra786 commented Dec 24, 2015

I don't have knowledge how to build new binary.
Following ref from the https://trac.ffmpeg.org/ticket/4928 discussion

"It should be emphasized that --disable-asm does not fix anything, it just creates horribly slow FFmpeg binaries."

@alexbatashev
Copy link

As stated here (in russian) some libraries were excluded from Marshmallow. For example, OpenSSL was replaced with BoringSSL. May this cause crash? FFmpeg can work with SSL, so... Another version is stated here

@ryango
java.lang.UnsatisfiedLinkError: dlopen failed: cannot find "libavutil.so" from verneed[0] in DT_NEEDED list for "/data/app/<packagename>/lib/arm/libjniavcodec.so
It's not surprising. There's no such file. Actually, there are no javacv files at all. But there are Realm files (which is cinnected to my project). That makes me think it is something wrong with the jar itself. Did you try putting .so files to /src/main/jniLibs?

@ongakuer
Copy link

@ryango
I have built javacpp-presets (1.2-SNAPSHOT) , FFmpeg (2.8.4/2.8.5)
It worked in Marshmallow and libavcodec.so has no text relocations!

@ryango
Copy link

ryango commented Jan 21, 2016

@ongakuer well done!

@ongakuer
Copy link

I try to built ffmpeg 2.8.1( custom cppbuild ) with javacpp (1.2-SNAPSHOT) and still worked in Marshmallow.

It's seems weird…

javacpp 1.1, javacpp-presets 1.1, FFmpeg 2.8.1, Ubuntu 14.04
libavcodec.so has text relocations.

javacpp 1.2-SNAPSHOT, javacpp-presets 1.2-SNAPSHOT, FFmpeg 2.8.1/2.8.4/2.8.5, OS X 10.11.3
libavcodec.so has no text relocations.

@saudet
Copy link
Member

saudet commented Jan 22, 2016

@ongakuer Maybe it has something to do with the changes I've made for issue bytedeco/javacpp-presets#133?

@ongakuer
Copy link

@saudet Maybe you are right,Thanks.

@tomerhatav
Copy link

@saudet will you release anytime soon a new version of javacv that fixes the text relocations bug?

@saudet
Copy link
Member

saudet commented Jan 24, 2016

@tomerhatav Well, if you could make a branch that works with JavaCPP 1.1, I'd release that right away, sure.

@fuyacho-takatsuji
Copy link

Hi,
I imported @ongakuer target.gz( .so files and 2 jar files) to Studio and tried RecordActivity.java.
I have the following error... It says "bit_rate" method is not found. Any clue on this?


Process: javacv.bytedeco.org.recordactivirycv, PID: 571
java.lang.NoSuchMethodError: No virtual method bit_rate(I)Lorg/bytedeco/javacpp/avcodec$AVCodecContext; in class Lorg/bytedeco/javacpp/avcodec$AVCodecContext; or its super classes (declaration of 'org.bytedeco.javacpp.avcodec$AVCodecContext' appears in /data/app/javacv.bytedeco.org.recordactivirycv-1/base.apk)
at org.bytedeco.javacv.FFmpegFrameRecorder.startUnsafe(FFmpegFrameRecorder.java:369)
at org.bytedeco.javacv.FFmpegFrameRecorder.start(FFmpegFrameRecorder.java:288)
at javacv.bytedeco.org.recordactivirycv.RecordActivity.startRecording(RecordActivity.java:200)
at javacv.bytedeco.org.recordactivirycv.RecordActivity.onClick(RecordActivity.java:493)
at android.view.View.performClick(View.java:5204)
at android.view.View$PerformClick.run(View.java:21153)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

@ongakuer
Copy link

@fuyacho-takatsuji
Don't use JavaCV 1.1 Release Version. Download latest JavaCV (28065a0) from github and import to your project. Maybe you need remove unused file.

PS: I move .so files to armeabi-v7a

@fuyacho-takatsuji
Copy link

@ongakuer ,
Thanks for the quick response. I downloaded the latest javaCV files, but
got a lot of errors when I compiled all the files on Studio. As you said
I surely need to remove unnecessary files. Would you help how to find
the necessary files/remove unnecessary files?

I am new to git hub as well...

@ongakuer
Copy link

@fuyacho-takatsuji
I keep these files :

  • AndroidFrameConverter.java
  • Frame.java
  • FFmpegFrameFilter.java
  • FrameConverter.java
  • FFmpegFrameGrabber.java
  • FrameFilter.java
  • FFmpegFrameRecorder.java
  • FrameGrabber.java
  • FFmpegLogCallback.java
  • FrameRecorder.java

@coralinejones1985
Copy link

@ongakuer Were you using android-ndk-r10e to build ffmpeg? Can you, please, show how your .sh file looks like?

@ongakuer
Copy link

@coralinejones1985
Yes, Android-ndk-r10e. I use javacpp to build ffmpeg.
javaccp cppbuild.sh
javaccp-ffmpeg cppbuild.sh

@saudet
Android-ndk-r11 has released.

Updated YASM to version 1.3.0

@fuyacho-takatsuji
Copy link

@ongakuer
Thank you very much for your advice.
I commented out some java.beans stuff in FrameGrabber.java to
have the code run through Studio. I can now record .mp4 file
on both KitKat and Marshmallow.

@saudet
Copy link
Member

saudet commented Mar 11, 2016

Thanks @ongakuer!

I've narrowed it down to libx264. If I build without specifying --enable-libx264, I get no text relocations. Indeed, it's something they seem to have fixed very recently:
[x264-devel] arm: Eliminate text relocations in asm
https://mailman.videolan.org/pipermail/x264-devel/2016-January/011527.html
So let me try with the latest source code...

@saudet
Copy link
Member

saudet commented Mar 11, 2016

Yes, it's fixed with FFmpeg 3.0 and latest libx264!

@coralinejones1985
Copy link

I've built 1.2-SNAPSHOT (javacv, javacpp, ffmpeg and opencv jars) to get "no relocations"-version, but still got ones. Also some errors appeared:
Failed to load class org.bytedeco.javacv.FFmpegFrameRecorder
NoClassDefFoundError: java.lang.ClassNotFoundException: org.bytedeco.javacpp.avutil
UnsatisfiedLinkError: dlopen failed: /lib/x86/libavcodec.so: has text relocations
UnsatisfiedLinkError: dalvik.system.PathClassLoader couldn't find "libgnustl_static.so"

I have no idea of what am I doing wrong..

@saudet
Copy link
Member

saudet commented Mar 19, 2016

But it wasn't fixed for android-x86. I had to disable asm code for libopenh264 and libx264 to get binaries without text relocations.

@pedroSG94
Copy link

I tried with those binaries and know crash with this error:

A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 16167

Only a line no more log.
According this post:
https://hub.jmonkeyengine.org/t/adnroid-project-fails-with-a-libc-fatal-signal-11-sigsegv-code-2-fault-addr-0x40a00000-in-tid-21434-gcdaemon/34034/3

Native libc tries to access invalid address

@pedroSG94
Copy link

more log for my error:

05-13 12:04:22.199 20760-20760/com.example.pedro.ffmpeg30 A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 20760 (.pedro.ffmpeg30)
05-13 12:04:22.307 371-371/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-13 12:04:22.313 371-371/? A/DEBUG: Build fingerprint: 'google/shamu/shamu:6.0.1/MMB29K/2419427:user/release-keys'
05-13 12:04:22.314 371-371/? A/DEBUG: Revision: '0'
05-13 12:04:22.314 371-371/? A/DEBUG: ABI: 'arm'
05-13 12:04:22.316 371-371/? A/DEBUG: pid: 20760, tid: 20760, name: .pedro.ffmpeg30  >>> com.example.pedro.ffmpeg30 <<<
05-13 12:04:22.316 371-371/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
05-13 12:04:22.319 371-371/? W/debuggerd: type=1400 audit(0.0:145): avc: denied { search } for name="com.example.pedro.ffmpeg30" dev="dm-1" ino=539446 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
05-13 12:04:22.343 371-371/? A/DEBUG:     r0 00000000  r1 00000002  r2 b684b031  r3 b3a53e7c
05-13 12:04:22.343 371-371/? A/DEBUG:     r4 b3a4f594  r5 b67fba61  r6 ab482d04  r7 00000001
05-13 12:04:22.343 371-371/? A/DEBUG:     r8 b6f866ec  r9 0000000b  sl ab482d04  fp b6f7f2fc
05-13 12:04:22.343 371-371/? A/DEBUG:     ip fffffe8c  sp becaf850  lr b39f2ec1  pc b39f458a  cpsr 000d0030
05-13 12:04:22.329 371-371/? W/debuggerd: type=1400 audit(0.0:146): avc: denied { search } for name="com.example.pedro.ffmpeg30" dev="dm-1" ino=539446 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
05-13 12:04:22.364 371-371/? A/DEBUG:     #00 pc 0001a58a  /data/data/com.example.pedro.ffmpeg30/cache/javacpp13478039802826/libc.so
05-13 12:04:22.364 371-371/? A/DEBUG:     #01 pc 00016695  /data/data/com.example.pedro.ffmpeg30/cache/javacpp13478039802826/libc.so
05-13 12:04:22.364 371-371/? A/DEBUG:     #02 pc 00002465  /system/bin/linker (__dl__ZN6soinfo13call_functionEPKcPFvvE+48)
05-13 12:04:22.365 371-371/? A/DEBUG:     #03 pc 0000252f  /system/bin/linker (__dl__ZN6soinfo10call_arrayEPKcPPFvvEjb+134)
05-13 12:04:22.365 371-371/? A/DEBUG:     #04 pc 000026f5  /system/bin/linker (__dl__ZN6soinfo17call_constructorsEv+160)
05-13 12:04:22.365 371-371/? A/DEBUG:     #05 pc 00006115  /system/bin/linker (__dl__Z9do_dlopenPKciPK17android_dlextinfo+224)
05-13 12:04:22.365 371-371/? A/DEBUG:     #06 pc 00001c95  /system/bin/linker (__dl_dlopen+20)
05-13 12:04:22.365 371-371/? A/DEBUG:     #07 pc 0025b13b  /system/lib/libart.so (art::JavaVMExt::LoadNativeLibrary(_JNIEnv*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, _jobject*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*)+650)
05-13 12:04:22.369 371-371/? A/DEBUG:     #08 pc 002d13d7  /system/lib/libart.so (art::Runtime_nativeLoad(_JNIEnv*, _jclass*, _jstring*, _jobject*, _jstring*)+194)
05-13 12:04:22.370 371-371/? A/DEBUG:     #09 pc 738b0105  /data/dalvik-cache/arm/system@framework@boot.oat (offset 0x1ec9000)
05-13 12:04:22.359 371-371/? W/debuggerd: type=1400 audit(0.0:147): avc: denied { search } for name="com.example.pedro.ffmpeg30" dev="dm-1" ino=539446 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
05-13 12:04:22.668 371-371/? E/DEBUG: AM write failed: Broken pipe
05-13 12:04:22.669 863-879/? I/BootReceiver: Copying /data/tombstones/tombstone_06 to DropBox (SYSTEM_TOMBSTONE)
05-13 12:04:22.679 863-20795/? W/ActivityManager:   Force finishing activity com.example.pedro.ffmpeg30/.MainActivity
05-13 12:04:22.717 863-20795/? E/JavaBinder: !!! FAILED BINDER TRANSACTION !!!  (parcel size = 104)
05-13 12:04:22.719 863-20795/? W/ActivityManager: Exception thrown during pause
                                                  android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died
                                                      at android.os.BinderProxy.transactNative(Native Method)
                                                      at android.os.BinderProxy.transact(Binder.java:503)
                                                      at android.app.ApplicationThreadProxy.schedulePauseActivity(ApplicationThreadNative.java:727)
                                                      at com.android.server.am.ActivityStack.startPausingLocked(ActivityStack.java:867)
                                                      at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:2907)
                                                      at com.android.server.am.ActivityStack.finishTopRunningActivityLocked(ActivityStack.java:2763)
                                                      at com.android.server.am.ActivityStackSupervisor.finishTopRunningActivityLocked(ActivityStackSupervisor.java:2760)
                                                      at com.android.server.am.ActivityManagerService.handleAppCrashLocked(ActivityManagerService.java:12037)
                                                      at com.android.server.am.ActivityManagerService.makeAppCrashingLocked(ActivityManagerService.java:11933)
                                                      at com.android.server.am.ActivityManagerService.crashApplication(ActivityManagerService.java:12622)
                                                      at com.android.server.am.ActivityManagerService.handleApplicationCrashInner(ActivityManagerService.java:12129)
                                                      at com.android.server.am.NativeCrashListener$NativeCrashReporter.run(NativeCrashListener.java:86)
05-13 12:04:22.735 275-275/? E/lowmemorykiller: Error writing /proc/20760/oom_score_adj; errno=22
05-13 12:04:22.776 863-5760/? I/OpenGLRenderer: Initialized EGL, version 1.4
05-13 12:04:22.799 387-387/? I/Zygote: Process 20760 exited due to signal (11)
05-13 12:04:22.800 863-1693/? I/ActivityManager: Process com.example.pedro.ffmpeg30 (pid 20760) has died
05-13 12:04:22.827 4337-4337/? I/MicroDetectionWorker: Micro detection mode: [mDetectionMode: [1]].
05-13 12:04:22.841 4337-20799/? I/MicroRecognitionRunner: Starting detection.
05-13 12:04:22.841 4337-18339/? I/MicrophoneInputStream: mic_starting com.google.android.apps.gsa.speech.audio.ah@a5e2527
05-13 12:04:22.845 374-20802/? I/AudioFlinger: AudioFlinger's thread 0xb28c0000 ready to run
05-13 12:04:22.846 374-1270/? I/SoundTriggerHwService::Module: void android::SoundTriggerHwService::Module::onCallbackEvent(const android::sp<android::SoundTriggerHwService::CallbackEvent>&) mClient == 0
05-13 12:04:22.847 4337-18339/? I/MicrophoneInputStream: mic_started com.google.android.apps.gsa.speech.audio.ah@a5e2527
05-13 12:04:22.857 374-20802/? D/audio_hw_primary: select_devices: out_snd_device(0: none) in_snd_device(61: voice-rec-mic)
05-13 12:04:22.857 374-20802/? D/msm8974_platform: platform_send_audio_calibration: sending audio calibration for snd_device(61) acdb_id(62)
05-13 12:04:22.857 374-20802/? D/audio_hw_primary: enable_snd_device: snd_device(61: voice-rec-mic)
05-13 12:04:22.861 374-20802/? D/audio_hw_primary: enable_audio_route: apply and update mixer path: audio-record
05-13 12:04:22.871 4337-20800/? I/DeviceStateChecker: DeviceStateChecker cancelled
05-13 12:04:22.874 4337-4337/? I/MicroDetector: Keeping mic open: false
05-13 12:04:22.874 4337-4337/? I/MicrophoneInputStream: mic_close com.google.android.apps.gsa.speech.audio.ah@a5e2527
05-13 12:04:22.875 4337-18339/? E/AudioRecord-JNI: Error -4 during AudioRecord native read
05-13 12:04:22.989 374-20802/? D/audio_hw_primary: disable_audio_route: reset and update mixer path: audio-record
05-13 12:04:22.991 374-20802/? D/audio_hw_primary: disable_snd_device: snd_device(61: voice-rec-mic)
05-13 12:04:22.996 374-1270/? I/SoundTriggerHwService::Module: void android::SoundTriggerHwService::Module::onCallbackEvent(const android::sp<android::SoundTriggerHwService::CallbackEvent>&) mClient == 0
05-13 12:04:22.998 4337-20799/? I/MicroRecognitionRunner: Detection finished
05-13 12:04:22.999 4337-4688/? I/MicroRecognitionRunner: Stopping hotword detection.
05-13 12:04:23.384 1751-1935/? W/OpenGLRenderer: Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
05-13 12:04:26.936 863-1325/? D/WifiStateMachine: starting scan for "Droiders-dev"WPA_PSK with 5240,2462,2437
05-13 12:04:33.311 863-875/? I/UsageStatsService: User[0] Flushing usage stats to disk
05-13 12:04:40.319 863-2032/? D/NetlinkSocketObserver: NeighborEvent{elapsedMs=13496201, 192.168.2.1, [A0481CB8D7BD], RTM_NEWNEIGH, NUD_PROBE}
05-13 12:04:46.939 863-1325/? D/WifiStateMachine: starting scan for "Droiders-dev"WPA_PSK with 5240,2462,2437
05-13 12:04:58.191 863-2032/? D/NetlinkSocketObserver: NeighborEvent{elapsedMs=13514072, 192.168.2.1, [A0481CB8D7BD], RTM_NEWNEIGH, NUD_STALE}

@saudet
Copy link
Member

saudet commented May 13, 2016

@pedroSG94 It looks like you're hitting bug #133. Please follow the workaround, or if you don't like it, please report the problem upstream to Google. If you don't complain, they will not listen.

@saudet
Copy link
Member

saudet commented May 16, 2016

Yes, version 1.2 has been released. Please use that version:
http://search.maven.org/#search|ga|1|bytedeco

@saudet saudet closed this as completed May 16, 2016
@saudet
Copy link
Member

saudet commented May 16, 2016

And thanks to you all for helping me debug this!!

@jsichi
Copy link
Contributor

jsichi commented Jun 12, 2016

@pedroSG94 : I hit the same sigsegv stack as you. To fix it, besides upgrading to 1.2, I also needed to use 1.2.1 for the version of the javacpp artifact (even though all of the other artifacts are currently at 1.2.

So in my build.sbt:

libraryDependencies ++= Seq(
  "org.bytedeco"                 % "javacpp"         % "1.2.1",
  "org.bytedeco"                 % "javacv"          % "1.2",
  "org.bytedeco.javacpp-presets" % "opencv" % "3.1.0-1.2" classifier "",
  "org.bytedeco.javacpp-presets" % "opencv" % "3.1.0-1.2" classifier "android-arm",
  "org.bytedeco.javacpp-presets" % "ffmpeg" % "3.0.2-1.2" classifier "",
  "org.bytedeco.javacpp-presets" % "ffmpeg" % "3.0.2-1.2") classifier "android-arm"
)

@praveen-kanwar
Copy link

praveen-kanwar commented Jun 7, 2017

In gradle simply put this lines

compile(group: 'org.bytedeco', name: 'javacv-platform', version: '1.3'){
exclude group: 'org.bytedeco.javacpp-presets'
}
compile group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg', version: '3.2.1-1.3'
compile group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg', version: '3.2.1-1.3', classifier: 'android-arm'

@monxarat
Copy link

monxarat commented Aug 1, 2017

@praveen-kanwar Thank you so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests