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)
+1 I have the same problem.
Did they break backward compatibility? Is there any info on that from Google?
@saudet My android studio version is 1.4, compileSdkVersion 23, buildToolsVersion 23.0.0
@saudet I've been tried all the solution in #133 ,but not working
@saudet Similar problem find here:https://code.google.com/p/android-developer-preview/issues/detail?id=3028 , it seems no solution.
+1 I have the same problem here. :(
@tomerhatav @saudet @phajduk I find a official page maybe useful https://developer.android.com/intl/ko/about/versions/marshmallow/android-6.0-changes.html#behavior-runtime
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.
@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
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.
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
https://github.com/FFmpeg/FFmpeg/commit/f963f80399deb1a2b44c1bac3af7123e8a0c9e46
https://github.com/FFmpeg/FFmpeg/commit/cb416a7d795414aaa534c27943bda0d3aef3b5a1
Looks like they have been around since 2.6?
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.
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.
JavaCV 1.1 links with FFmpeg 2.8.1, and that doesn't work? What is the difference between your binaries and the release?
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
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.
It seems to be a problem with one of the dependent libraries. So, FFmpeg rebuilt without any of them shouldn't cause this issue.
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."
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?
@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!
@ongakuer well done!
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.
@ongakuer Maybe it has something to do with the changes I've made for issue https://github.com/bytedeco/javacpp-presets/issues/133?
@saudet Maybe you are right,Thanks.
@saudet will you release anytime soon a new version of javacv that fixes the text relocations bug?
@tomerhatav Well, if you could make a branch that works with JavaCPP 1.1, I'd release that right away, sure.
Hi, I've got this error too. So...to avoid this error I shoud build ffmpeg from scratch?
+1, how to fix this?
I've uploaded SNAPSHOT binaries here:
https://oss.sonatype.org/content/repositories/snapshots/org/bytedeco/javacpp/1.2-SNAPSHOT/
https://oss.sonatype.org/content/repositories/snapshots/org/bytedeco/javacpp-presets/ffmpeg/2.8.5-1.2-SNAPSHOT/
https://oss.sonatype.org/content/repositories/snapshots/org/bytedeco/javacv/1.2-SNAPSHOT/
I haven't tested them, so would be happy to know if they work or not! Thanks for any feedback.
@saudet It not work…

Thanks for testing! So, when it gets built on OS X, there's no text relocations? Is it a bug in the Android NDK for Linux?
I built it on OS X with my custom cppbuild (only enable x264). I not sure third party libraries(openh264,lame,opencore-amr) may cause this.
I will build the latest javaccp-ffmpeg with default cppbuild later.
@saudet
Yes! There's no text relocations when built it on OS X. It work well on Marshmallow.
Here is the javacpp-ffmpeg library(FFmpeg 3.0)
target.zip
@ongakuer will it work on x86 devices?
@coralinejones1985 Sorry,I just build for arm.
@ongakuer Which version of yasm are you using? Here I get
$ yasm --version
yasm 1.3.0
Maybe that's where the difference lies...
@saudet
yasm 1.3.0 ……
I am new to javacv and ran into the same problem
when I tried RecordActivity.java.
Is the problem fixed with @ongakuer target.zip?
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)
@fuyacho-takatsuji
Don't use JavaCV 1.1 Release Version. Download latest JavaCV (https://github.com/bytedeco/javacv/commit/28065a0c646e13ce8e588df0630c53f07924c18b) from github and import to your project. Maybe you need remove unused file.
PS: I move .so files to armeabi-v7a
@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...
@fuyacho-takatsuji
I keep these files :
@ongakuer Were you using android-ndk-r10e to build ffmpeg? Can you, please, show how your .sh file looks like?
@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
@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.
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...
Yes, it's fixed with FFmpeg 3.0 and latest libx264!
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..
But it wasn't fixed for android-x86. I had to disable asm code for libopenh264 and libx264 to get binaries without text relocations.
I've uploaded SNAPSHOT binaries here:
https://oss.sonatype.org/content/repositories/snapshots/org/bytedeco/javacpp/1.2-SNAPSHOT/
https://oss.sonatype.org/content/repositories/snapshots/org/bytedeco/javacpp-presets/ffmpeg/3.0-1.2-SNAPSHOT/
https://oss.sonatype.org/content/repositories/snapshots/org/bytedeco/javacv/1.2-SNAPSHOT/
They should work, but please let me know if you encounter any problems! Thanks
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
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@[email protected] (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}
@pedroSG94 It looks like you're hitting bug https://github.com/bytedeco/javacv/issues/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.
Yes, version 1.2 has been released. Please use that version:
http://search.maven.org/#search|ga|1|bytedeco
And thanks to you all for helping me debug this!!
@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"
)
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'
@praveen-kanwar Thank you so much.
Most helpful comment
In gradle simply put this lines