Android crashes because of Chrome's media notification
Reported by
timmy14...@gmail.com,
Apr 14 2017
|
|||||||
Issue descriptionSteps to reproduce the problem: 1. Create and play an audio element which source is a stream 2. Constantly change the title (by appending to it) What is the expected behavior? What went wrong? As chrome on android wants to keep the media notification's title the same as the site's title it will slow down the app, fill the device's ram, and eventually crash the device. Did this work before? N/A Chrome version: 57.0.2987.132 Channel: stable OS Version: 4.4.2 Flash Version: I figured out that you can actually prevent your device from crashing by terminating chrome as long as you can.
,
Apr 14 2017
,
Apr 15 2017
Works on Android 6, too. However, not on iPhone, as they don't seem to have that notification.
,
Apr 18 2017
,
Apr 18 2017
,
Apr 18 2017
We should throttle the frequency of notification update. Otherwise System UI is refreshing all the time causing this failure.
,
Apr 19 2017
,
Apr 20 2017
1. It could be something Issue 346215? 2. Second I think we should just sanitize the title (and other fields we use in the notification) somewhere so we don't allocate too much ram to store it? Throttling notification updates sounds like just delaying the OOM issue and also something I haven't heard of any other app/browser doing?
,
Apr 20 2017
Chrome is slowed down heavily just by 10 notification updates per seconds, even if they do not occupy as much RAM, so I think limiting the notification updates would be the best to prevent chrome from crashing.
,
Apr 20 2017
> 1. It could be something Issue 346215? Could be similar, but this time it's Android who didn't GC the memory properly > 2. Second I think we should just sanitize the title (and other fields we use in the notification) somewhere so we don't allocate too much ram to store it? It is actually limited to 4096 but we can sanitize a second time. Also I don't think long title is the real cause, it should be related to GC'ing RemoteViews. > Throttling notification updates sounds like just delaying the OOM issue and also something I haven't heard of any other app/browser doing? I think ideally this should be fixed by the Android framework, but throttling on our side makes sense as it also reduces the UI jankiness. Updating the notification in such a frequency already makes the System UI unusable.
,
Apr 20 2017
Also, when the notification is updated so frequently, the media buttons is unclickable on some Android versions
,
Apr 20 2017
Filed b/37536584 for tracking by the Android framework team
,
Apr 22 2017
,
Apr 24 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bf4103d69a0d7e289266c9671c2b980d585c0d5a commit bf4103d69a0d7e289266c9671c2b980d585c0d5a Author: zqzhang <zqzhang@chromium.org> Date: Mon Apr 24 16:28:56 2017 [Media>UI] Apply throttling if the notification is updated too frequently There's a issue where the notification is updated too frequently (especially when the media metadata or fallback media metadata changes), which can cause the system UI to be very janky or even a system crash. This CL throttles the notification update if the notification has been updated during the previous 500ms. BUG= 711730 Review-Url: https://codereview.chromium.org/2833493002 Cr-Commit-Position: refs/heads/master@{#466651} [modify] https://crrev.com/bf4103d69a0d7e289266c9671c2b980d585c0d5a/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java [modify] https://crrev.com/bf4103d69a0d7e289266c9671c2b980d585c0d5a/chrome/android/java_sources.gni [modify] https://crrev.com/bf4103d69a0d7e289266c9671c2b980d585c0d5a/chrome/android/junit/src/org/chromium/chrome/browser/media/ui/MediaNotificationActionsUpdatedTest.java [modify] https://crrev.com/bf4103d69a0d7e289266c9671c2b980d585c0d5a/chrome/android/junit/src/org/chromium/chrome/browser/media/ui/MediaNotificationManagerTestBase.java [add] https://crrev.com/bf4103d69a0d7e289266c9671c2b980d585c0d5a/chrome/android/junit/src/org/chromium/chrome/browser/media/ui/MediaNotificationManagerThrottlerTest.java [modify] https://crrev.com/bf4103d69a0d7e289266c9671c2b980d585c0d5a/chrome/android/junit/src/org/chromium/chrome/browser/media/ui/MediaNotificationTitleUpdatedTest.java [modify] https://crrev.com/bf4103d69a0d7e289266c9671c2b980d585c0d5a/content/browser/media/session/media_session_impl.cc
,
Apr 24 2017
,
May 1 2017
verified in M60 -60.0.3086.0 build |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by timmy14...@gmail.com
, Apr 14 2017