Assigned
Status Update
Comments
[Deleted User] <[Deleted User]> #2
there are some image for help
to...@google.com <to...@google.com>
to...@google.com <to...@google.com>
mr...@gmail.com <mr...@gmail.com> #3
hello?
ri...@dailyobjects.com <ri...@dailyobjects.com> #4
Update please.
sa...@gmail.com <sa...@gmail.com> #5
Same ANR happens on our app too and it's the top one on the list. It happens on 11 and above only.
Any updates?
Any updates?
ne...@gmail.com <ne...@gmail.com> #6
The same issue happens on VPN apps for a large number of users. Is there any workaround?
co...@gmail.com <co...@gmail.com> #7
The same here android 13 and 14
Description
We're getting an ANR with this following callstack from MediaHttpConnection. It's all Android 10, 11 and 12, but mostly 11 and 12. Not on Android 9 and older at all, though we do have many users on these older versions. We're seeing about 10/day 300/month on Bugsnag. There are two threads threads trying to shutdown MediaHTTPConnection, one the main thread, which is blocked, triggers the ANR and another that's 'RUNNABLE'. There's a third 'RUNNABLE' thread that looks like it's reading data from an HTTPS connection. These are all the threads related to android.media.MediaHTTPConnection. This pattern is consistent in the callstacks I've checked.
Bugsnag says the app is 96% in the foreground. Suspect it's in the process of transitioning to background but stuck destroying a surface.
In my logs, I do see evidence of a new video being created after the previous video is destroyed. Not always, but maybe 50%+, enough to make me suspect that the second thread with MediaHTTPConnection.disconnect is an actual SurfaceView that's hanging around that hasn't shut down completely yet.
Very similar callstack was posted on this forum in Unity. Our app is Android, so I think related to code common to both Android and Unity plugins. These guys have a video of the crash. This is definately user facing.
Thread 2 - main - (BLOCKED)
at android.media.MediaHTTPConnection.disconnect(MediaHTTPConnection.java:172)
at android.media.IMediaHTTPConnection$Stub.onTransact(IMediaHTTPConnection.java:132)
at android.os.Binder.execTransactInternal(Binder.java:1173)
at android.os.Binder.execTransact(Binder.java:1132)
at android.media.MediaPlayer._reset(MediaPlayer.java:-2)
at android.media.MediaPlayer.reset(MediaPlayer.java:2155)
at android.widget.VideoView.release(VideoView.java:712)
at android.widget.VideoView.access$2300(VideoView.java:83)
at android.widget.VideoView$7.surfaceDestroyed(VideoView.java:702)
at android.view.SurfaceView.notifySurfaceDestroyed(SurfaceView.java:1841)
at android.view.SurfaceView.updateSurface(SurfaceView.java:1137)
at android.view.SurfaceView.setWindowStopped(SurfaceView.java:279)
at android.view.SurfaceView.surfaceDestroyed(SurfaceView.java:1665)
at android.view.ViewRootImpl.notifySurfaceDestroyed(ViewRootImpl.java:1882)
at android.view.ViewRootImpl.setWindowStopped(ViewRootImpl.java:1838)
at android.view.WindowManagerGlobal.setStoppedState(WindowManagerGlobal.java:710)
at android.app.Activity.performStop(Activity.java:8323)
at android.app.ActivityThread.callActivityOnStop(ActivityThread.java:4969)
at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:4948)
at android.app.ActivityThread.handleStopActivity(ActivityThread.java:5022)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:233)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2152)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:250)
at android.app.ActivityThread.main(ActivityThread.java:7886)
at java.lang.reflect.Method.invoke(Method.java:-2)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:970)
Thread 7728 - Binder:23959_C - (RUNNABLE)
at com.google.android.gms.org.conscrypt.NativeCrypto.SSL_read(:com.google.android.gms@222615037@22.26.15 (150400-461192076):-2)
at com.google.android.gms.org.conscrypt.NativeSsl.read(:com.google.android.gms@222615037@22.26.15 (150400-461192076):3)
at com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket$SSLInputStream.read(:com.google.android.gms@222615037@22.26.15 (150400-461192076):6)
at com.android.okhttp.okio.Okio$2.read(Okio.java:138)
at com.android.okhttp.okio.AsyncTimeout$2.read(AsyncTimeout.java:213)
at com.android.okhttp.okio.RealBufferedSource.indexOf(RealBufferedSource.java:307)
at com.android.okhttp.okio.RealBufferedSource.indexOf(RealBufferedSource.java:301)
at com.android.okhttp.okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:197)
at com.android.okhttp.internal.http.Http1xStream.readResponse(Http1xStream.java:188)
at com.android.okhttp.internal.http.Http1xStream.readResponseHeaders(Http1xStream.java:129)
at com.android.okhttp.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:750)
at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:622)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:475)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:411)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:542)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:106)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:30)
at android.media.MediaHTTPConnection.seekTo(MediaHTTPConnection.java:285)
at android.media.MediaHTTPConnection.getMIMEType(MediaHTTPConnection.java:460)
at android.media.IMediaHTTPConnection$Stub.onTransact(IMediaHTTPConnection.java:159)
at android.os.Binder.execTransactInternal(Binder.java:1173)
at android.os.Binder.execTransact(Binder.java:1132)
Thread 8347 - Thread-611 - (RUNNABLE)
at android.media.MediaHTTPConnection.disconnect(MediaHTTPConnection.java:172)
at android.media.IMediaHTTPConnection$Stub.onTransact(IMediaHTTPConnection.java:132)
at android.os.Binder.execTransactInternal(Binder.java:1173)
at android.os.Binder.execTransact(Binder.java:1132)
at android.media.MediaPlayer._reset(MediaPlayer.java:-2)
at android.media.MediaPlayer.reset(MediaPlayer.java:2155)
at android.widget.VideoView.release(VideoView.java:712)
at android.widget.VideoView.access$2300(VideoView.java:83)
at android.widget.VideoView$7.surfaceDestroyed(VideoView.java:702)
at android.view.SurfaceView.notifySurfaceDestroyed(SurfaceView.java:1841)
at android.view.SurfaceView.updateSurface(SurfaceView.java:1137)
at android.view.SurfaceView.setWindowStopped(SurfaceView.java:279)
at android.view.SurfaceView.surfaceDestroyed(SurfaceView.java:1665)
at android.view.ViewRootImpl.notifySurfaceDestroyed(ViewRootImpl.java:1882)
at android.view.ViewRootImpl.setWindowStopped(ViewRootImpl.java:1838)
at android.view.WindowManagerGlobal.setStoppedState(WindowManagerGlobal.java:710)
at android.app.Activity.performStop(Activity.java:8323)
at android.app.ActivityThread.callActivityOnStop(ActivityThread.java:4969)
at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:4948)
at android.app.ActivityThread.handleStopActivity(ActivityThread.java:5022)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:233)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2152)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:250)
at android.app.ActivityThread.main(ActivityThread.java:7886)
at java.lang.reflect.Method.invoke(Method.java:-2)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:970)