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

ANR on calling setVideoSurface in SimpleExoplayer class #4006

Closed
aatish1989 opened this issue Mar 20, 2018 · 6 comments
Closed

ANR on calling setVideoSurface in SimpleExoplayer class #4006

aatish1989 opened this issue Mar 20, 2018 · 6 comments

Comments

@aatish1989
Copy link

aatish1989 commented Mar 20, 2018

Issue description

Getting ANR while destroying surfaceview in simpleexoplayer view.

Reproduction steps

Not able to reproduce as getting traces for market users.

Version of ExoPlayer being used

2.7.0

Device(s) and version(s) of Android being used

Mostly happening on Redmi Note 4 (mido) (Android 7 and Andorid 6).

@AquilesCanta
Copy link
Contributor

This issue is being closed because it does not adhere to our issue template, and/or because it omits information requested in the issue template that is required for us to investigate the problem efficiently. The issue template can be found here.

If you’re able to provide complete information as requested in the issue template, please do so below and we’ll re-open the issue. Thanks!

@aatish1989
Copy link
Author

Please find the crash logs for above issue:

"main" prio=5 tid=1 Waiting
| group="main" sCount=1 dsCount=0 obj=0x745e6078 self=0xf30f1000
| sysTid=9069 nice=-4 cgrp=default sched=1073741825/1 handle=0xf5ccc538
| state=S schedstat=( 2680499445 62634579 1613 ) utm=235 stm=33 core=7 HZ=100
| stack=0xff02f000-0xff031000 stackSize=8MB
| held mutexes=

