neurospeech / xamarin-android-ffmpeg

Xamarin Android FFMpeg binding
MIT License
30 stars 6 forks source link

Problems when using ffmpeg on android 7+ #11

Closed Shuayd closed 7 years ago

Shuayd commented 7 years ago

There seems to be an issue when using the ffmpeg library on android 7+. It keeps crashig when processig the videos. I have converted videos without problems under 7 but evertime i use nouget the app crashes.

neurospeech commented 7 years ago

Do you have some crash report?

Shuayd commented 7 years ago

yes provided below 14:39:50 E linker : /data/data/VideoApp.VideoApp/files/ffmpeg: has text relocations

14:39:50 E linker : --------- beginning of crash

14:39:50 A libc : CANNOT LINK EXECUTABLE "/data/data/VideoApp.VideoApp/files/ffmpeg": /data/data/VideoApp.VideoApp/files/ffmpeg: has text relocations

14:39:50 A libc : Fatal signal 6 (SIGABRT), code -6 in tid 7960 (ffmpeg)

14:39:50 W : debuggerd: handling request: pid=7960 uid=10400 gid=10400 tid=7960

14:39:50 W debuggerd : type=1400 audit(0.0:173): avc: denied { search } for name="VideoApp.VideoApp" dev="dm-2" ino=384810 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0

14:39:50 A DEBUG :

14:39:50 A DEBUG : Build fingerprint: 'google/bullhead/bullhead:7.1.1/N4F26I/3532671:user/release-keys'

14:39:50 A DEBUG : Revision: 'rev_1.0'

14:39:50 A DEBUG : ABI: 'arm'

14:39:50 A DEBUG : pid: 7960, tid: 7960, name: ffmpeg >>> /data/data/VideoApp.VideoApp/files/ffmpeg <<<

14:39:50 A DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------

14:39:50 A DEBUG : r0 00000000 r1 00001f18 r2 00000006 r3 00000008

14:39:50 A DEBUG : r4 eefc958c r5 00000006 r6 eefc9534 r7 0000010c

14:39:50 A DEBUG : r8 ff9b79f0 r9 00000004 sl ff9b7a18 fp eef57010

14:39:50 A DEBUG : ip 00000000 sp ff9b7988 lr eefa939f pc eefa9db8 cpsr 200e0010

14:39:50 W debuggerd : type=1400 audit(0.0:174): avc: denied { search } for name="VideoApp.VideoApp" dev="dm-2" ino=384810 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0

14:39:50 A DEBUG : backtrace:

14:39:50 A DEBUG : #00 pc 00045db8 /system/bin/linker (__dl_tgkill+12)

14:39:50 A DEBUG : #01 pc 0004539b /system/bin/linker (__dl_pthread_kill+34)

14:39:50 A DEBUG : #02 pc 0003d73f /system/bin/linker (__dl_raise+10)

14:39:50 A DEBUG : #03 pc 0003c1fb /system/bin/linker (__dl___libc_android_abort+34)

14:39:50 A DEBUG : #04 pc 0003afd8 /system/bin/linker (__dl_abort+4)

14:39:50 A DEBUG : #05 pc 0003d23b /system/bin/linker (__dl___libc_fatal+22)

14:39:50 A DEBUG : #06 pc 0000971d /system/bin/linker (dlZL29__linker_init_post_relocationR19KernelArgumentBlockj+2076)

14:39:50 A DEBUG : #07 pc 00008e6b /system/bin/linker (__dl___linker_init+358)

14:39:50 A DEBUG : #08 pc 00002788 /system/bin/linker (_start+4)

14:39:50 W NativeCrashListener : Couldn't find ProcessRecord for pid 7960

14:39:50 E : AM data write failed: Broken pipe

14:39:50 W : debuggerd: resuming target 7960

14:39:50 W art : JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable

14:39:50 E AndroidRuntime : FATAL EXCEPTION: main

