pili-engineering / PLDroidPlayer

PLDroidPlayer 是七牛推出的一款免费的适用于 Android 平台的播放器 SDK,采用全自研的跨平台播放内核,拥有丰富的功能和优异的性能,可高度定制化和二次开发。
https://developer.qiniu.com/pili/sdk/1210/the-android-client-sdk
4.54k stars 953 forks source link

1.5的sdk播放本地视频, 碰到好几次anr问题。附上trace #812

Open HuSanPang opened 6 years ago

HuSanPang commented 6 years ago

----- pid 9809 at 2018-01-15 08:23:00 -----

DALVIK THREADS: (mutexes: tll=0 tsl=0 tscl=0 ghl=0)

"main" prio=5 tid=1 NATIVE | group="main" sCount=1 dsCount=0 obj=0x412679a0 self=0x4003d010 | sysTid=9809 nice=0 sched=0/0 cgrp=apps handle=1074181084 | state=S schedstat=( 2706927338 213756324 2450 ) utm=221 stm=49 core=2

00 pc 00017004 /system/lib/libc.so (__ioctl+8)

01 pc 0002a9bd /system/lib/libc.so (ioctl+16)

02 pc 00016ba1 /system/lib/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+132)

03 pc 0001709d /system/lib/libbinder.so (android::IPCThreadState::waitForResponse(android::Parcel, int)+44)

04 pc 000172b7 /system/lib/libbinder.so (android::IPCThreadState::transact(int, unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+114)

05 pc 00014a3b /system/lib/libbinder.so (android::BpBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+34)

06 pc 00065e13 /system/lib/libandroid_runtime.so

07 pc 0001e290 /system/lib/libdvm.so (dvmPlatformInvoke+112)

08 pc 0004d411 /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const, JValue, Method const, Thread)+396)

09 pc 000276a0 /system/lib/libdvm.so

10 pc 0002b57c /system/lib/libdvm.so (dvmInterpret(Thread, Method const, JValue*)+184)

11 pc 0005ff07 /system/lib/libdvm.so (dvmInvokeMethod(Object, Method const, ArrayObject, ArrayObject, ClassObject*, bool)+374)

12 pc 000677ed /system/lib/libdvm.so

13 pc 000276a0 /system/lib/libdvm.so

14 pc 0002b57c /system/lib/libdvm.so (dvmInterpret(Thread, Method const, JValue*)+184)

15 pc 0005fc31 /system/lib/libdvm.so (dvmCallMethodV(Thread, Method const, Object, bool, JValue, std::__va_list)+272)

16 pc 000499fb /system/lib/libdvm.so

17 pc 00046871 /system/lib/libandroid_runtime.so

18 pc 00047533 /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const, char const)+390)

19 pc 00000db7 /system/bin/app_process

20 pc 0001273f /system/lib/libc.so (__libc_init+38)

21 pc 00000ae8 /system/bin/app_process

at android.os.BinderProxy.transact(Native Method) at android.media.IAudioService$Stub$Proxy.requestAudioFocus(IAudioService.java:1386) at android.media.AudioManager.requestAudioFocus(AudioManager.java:1949) at com.pili.pldroid.player.widget.a.c(SourceFile:487) at com.pili.pldroid.player.widget.a$8.a(SourceFile:969) at com.pili.pldroid.player.widget.PLVideoView$a$1.surfaceCreated(SourceFile:141) at android.view.SurfaceView.updateWindow(SurfaceView.java:569) at android.view.SurfaceView.access$000(SurfaceView.java:86) at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:174) at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:680) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1842) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:989) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4351) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:749) at android.view.Choreographer.doCallbacks(Choreographer.java:562) at android.view.Choreographer.doFrame(Choreographer.java:532) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735) at android.os.Handler.handleCallback(Handler.java:725) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:5041) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) at dalvik.system.NativeStart.main(Native Method)

lixiaodaoaaa commented 6 years ago

我也遇到了。大哥抓紧帮忙解决下

zshbleaker commented 6 years ago

1.5 已经不再维护,建议升级到 2.X 试下

HuSanPang commented 6 years ago

换成2.06后 在onPrepared 里面start 也有机率会ANR 播放场景是:播放本地视频,在onCompletion 里面setVideoPath 设置下一个文件地址, 在onPrepared里start