at java.lang.Object.wait! (Native method)

  • waiting on <0x0e4a92ff> (a com.google.android.exoplayer2.PlayerMessage)

    at com.google.android.exoplayer2.PlayerMessage.blockUntilDelivered (PlayerMessage.java:262)

    at com.google.android.exoplayer2.SimpleExoPlayer.setVideoSurfaceInternal (SimpleExoPlayer.java:833)

    at com.google.android.exoplayer2.SimpleExoPlayer.access$1200 (SimpleExoPlayer.java:53)

    at com.google.android.exoplayer2.SimpleExoPlayer$ComponentListener.onSurfaceTextureDestroyed (SimpleExoPlayer.java:1021)

    at android.view.TextureView.destroySurface (TextureView.java:231)

    at android.view.TextureView.destroyHardwareResources (TextureView.java:364)

    at android.view.ThreadedRenderer.destroyResources (ThreadedRenderer.java:509)

    at android.view.ThreadedRenderer.destroyResources (ThreadedRenderer.java:516)

    at android.view.ThreadedRenderer.destroyResources (ThreadedRenderer.java:516)

    at android.view.ThreadedRenderer.destroyResources (ThreadedRenderer.java:516)

    at android.view.ThreadedRenderer.destroyHardwareResources (ThreadedRenderer.java:504)

    at android.view.ViewRootImpl.destroyHardwareResources (ViewRootI

@aatish1989
Copy link
Author

@AquilesCanta Please re-open it. I have updated the issue.

@AquilesCanta AquilesCanta reopened this Mar 20, 2018
@AquilesCanta
Copy link
Contributor

Will push a tentative workaround soon.

@AquilesCanta
Copy link
Contributor

Do you have a full logcat / bugreport?

@AquilesCanta AquilesCanta self-assigned this Mar 23, 2018
@aatish1989
Copy link
Author

Please find the Full logcat:

Today, 12:24 AM on app version 4528
Samsung Galaxy On5 (o5lte), 1536MB RAM, Android 6.0
Report 1

The "main" (tid=1) thread is in waiting state.

EXPAND ALL
"main" tid=1 Waiting
"main" prio=5 tid=1 Waiting
| group="main" sCount=1 dsCount=0 obj=0x767a2598 self=0xb48a4500
| sysTid=18766 nice=0 cgrp=bg_non_interactive sched=0/0 handle=0xb6fdbd54
| state=S schedstat=( 0 0 0 ) utm=1158 stm=200 core=0 HZ=100
| stack=0xbe3c6000-0xbe3c8000 stackSize=8MB
| held mutexes=

at java.lang.Object.wait! (Native method)

  • waiting on <0x00bd1fda> (a com.google.android.exoplayer2.PlayerMessage)

    at com.google.android.exoplayer2.PlayerMessage.blockUntilDelivered (PlayerMessage.java:262)

  • locked <0x00bd1fda> (a com.google.android.exoplayer2.PlayerMessage)

    at com.google.android.exoplayer2.SimpleExoPlayer.setVideoSurfaceInternal (SimpleExoPlayer.java:833)

    at com.google.android.exoplayer2.SimpleExoPlayer.setVideoSurface (SimpleExoPlayer.java:175)

    at com.bsb.hike.exoplayer.HikeExoPlayer.setSurface (HikeExoPlayer.java:502)

    at com.bsb.hike.exoplayer.ScalableVideoView.onSurfaceTextureAvailable (ScalableVideoView.java:111)

    at android.view.TextureView.getHardwareLayer (TextureView.java:368)

    at android.view.View.updateDisplayListIfDirty (View.java:16511)

    at android.view.View.draw (View.java:17310)

    at android.view.ViewGroup.drawChild (ViewGroup.java:3926)

    at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3716)

    at android.view.View.draw (View.java:17544)

    at android.view.View.updateDisplayListIfDirty (View.java:16534)

    at android.view.View.draw (View.java:17310)

    at android.view.ViewGroup.drawChild (ViewGroup.java:3926)

    at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3716)

    at android.view.View.updateDisplayListIfDirty (View.java:16529)

    at android.view.View.draw (View.java:17310)

    at android.view.ViewGroup.drawChild (ViewGroup.java:3926)

    at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3716)

    at android.view.View.updateDisplayListIfDirty (View.java:16529)

    at android.view.View.draw (View.java:17310)

    at android.view.ViewGroup.drawChild (ViewGroup.java:3926)

    at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3716)

    at android.view.View.updateDisplayListIfDirty (View.java:16529)

    at android.view.View.draw (View.java:17310)

    at android.view.ViewGroup.drawChild (ViewGroup.java:3926)

    at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3716)

    at android.view.View.draw (View.java:17544)

    at android.widget.ScrollView.draw (ScrollView.java:2802)

    at com.facebook.react.views.scroll.ReactScrollView.draw (ReactScrollView.java:334)

    at android.view.View.updateDisplayListIfDirty (View.java:16534)

    at android.view.View.draw (View.java:17310)

    at android.view.ViewGroup.drawChild (ViewGroup.java:3926)

    at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3716)

    at android.view.View.draw (View.java:17544)

    at android.view.View.updateDisplayListIfDirty (View.java:16534)

    at android.view.View.draw (View.java:17310)

    at android.view.ViewGroup.drawChild (ViewGroup.java:3926)

    at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3716)

    at android.view.View.draw (View.java:17544)

    at android.view.View.updateDisplayListIfDirty (View.java:16534)

    at android.view.View.draw (View.java:17310)

    at android.view.ViewGroup.drawChild (ViewGroup.java:3926)

    at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3716)

    at android.view.View.updateDisplayListIfDirty (View.java:16529)

    at android.view.View.draw (View.java:17310)

    at android.view.ViewGroup.drawChild (ViewGroup.java:3926)

    at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3716)

    at android.view.View.updateDisplayListIfDirty (View.java:16529)

    at android.view.View.draw (View.java:17310)

    at android.view.ViewGroup.drawChild (ViewGroup.java:3926)

    at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3716)

    at android.view.View.updateDisplayListIfDirty (View.java:16529)

    at android.view.View.draw (View.java:17310)

    at android.view.ViewGroup.drawChild (ViewGroup.java:3926)

    at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3716)

    at android.view.View.updateDisplayListIfDirty (View.java:16529)

    at android.view.View.draw (View.java:17310)

    at android.view.ViewGroup.drawChild (ViewGroup.java:3926)

    at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3716)

    at android.view.View.draw (View.java:17544)

    at android.view.View.updateDisplayListIfDirty (View.java:16534)

    at android.view.View.draw (View.java:17310)

    at android.view.ViewGroup.drawChild (ViewGroup.java:3926)

    at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3716)

    at android.view.View.updateDisplayListIfDirty (View.java:16529)

    at android.view.View.draw (View.java:17310)

    at android.view.ViewGroup.drawChild (ViewGroup.java:3926)

    at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3716)

    at android.view.View.updateDisplayListIfDirty (View.java:16529)

    at android.view.View.draw (View.java:17310)

    at android.view.ViewGroup.drawChild (ViewGroup.java:3926)

    at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3716)

    at android.view.View.updateDisplayListIfDirty (View.java:16529)

    at android.view.View.draw (View.java:17310)

    at android.view.ViewGroup.drawChild (ViewGroup.java:3926)

    at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3716)

    at android.view.View.updateDisplayListIfDirty (View.java:16529)

    at android.view.View.draw (View.java:17310)

    at android.view.ViewGroup.drawChild (ViewGroup.java:3926)

    at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3716)

    at android.view.View.updateDisplayListIfDirty (View.java:16529)

    at android.view.View.draw (View.java:17310)

    at android.view.ViewGroup.drawChild (ViewGroup.java:3926)

    at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3716)

    at android.view.View.updateDisplayListIfDirty (View.java:16529)

    at android.view.View.draw (View.java:17310)

    at android.view.ViewGroup.drawChild (ViewGroup.java:3926)

    at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3716)

    at android.view.View.draw (View.java:17544)

    at com.android.internal.policy.PhoneWindow$DecorView.draw (PhoneWindow.java:3187)

    at android.view.View.updateDisplayListIfDirty (View.java:16534)

    at android.view.ThreadedRenderer.updateViewTreeDisplayList (ThreadedRenderer.java:325)

    at android.view.ThreadedRenderer.updateRootDisplayList (ThreadedRenderer.java:331)

    at android.view.ThreadedRenderer.draw (ThreadedRenderer.java:366)

    at android.view.ViewRootImpl.draw (ViewRootImpl.java:3251)

    at android.view.ViewRootImpl.performDraw (ViewRootImpl.java:3050)

    at android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:2632)

    at android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:1544)

    at android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:7607)

    at android.view.Choreographer$CallbackRecord.run (Choreographer.java:911)

    at android.view.Choreographer.doCallbacks (Choreographer.java:686)

    at android.view.Choreographer.doFrame (Choreographer.java:622)

    at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:897)

    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:7402)

    at java.lang.reflect.Method.invoke! (Native method)

    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1230)

    at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1120)
    "FinalizerWatchdogDaemon" tid=5 Sleeping
    "FinalizerWatchdogDaemon" daemon prio=5 tid=5 Sleeping
    | group="system" sCount=1 dsCount=0 obj=0x22c03220 self=0xaf65fe00
    | sysTid=18774 nice=0 cgrp=bg_non_interactive sched=0/0 handle=0xb3c3c930
    | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=0 HZ=100
    | stack=0xb3b3a000-0xb3b3c000 stackSize=1038KB
    | held mutexes=

    at java.lang.Thread.sleep! (Native method)

  • sleeping on <0x0d91c501> (a java.lang.Object)

    at java.lang.Thread.sleep (Thread.java:1031)

  • locked <0x0d91c501> (a java.lang.Object)

    at java.lang.Thread.sleep (Thread.java:985)

    at java.lang.Daemons$FinalizerWatchdogDaemon.sleepFor (Daemons.java:288)

    at java.lang.Daemons$FinalizerWatchdogDaemon.waitForFinalization (Daemons.java:299)

    at java.lang.Daemons$FinalizerWatchdogDaemon.run (Daemons.java:247)

    at java.lang.Thread.run (Thread.java:818)
    "HikeBranchSdkInit" tid=10 Native
    "HikeBranchSdkInit" prio=5 tid=10 Native
    | group="main" sCount=1 dsCount=0 obj=0x22c03400 self=0xaf660d00
    | sysTid=18781 nice=0 cgrp=bg_non_interactive sched=0/0 handle=0x9c3d3930
    | state=S schedstat=( 0 0 0 ) utm=496 stm=77 core=2 HZ=100
    | stack=0x9c2d1000-0x9c2d3000 stackSize=1038KB
    | held mutexes=

    #00 pc 00000000000412ac /system/lib/libc.so (__epoll_pwait+20)

    Add support for avc3 boxes in fragmented mp4 streams. #1 pc 000000000001a897 /system/lib/libc.so (epoll_pwait+26)

    Support wider range of DASH manifests #2 pc 000000000001a8a5 /system/lib/libc.so (epoll_wait+6)

    Investigate adding HLS support. #3 pc 000000000001326f /system/lib/libutils.so (_ZN7android6Looper9pollInnerEi+102)

    Add support for parsing senc boxes. #4 pc 00000000000134ef /system/lib/libutils.so (_ZN7android6Looper8pollOnceEiPiS1_PPv+130)

    Bound nextIndex on seek to be 0 <= nextIndex <= numSegments #5 pc 00000000000844b1 /system/lib/libandroid_runtime.so (_ZN7android18NativeMessageQueue8pollOnceEP7_JNIEnvP8_jobjecti+22)

    Internal runtime error #6 pc 0000000000000575 /system/framework/arm/boot.oat (Java_android_os_MessageQueue_nativePollOnce__JI+96)

    at android.os.MessageQueue.nativePollOnce (Native method)

    at android.os.MessageQueue.next (MessageQueue.java:323)

    at android.os.Looper.loop (Looper.java:135)

    at android.os.HandlerThread.run (HandlerThread.java:61)
    "MQTT_Thread" tid=31 Native
    "MQTT_Thread" prio=5 tid=31 Native
    | group="main" sCount=1 dsCount=0 obj=0x22c039a0 self=0x9af61500
    | sysTid=18875 nice=0 cgrp=bg_non_interactive sched=0/0 handle=0x9a3ff930
    | state=S schedstat=( 0 0 0 ) utm=5 stm=1 core=2 HZ=100
    | stack=0x9a2fd000-0x9a2ff000 stackSize=1038KB
    | held mutexes=

    #00 pc 00000000000412ac /system/lib/libc.so (__epoll_pwait+20)

    Add support for avc3 boxes in fragmented mp4 streams. #1 pc 000000000001a897 /system/lib/libc.so (epoll_pwait+26)

    Support wider range of DASH manifests #2 pc 000000000001a8a5 /system/lib/libc.so (epoll_wait+6)

    Investigate adding HLS support. #3 pc 000000000001326f /system/lib/libutils.so (_ZN7android6Looper9pollInnerEi+102)

    Add support for parsing senc boxes. #4 pc 00000000000134ef /system/lib/libutils.so (_ZN7android6Looper8pollOnceEiPiS1_PPv+130)

    Bound nextIndex on seek to be 0 <= nextIndex <= numSegments #5 pc 00000000000844b1 /system/lib/libandroid_runtime.so (_ZN7android18NativeMessageQueue8pollOnceEP7_JNIEnvP8_jobjecti+22)

    Internal runtime error #6 pc 0000000000000575 /system/framework/arm/boot.oat (Java_android_os_MessageQueue_nativePollOnce__JI+96)

    at android.os.MessageQueue.nativePollOnce (Native method)

    at android.os.MessageQueue.next (MessageQueue.java:323)

    at android.os.Looper.loop (Looper.java:135)

    at android.os.HandlerThread.run (HandlerThread.java:61)
    "ReferenceQueueDaemon" tid=3 Waiting
    "FinalizerDaemon" tid=4 Waiting
    "Binder_1" tid=7 Native
    "Binder_2" tid=8 Native
    "HikePubSubThread" tid=9 Waiting
    "pool-2-thread-1" tid=11 Waiting
    "Timer-1" tid=12 Waiting
    "Timer-0" tid=13 Waiting
    "AsyncTask Add support for avc3 boxes in fragmented mp4 streams. #1" tid=14 Waiting
    "Queue" tid=16 Waiting
    "Queue" tid=17 Waiting
    "Queue" tid=18 Waiting
    "Queue" tid=19 Waiting
    "Queue" tid=20 Waiting
    "Answers Events Handler1" tid=21 TimedWaiting
    "MQTT Rec: +918358096809:5:true:false:0:4:443::unkn" tid=22 Native
    "FileObserver" tid=23 Native
    "Crashlytics Exception Handler1" tid=24 Waiting
    "AsyncTask Support wider range of DASH manifests #2" tid=25 Waiting
    "msg-store-1" tid=29 TimedWaiting
    "AnalyticsStore-1" tid=30 TimedWaiting
    "RenderThread" tid=33 Native
    "Signal Catcher" tid=2 Runnable
    "HeapTaskDaemon" tid=6 Blocked

ojw28 pushed a commit that referenced this issue Mar 28, 2018
@ojw28 ojw28 closed this as completed Mar 28, 2018
ojw28 pushed a commit that referenced this issue Mar 29, 2018
@google google locked and limited conversation to collaborators Aug 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants