New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 618439 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment

[Android] SiteSettings crash with NPE when both autoplay and protected content are enabled

Project Member Reported by avayvod@chromium.org, Jun 8 2016

Issue description

Enable autoplay setting via FieldTrials or some other way (CL to enable via --enable-autoplay-muted-video is coming).

1. Go to Chrome settings > Site settings

OR: NPE at https://cs.chromium.org/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsPreferences.java?rcl=0&l=205

ER: No NPE.

The code removes both preferences from the view in this case but still tries to find the AUTOPLAY one in the Site Settings view. Then findPreference() returns null.
 
Sent https://codereview.chromium.org/2052613002 for a review.
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bf6c1f850a7b75b5992d3f99d7a8b3d8f0488b24

commit bf6c1f850a7b75b5992d3f99d7a8b3d8f0488b24
Author: avayvod <avayvod@chromium.org>
Date: Thu Jun 09 16:35:34 2016

[Android, Settings] Fix NPE when both media related site settings are enabled

Only look for AUTOPLAY preference if it's the only one enabled.

BUG= 618439 
TEST=manual

Review-Url: https://codereview.chromium.org/2052613002
Cr-Commit-Position: refs/heads/master@{#398908}

[modify] https://crrev.com/bf6c1f850a7b75b5992d3f99d7a8b3d8f0488b24/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsPreferences.java

Status: Fixed (was: Started)
Finnur, do we need to merge the fix to M52?
Nope. To repro you'd need a really old device (that doesn't support Protected Content) with a special flag enabled (autoplay) that we control and haven't enabled yet.
But the crash reproduces when both settings are available, so it should be a not really old device with the autoplay experiment. Enabling autoplay on 52 and before would cause Settings to crash.
Well, then it is up to the fate of the flag. Will we enable it on 52? If so, you might need to merge. Mounir is better equipped at answering that.
Labels: Merge-Request-52 ReleaseBlock-Stable M-52
Status: Started (was: Fixed)
Per offline discussion with Mounir, will merge to M52 just in case.

Comment 9 by tin...@google.com, Jun 10 2016

Labels: -Merge-Request-52 Merge-Approved-52 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M52 (branch: 2743)
Project Member

Comment 10 by bugdroid1@chromium.org, Jun 10 2016

Labels: -merge-approved-52 merge-merged-2743
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/06afa04922c0f13eca0576d3fa2cce3758307ee5

commit 06afa04922c0f13eca0576d3fa2cce3758307ee5
Author: Anton Vayvod <avayvod@google.com>
Date: Fri Jun 10 12:11:42 2016

[Android, Settings] Fix NPE when both media related site settings are enabled

Only look for AUTOPLAY preference if it's the only one enabled.

BUG= 618439 
TEST=manual

Review-Url: https://codereview.chromium.org/2052613002
Cr-Commit-Position: refs/heads/master@{#398908}
(cherry picked from commit bf6c1f850a7b75b5992d3f99d7a8b3d8f0488b24)

Review URL: https://codereview.chromium.org/2057143002 .

Cr-Commit-Position: refs/branch-heads/2743@{#314}
Cr-Branched-From: 2b3ae3b8090361f8af5a611712fc1a5ab2de53cb-refs/heads/master@{#394939}

[modify] https://crrev.com/06afa04922c0f13eca0576d3fa2cce3758307ee5/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsPreferences.java

Status: Fixed (was: Started)
verified in M53-53.0.2767.3 and not see any crash
Status: Verified (was: Fixed)
Project Member

Comment 14 by bugdroid1@chromium.org, Jun 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bf6c1f850a7b75b5992d3f99d7a8b3d8f0488b24

commit bf6c1f850a7b75b5992d3f99d7a8b3d8f0488b24
Author: avayvod <avayvod@chromium.org>
Date: Thu Jun 09 16:35:34 2016

[Android, Settings] Fix NPE when both media related site settings are enabled

Only look for AUTOPLAY preference if it's the only one enabled.

BUG= 618439 
TEST=manual

Review-Url: https://codereview.chromium.org/2052613002
Cr-Commit-Position: refs/heads/master@{#398908}

[modify] https://crrev.com/bf6c1f850a7b75b5992d3f99d7a8b3d8f0488b24/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsPreferences.java

Project Member

Comment 15 by bugdroid1@chromium.org, Jun 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/06afa04922c0f13eca0576d3fa2cce3758307ee5

commit 06afa04922c0f13eca0576d3fa2cce3758307ee5
Author: Anton Vayvod <avayvod@google.com>
Date: Fri Jun 10 12:11:42 2016

[Android, Settings] Fix NPE when both media related site settings are enabled

Only look for AUTOPLAY preference if it's the only one enabled.

BUG= 618439 
TEST=manual

Review-Url: https://codereview.chromium.org/2052613002
Cr-Commit-Position: refs/heads/master@{#398908}
(cherry picked from commit bf6c1f850a7b75b5992d3f99d7a8b3d8f0488b24)

Review URL: https://codereview.chromium.org/2057143002 .

Cr-Commit-Position: refs/branch-heads/2743@{#314}
Cr-Branched-From: 2b3ae3b8090361f8af5a611712fc1a5ab2de53cb-refs/heads/master@{#394939}

[modify] https://crrev.com/06afa04922c0f13eca0576d3fa2cce3758307ee5/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsPreferences.java

Sign in to add a comment