microshow / RxFFmpeg

🔥💥RxFFmpeg 是基于 ( FFmpeg 4.0 + X264 + mp3lame + fdk-aac + opencore-amr + openssl ) 编译的适用于 Android 平台的音视频编辑、视频剪辑的快速处理框架,包含以下功能:视频拼接,转码,压缩,裁剪,片头片尾,分离音视频,变速,添加静态贴纸和gif动态贴纸,添加字幕,添加滤镜,添加背景音乐,加速减速视频,倒放音视频,音频裁剪,变声,混音,图片合成视频,视频解码图片,抖音首页,视频播放器及支持 OpenSSL https 等主流特色功能
4.5k stars 750 forks source link

快速连续几次取消开始,就crash了,怎么处理啊 #72

Open mywaver opened 5 years ago

mywaver commented 5 years ago

A/libc: Fatal signal 11 (SIGSEGV) in tid 31285 (RxCachedThreadS) 30994-A/art: art/runtime/java_vm_ext.cc:470] JNI DETECTED ERROR IN APPLICATION: thread Thread

[36,tid=31245,Native,Thread=0x91ff6500,peer=0x132d99d0,"RxCachedThreadScheduler-4"] using JNIEnv from thread Thread

[36,tid=31245,Native,Thread*=0x91ff6500,peer=0x132d99d0,"RxCachedThreadScheduler-4"] 30994-=A/art: art/runtime/java_vm_ext.cc:470] in call to FindClass t: art/runtime/java_vm_ext.cc:470] from int io.microshow.rxffmpeg.RxFFmpegInvoke.runFFmpegCmd(java.lang.String[]) 30994-31245/ A/art: art/runtime/java_vm_ext.cc:470] "RxCachedThreadScheduler-4" daemon prio=5 tid=36 Runnable 30994-31245/ A/art: art/runtime/java_vm_ext.cc:470] | group="main" sCount=0 dsCount=0 obj=0x132d99d0 self=0x91ff6500 2019-08-16 11:11:45.012 30994-31245/A/art: art/runtime/java_vm_ext.cc:470] | sysTid=31245 nice=0 cgrp=default sched=0/0 handle=0x8e9ff920 2019-08-16 11:11:45.012 30994-31245/ A/art: art/runtime/java_vm_ext.cc:470] | state=R schedstat=( 983705011 516099846 448 ) utm=89 stm=9 core=3 HZ=100 2019-08-16 11:11:45.012 30994-31245/A/art: art/runtime/java_vm_ext.cc:470] | stack=0x8e8fd000-0x8e8ff000 stackSize=1038KB 2019-08-16 11:11:45.012 30994-31245/ A/art: art/runtime/java_vm_ext.cc:470] | held mutexes= "mutator lock"(shared held) 2019-08-16 11:11:45.012 30994-31245/A/art: art/runtime/java_vm_ext.cc:470] at io.microshow.rxffmpeg.RxFFmpegInvoke.runFFmpegCmd(Native method) 2019-08-16 11:11:45.012 30994-31245 A/art: art/runtime/java_vm_ext.cc:470] at io.microshow.rxffmpeg.RxFFmpegInvoke$2.subscribe(RxFFmpegInvoke.java:115) 2019-08-16 11:11:45.012 30994-31245/ A/art: art/runtime/java_vm_ext.cc:470] at io.reactivex.internal.operators.flowable.FlowableCreate.subscribeActual

(FlowableCreate.java:71) 2019-08-16 11:11:45.012 30994-31245/ A/art: art/runtime/java_vm_ext.cc:470] at io.reactivex.Flowable.subscribe(Flowable.java:14636) 2019-08-16 11:11:45.012 30994-31245/ A/art: art/runtime/java_vm_ext.cc:470] at io.reactivex.Flowable.subscribe(Flowable.java:14583) 2019-08-16 11:11:45.013 30994-31245/ A/art: art/runtime/java_vm_ext.cc:470] at io.reactivex.internal.operators.flowable.FlowableSubscribeOn

$SubscribeOnSubscriber.run(FlowableSubscribeOn.java:82) 2019-08-16 11:11:45.013 30994-31245/ A/art: art/runtime/java_vm_ext.cc:470] at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66) 2019-08-16 11:11:45.013 30994-31245/ A/art: art/runtime/java_vm_ext.cc:470] at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57) 2019-08-16 11:11:45.013 30994-31245/ A/art: art/runtime/java_vm_ext.cc:470] at java.util.concurrent.FutureTask.run(FutureTask.java:237) 2019-08-16 11:11:45.013 30994-31245/ A/art: art/runtime/java_vm_ext.cc:470] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run

(ScheduledThreadPoolExecutor.java:272) 2019-08-16 11:11:45.013 30994-31245/ A/art: art/runtime/java_vm_ext.cc:470] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 2019-08-16 11:11:45.013 30994-31245/ A/art: art/runtime/java_vm_ext.cc:470] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 2019-08-16 11:11:45.013 30994-31245/A A/art: art/runtime/java_vm_ext.cc:470] at java.lang.Thread.run(Thread.java:776) 2019-08-16 11:11:45.013 30994-31245/A/art: art/runtime/java_vm_ext.cc:470] 2019-08-16 11:11:45.115 31286-31286/? A/DEBUG: 2019-08-16 11:11:45.115 31286-31286/? A/DEBUG: Build fingerprint: 'HUAWEI/SLA-AL00/HWSLA-Q:7.0/HUAWEISLA-AL00/C00B204:user/release-keys' 2019-08-16 11:11:45.115 31286-31286/? A/DEBUG: Revision: '0' 2019-08-16 11:11:45.115 31286-31286/? A/DEBUG: ABI: 'arm' 2019-08-16 11:11:45.116 31286-31286/? A/DEBUG: pid: 30994, tid: 31285, name: RxCachedThreadS >>> xxxxxxxxxxxx <<< 2019-08-16 11:11:45.116 31286-31286/? A/DEBUG: signal 11 (SIGSEGV), code 0 (SI_USER), fault addr 0x7912 2019-08-16 11:11:45.116 31286-31286/? A/DEBUG: r0 00000000 r1 97b9acfc r2 94787f78 r3 97b9acfc 2019-08-16 11:11:45.116 31286-31286/? A/DEBUG: r4 902ff100 r5 00000000 r6 94787f20 r7 00000000 2019-08-16 11:11:45.116 31286-31286/? A/DEBUG: r8 97b9acfc r9 94788168 sl a64e5420 fp 94787f78 2019-08-16 11:11:45.116 31286-31286/? A/DEBUG: ip 00000000 sp 94787ef0 lr 00000000 pc b5f4d5f4 cpsr 280f0030 2019-08-16 11:11:45.118 31286-31286/? A/DEBUG: backtrace: 2019-08-16 11:11:45.118 31286-31286/? A/DEBUG: #00 pc 000465f4 /system/lib/libc.so (strspn+11) 2019-08-16 11:11:45.118 31286-31286/? A/DEBUG: #01 pc 0076379c /data/app/xxxxxxxxxx-1/lib/arm/librxffmpeg-core.so (avfilter_graph_parse2+64)

microshow commented 5 years ago

建议在上层控制处理 , ffmpeg底层不允许同时执行多次的,里面很多全局的变量

IHansan commented 5 years ago

RxFFmpegInvoke.getInstance().onCancel(); //取消后加上这句好像就不报错了 RxFFmpegInvoke.getInstance().exit();