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

ijkplayer二次启动后anr问题 #34

Closed
jgfntu opened this issue Jun 23, 2014 · 11 comments
Closed

ijkplayer二次启动后anr问题 #34

jgfntu opened this issue Jun 23, 2014 · 11 comments

Comments

@jgfntu
Copy link

jgfntu commented Jun 23, 2014

从0.1.1之后的版本,原生的ijkplayer出现首次启动正常,关闭再次启动出现黑屏卡死anr的问题,很奇怪,后台也没抓到log,只是pull出anr的traces.txt,
----- pid 2940 at 2014-06-23 11:04:45 -----
Cmd line: tv.danmaku.ijk.media.demo

DALVIK THREADS:
(mutexes: tll=0 tsl=0 tscl=0 ghl=0 hwl=0 hwll=0)
"main" prio=5 tid=1 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x40027550 self=0xcfc0
| sysTid=2940 nice=0 sched=0/0 cgrp=bg_non_interactive handle=-1345006240
| schedstat=( 218383782 741882328 539 )
at tv.danmaku.ijk.media.player.IjkMediaPlayer._reset(Native Method)
at tv.danmaku.ijk.media.player.IjkMediaPlayer.reset(IjkMediaPlayer.java:353)
at tv.danmaku.ijk.media.widget.VideoView.release(VideoView.java:516)
at tv.danmaku.ijk.media.widget.VideoView.access$31(VideoView.java:514)
at tv.danmaku.ijk.media.widget.VideoView$8.surfaceDestroyed(VideoView.java:510)
at android.view.SurfaceView.reportSurfaceDestroyed(SurfaceView.java:600)
at android.view.SurfaceView.updateWindow(SurfaceView.java:486)
at android.view.SurfaceView.onWindowVisibilityChanged(SurfaceView.java:213)
at android.view.View.dispatchWindowVisibilityChanged(View.java:4074)
at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:738)
at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:738)
at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:738)
at android.view.ViewRoot.performTraversals(ViewRoot.java:814)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1939)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4196)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)

"AudioTrackThread" prio=10 tid=12 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x4052f9c0 self=0x3c60c0
| sysTid=2953 nice=-16 sched=0/0 cgrp=bg_non_interactive handle=4009440
| schedstat=( 625091550 1243041976 10123 )
at dalvik.system.NativeStart.run(Native Method)

"Binder Thread #2" prio=5 tid=8 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x4051be48 self=0x2cc780
| sysTid=2947 nice=0 sched=0/0 cgrp=bg_non_interactive handle=2164192
| schedstat=( 5493165 115173338 30 )
at dalvik.system.NativeStart.run(Native Method)

"Binder Thread #1" prio=5 tid=7 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x4051a5b8 self=0x182bd0
| sysTid=2946 nice=0 sched=0/0 cgrp=bg_non_interactive handle=1195176
| schedstat=( 4852294 290588377 30 )
at dalvik.system.NativeStart.run(Native Method)

"Compiler" daemon prio=5 tid=6 VMWAIT
| group="system" sCount=1 dsCount=0 obj=0x40517a30 self=0x182a98
| sysTid=2945 nice=0 sched=0/0 cgrp=bg_non_interactive handle=1198456
| schedstat=( 16693113 45532229 160 )
at dalvik.system.NativeStart.run(Native Method)

"JDWP" daemon prio=5 tid=5 VMWAIT
| group="system" sCount=1 dsCount=0 obj=0x40517980 self=0x2cbca0
| sysTid=2944 nice=0 sched=0/0 cgrp=bg_non_interactive handle=2162424
| schedstat=( 2105712 976562 19 )
at dalvik.system.NativeStart.run(Native Method)

"Signal Catcher" daemon prio=5 tid=4 RUNNABLE
| group="system" sCount=0 dsCount=0 obj=0x405178c0 self=0x1247b8
| sysTid=2943 nice=0 sched=0/0 cgrp=bg_non_interactive handle=1580424
| schedstat=( 1647949 701905 6 )
at dalvik.system.NativeStart.run(Native Method)

"GC" daemon prio=5 tid=3 VMWAIT
| group="system" sCount=1 dsCount=0 obj=0x40517818 self=0x20fd08
| sysTid=2942 nice=0 sched=0/0 cgrp=bg_non_interactive handle=1585304
| schedstat=( 335694 3265382 3 )
at dalvik.system.NativeStart.run(Native Method)

"HeapWorker" daemon prio=5 tid=2 VMWAIT
| group="system" sCount=1 dsCount=0 obj=0x40517760 self=0x210958
| sysTid=2941 nice=0 sched=0/0 cgrp=bg_non_interactive handle=1585240
| schedstat=( 28411865 3631592 18 )
at dalvik.system.NativeStart.run(Native Method)

----- end 2940 -----

@jgfntu
Copy link
Author

jgfntu commented Jun 23, 2014

基于master分支的commit 1544c0c
ffmpeg也是最新的ijk-r0.1.2-dev分支

@bbcallen bbcallen added the bug label Jun 23, 2014
@bbcallen
Copy link
Contributor

reset()接口有bug,因为我自己没用到,所以暂时先别用这个。
如果要切换视频源,暂时先用 release 旧播放器,创建新播放器的方式播。

@bbcallen
Copy link
Contributor

fixed 5f00a1b

@henry12
Copy link

henry12 commented Sep 22, 2015

"main" prio=5 tid=1 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x40cd4508 self=0x40cb9330
| sysTid=15153 nice=0 sched=0/0 cgrp=apps handle=1075265328
| schedstat=( 14983310716 3276167981 26170 ) utm=1294 stm=204 core=2
#00 pc 0000dca0 /system/lib/libc.so (__futex_syscall3+8)
#1 pc 00012e44 /system/lib/libc.so (__pthread_cond_timedwait_relative+48)
#2 pc 00012ea0 /system/lib/libc.so (__pthread_cond_timedwait+60)
#3 pc 00012f38 /system/lib/libc.so (pthread_join+108)

at tv.danmaku.ijk.media.player.IjkMediaPlayer._reset(Native Method)
at tv.danmaku.ijk.media.player.IjkMediaPlayer.reset(ProGuard:417)

目前看起来还是能遇到该问题

@bbcallen
Copy link
Contributor

Other thread's stack?

@bbcallen bbcallen reopened this Sep 22, 2015
@henry12
Copy link

henry12 commented Sep 22, 2015

main thread reset then anr

@henry12
Copy link

henry12 commented Sep 22, 2015

monkey test get five of them a night

@bbcallen
Copy link
Contributor

I mean, can you get call stack information in other threads?

@henry12
Copy link

henry12 commented Sep 22, 2015

yes,other 2 threads has call stack .

@bbcallen
Copy link
Contributor

Feel free to reopen, if any more questions.

@aricguo
Copy link

aricguo commented Apr 18, 2018

请问找到解决方式了吗?项目中列表页播放 点击进入详情页立刻播放,有1/10的概率出现ANR

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

No branches or pull requests

4 participants