14:39:50 E AndroidRuntime : Process: VideoApp.VideoApp, PID: 7694

14:39:50 E AndroidRuntime : java.lang.RuntimeException: java.lang.reflect.InvocationTargetException

14:39:50 E AndroidRuntime : at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

14:39:50 E AndroidRuntime : Caused by: java.lang.reflect.InvocationTargetException

14:39:50 E AndroidRuntime : at java.lang.reflect.Method.invoke(Native Method)

14:39:50 E AndroidRuntime : at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)

14:39:50 E AndroidRuntime : ... 1 more

14:39:50 E AndroidRuntime : Caused by: android.runtime.JavaProxyThrowable: System.NullReferenceException: Object reference not set to an instance of an object

14:39:50 E AndroidRuntime : at VideoApp.MainActivity+<b__4_1>d.MoveNext () [0x001e6] in <00f9087642654f83ab1d2b1d5894c75a>:0

14:39:50 E AndroidRuntime : --- End of stack trace from previous location where exception was thrown ---

14:39:50 E AndroidRuntime : at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <2045a53d161d445dbafa65704b8164e9>:0

14:39:50 E AndroidRuntime : at System.Runtime.CompilerServices.AsyncMethodBuilderCore.m__0 (System.Object state) [0x00000] in <2045a53d161d445dbafa65704b8164e9>:0

14:39:50 E AndroidRuntime : at Android.App.SyncContext+cAnonStorey0.<>m0 () [0x00000] in <82eea609d5aa40f29a672d09bd16b08f>:0

14:39:50 E AndroidRuntime : at Java.Lang.Thread+RunnableImplementor.Run () [0x0000b] in <82eea609d5aa40f29a672d09bd16b08f>:0

14:39:50 E AndroidRuntime : at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in <82eea609d5aa40f29a672d09bd16b08f>:0

14:39:50 E AndroidRuntime : at (wrapper dynamic-method) System.Object:863e3f22-a729-4b1c-adc1-662ae6f1f7cf (intptr,intptr)

14:39:50 E AndroidRuntime : at mono.java.lang.RunnableImplementor.n_run(Native Method)

14:39:50 E AndroidRuntime : at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:30)

14:39:50 E AndroidRuntime : at android.os.Handler.handleCallback(Handler.java:751)

14:39:50 E AndroidRuntime : at android.os.Handler.dispatchMessage(Handler.java:95)

14:39:50 E AndroidRuntime : at android.os.Looper.loop(Looper.java:154)

14:39:50 E AndroidRuntime : at android.app.ActivityThread.main(ActivityThread.java:6119)

14:39:50 E AndroidRuntime : ... 3 more

neurospeech commented 7 years ago

And what is device model and processor type?

Shuayd commented 7 years ago
Android version: 7.1.1
API level: 25
Resolution: 1080 x 1920 (xxhdpi)
Screen size: 5.2"
CPU: ARM | 6 cores | 1440 MHz
RAM: 2048 MB
Internal storage: 16384 MB
Model number: NEXUS5X
ID: LG_Nexus_5X_real
Shuayd commented 7 years ago

Is there any update on this issue?

neurospeech commented 7 years ago

Not yet, I don't have physical device yet with Android N, as our devices did not yet receive any updates. But we will let you know soon if we find anything. If it is possible, could you setup HockeyApp and find some more information about crash?

Shuayd commented 7 years ago

Not sure if this helps but you can use this site free for use and have access to the new android physical devices. https://testobject.com/

Thanks

neurospeech commented 7 years ago

ffmpeg will never run on Android 6.0 and after, as Google has disabled text relocations and ffmpeg team has lots of text relocations written in assembly modules, which they have not shown any interest in fixing it.

For Android 6.0 and after, you can use Xamarin.Android.MP4Transcoder , please read more about it here,

https://github.com/neurospeech/xamarin-android-ffmpeg/blob/master/README.md