New player fails to load video when wm density is modified

When overriding the nvidia shield wm density to better fit a 4k TV, the new player crashes when attempting to launch some content.

Server Version#: 1.21.3.4021
Player Version#: 8.12.4.22902

An exception occurred: java.lang.RuntimeException: Canvas: trying to draw too large

02-14 22:16:52.413 i: [MediaDecisionEngine] Server was happy with client’s original decision
02-14 22:16:52.414 i: [MediaDecisionEngine] Decision: CanPlay: true CanDirectPlay: true CanDirectStreamVideo: false CanDirectStreamAudio: false CanDirectPlaySubtitle: false CanTranscodeSubtitle: false CanDisplayVideo: true
02-14 22:16:52.414 i: [LoadControl] New bitrate: 5371, Maximum: 5371
02-14 22:16:52.415 i: [MediaDecisionMediaSource] Using FFMediaSource
02-14 22:16:52.415 i: [BufferHelper] Assumed Bitrate: 10742, Segment Count: 1258
02-14 22:16:52.415 i: [BufferHelper] Segment count: 1258
02-14 22:16:52.416 i: [MediaDecisionMediaSource] onMediaDecisionRefreshed (Sources: 1)
02-14 22:16:52.416 i: [DisplayBehaviour] Mode found: 3840x2160 @ 29.9700Hz (1) (Score: 72.00 (RR: 0.00 R: 72.00)
02-14 22:16:52.416 i: [DisplayBehaviour] Mode found: 3840x2160 @ 23.9760Hz (2) (Score: 172.00 (RR: 100.00 R: 72.00)
02-14 22:16:52.416 i: [DisplayBehaviour] Mode found: 1920x1080 @ 29.9700Hz (3) (Score: 125.00 (RR: 0.00 R: 125.00)
02-14 22:16:52.417 i: [DisplayBehaviour] Mode found: 1920x1080 @ 23.9760Hz (4) (Score: 225.00 (RR: 100.00 R: 125.00)
02-14 22:16:52.417 i: [DisplayBehaviour] Mode found: 1280x720 @ 59.9401Hz (5) (Score: 0.00 (RR: 0.00 R: 0.00)
02-14 22:16:52.417 i: [DisplayBehaviour] Mode found: 1920x1080 @ 59.9401Hz (6) (Score: 125.00 (RR: 0.00 R: 125.00)
02-14 22:16:52.417 i: [DisplayBehaviour] Mode found: 1920x1080 @ 120.0000Hz (7) (Score: 125.00 (RR: 0.00 R: 125.00)
02-14 22:16:52.425 i: [DisplayBehaviour] Mode found: 3840x2160 @ 50.0000Hz (9) (Score: 72.00 (RR: 0.00 R: 72.00)
02-14 22:16:52.425 i: [DisplayBehaviour] Mode found: 3840x2160 @ 30.0000Hz (10) (Score: 72.00 (RR: 0.00 R: 72.00)
02-14 22:16:52.426 i: [DisplayBehaviour] Mode found: 3840x2160 @ 25.0000Hz (11) (Score: 72.00 (RR: 0.00 R: 72.00)
02-14 22:16:52.426 i: [DisplayBehaviour] Mode found: 3840x2160 @ 24.0000Hz (12) (Score: 96.98 (RR: 24.98 R: 72.00)
02-14 22:16:52.426 i: [DisplayBehaviour] Mode found: 1920x1080 @ 30.0000Hz (13) (Score: 125.00 (RR: 0.00 R: 125.00)
02-14 22:16:52.426 i: [DisplayBehaviour] Mode found: 1920x1080 @ 25.0000Hz (14) (Score: 125.00 (RR: 0.00 R: 125.00)
02-14 22:16:52.427 i: [DisplayBehaviour] Mode found: 1920x1080 @ 24.0000Hz (15) (Score: 149.98 (RR: 24.98 R: 125.00)
02-14 22:16:52.427 i: [DisplayBehaviour] Mode found: 1280x720 @ 50.0000Hz (16) (Score: 0.00 (RR: 0.00 R: 0.00)
02-14 22:16:52.428 i: [DisplayBehaviour] Mode found: 1920x1080 @ 50.0000Hz (17) (Score: 125.00 (RR: 0.00 R: 125.00)
02-14 22:16:52.429 i: [DisplayBehaviour] Mode found: 3840x2160 @ 60.0000Hz (18) (Score: 72.00 (RR: 0.00 R: 72.00)
02-14 22:16:52.429 i: [DisplayBehaviour] Mode found: 1920x1080 @ 60.0000Hz (19) (Score: 125.00 (RR: 0.00 R: 125.00)
02-14 22:16:52.430 i: [DisplayBehaviour] Mode found: 1280x720 @ 60.0000Hz (20) (Score: 0.00 (RR: 0.00 R: 0.00)
02-14 22:16:52.430 i: [DisplayBehaviour] Mode found: 3840x2160 @ 59.9401Hz (21) (Score: 72.00 (RR: 0.00 R: 72.00)
02-14 22:16:52.431 i: [DisplayBehaviour] Best mode for 1920x1080 @ 23.976000Hz selected as 1920x1080 @ 23.9760Hz (4).
02-14 22:16:52.431 i: [DisplayBehaviour] Selecting 1920x1080 @ 23.9760Hz (4) as the active mode.
02-14 22:16:53.076 e: Fatal exception occurred.
02-14 22:16:53.076 e: An exception occurred: java.lang.RuntimeException: Canvas: trying to draw too large(132710400bytes) bitmap.
02-14 22:16:53.077 e: Stacktrace: java.lang.RuntimeException: Canvas: trying to draw too large(132710400bytes) bitmap.
at android.view.DisplayListCanvas.throwIfCannotDraw(DisplayListCanvas.java:229)
at android.view.RecordingCanvas.drawBitmap(RecordingCanvas.java:98)
at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:545)
at com.squareup.picasso.u.draw(SourceFile:11)
at android.widget.ImageView.onDraw(ImageView.java:1360)
at android.view.View.draw(View.java:20230)
at android.view.View.updateDisplayListIfDirty(View.java:19105)
at android.view.View.draw(View.java:19958)
at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
at android.view.View.updateDisplayListIfDirty(View.java:19096)
at android.view.View.draw(View.java:19958)
at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
at androidx.constraintlayout.widget.ConstraintLayout.dispatchDraw(SourceFile:1)
at android.view.View.updateDisplayListIfDirty(View.java:19096)
at android.view.View.draw(View.java:19958)
at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
at androidx.coordinatorlayout.widget.CoordinatorLayout.drawChild(SourceFile:17)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
at android.view.View.draw(View.java:20233)
at android.view.View.updateDisplayListIfDirty(View.java:19105)
at android.view.View.draw(View.java:19958)
at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
at android.view.View.updateDisplayListIfDirty(View.java:19096)
at android.view.View.draw(View.java:19958)
at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
at android.view.View.updateDisplayListIfDirty(View.java:19096)
at android.view.View.draw(View.java:19958)
at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
at android.view.View.updateDisplayListIfDirty(View.java:19096)
at android.view.View.draw(View.java:19958)
at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
at android.view.View.updateDisplayListIfDirty(View.java:19096)
at android.view.View.draw(View.java:19958)
at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
at android.view.View.draw(View.java:20233)
at com.android.internal.policy.DecorView.draw(DecorView.java:792)
at android.view.View.updateDisplayListIfDirty(View.java:19105)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:686)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:692)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:801)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:3505)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3309)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2603)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1538)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7520)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:949)
at android.view.Choreographer.doCallbacks(Choreographer.java:761)
at android.view.Choreographer.doFrame(Choreographer.java:696)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6721)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

02-14 22:17:00.248 i: [AppEventMonitor] ApplicationCreated

adb shell wm density
// Physical density: 320
// Override density: 480

This appears to have been fixed in the past 8.6 on Nvidia Shield Pro 2017 crashes on movies details page and tv shows page but has cropped back up for me.

The old player didn’t have the issue, for the time being I’ve been able to work around the issue by disabling the BackgroundHud image loading apk-patches/custom-dpi-player-oom-fix.patch at master · ouchadam/apk-patches · GitHub

Same issue here on 8.13.0.22986. Not sure when this issue cropped back up but it has been happening to me for at least a couple weeks now. Thanks for the temporary fix!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.