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

Issue 746409 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
(currently inactive on Chromium)
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug
Proj-XR
Proj-XR-VR

Blocking:
issue 739746



Sign in to add a comment

Fix potential android context leak in VrShellDelegate

Project Member Reported by wnwen@chromium.org, Jul 19 2017

Issue description

This warning will be turned on again once lint is fixed, so better to fix it now rather than break the build later:

/tmp/tmpzE56U8/SRC_ROOT1/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java:120 Do not 
place Android context classes in static fields; this is a memory leak (and also breaks Instant Run): StaticFieldLeak [warning]
    private static View sBlackOverlayView;                 
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

Comment 1 by wnwen@chromium.org, Jul 19 2017

Blocking: 739746
Components: UI>Browser>VR
Labels: Proj-VR M-61
Project Member

Comment 3 by bugdroid1@chromium.org, Jul 19 2017

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

commit a207e0dd9000045034b473c5ccf2b8cbf4722205
Author: Peter Wen <wnwen@chromium.org>
Date: Wed Jul 19 18:14:31 2017

Android: Re-enable lint

Android lint has been failing due to API level mismatch between lint and
platform-tools (26 vs 25). This is causing new lint errors to be
introduced. Ignore the API mismatch for now and re-enable lint so it at
least catches all other issues.

API warning will be re-enabled after platform-tools is rolled.

Bug:  739746 , 746409 
Change-Id: I339560498544462732300c5030381a0c67f25f1b
Reviewed-on: https://chromium-review.googlesource.com/577593
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Michael Thiessen <mthiesse@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487918}
[modify] https://crrev.com/a207e0dd9000045034b473c5ccf2b8cbf4722205/build/android/lint/suppressions.xml
[modify] https://crrev.com/a207e0dd9000045034b473c5ccf2b8cbf4722205/build/config/android/config.gni
[modify] https://crrev.com/a207e0dd9000045034b473c5ccf2b8cbf4722205/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java

Project Member

Comment 4 by bugdroid1@chromium.org, Jul 19 2017

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

commit 75542186279074de8d13aa11d7e9b0c658624835
Author: Tien-Ren Chen <trchen@chromium.org>
Date: Wed Jul 19 21:13:29 2017

Revert "Android: Re-enable lint"

This reverts commit a207e0dd9000045034b473c5ccf2b8cbf4722205.

Reason for revert: Lint error in downstream code.

Original change's description:
> Android: Re-enable lint
> 
> Android lint has been failing due to API level mismatch between lint and
> platform-tools (26 vs 25). This is causing new lint errors to be
> introduced. Ignore the API mismatch for now and re-enable lint so it at
> least catches all other issues.
> 
> API warning will be re-enabled after platform-tools is rolled.
> 
> Bug:  739746 , 746409 
> Change-Id: I339560498544462732300c5030381a0c67f25f1b
> Reviewed-on: https://chromium-review.googlesource.com/577593
> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> Reviewed-by: Michael Thiessen <mthiesse@chromium.org>
> Commit-Queue: Peter Wen <wnwen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#487918}

TBR=mthiesse@chromium.org,wnwen@chromium.org,agrieve@chromium.org

Change-Id: I4857cf1ba5f10b009155693a803df922036f1878
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  739746 ,  746409 
Reviewed-on: https://chromium-review.googlesource.com/578059
Reviewed-by: Tien-Ren Chen <trchen@chromium.org>
Commit-Queue: Tien-Ren Chen <trchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487983}
[modify] https://crrev.com/75542186279074de8d13aa11d7e9b0c658624835/build/android/lint/suppressions.xml
[modify] https://crrev.com/75542186279074de8d13aa11d7e9b0c658624835/build/config/android/config.gni
[modify] https://crrev.com/75542186279074de8d13aa11d7e9b0c658624835/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java

Project Member

Comment 5 by bugdroid1@chromium.org, Jul 20 2017

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

commit 99ff879f6fc416a1181e9a8a68c1686281b8c7e2
Author: Peter Wen <wnwen@chromium.org>
Date: Thu Jul 20 13:06:33 2017

Reland "Android: Re-enable lint"

Original CL: http://crrev.com/c/577593

Fixes: Suppress lint errors for downstream targets.

TBR=mthiesse@chromium.org,agrieve@chromium.org

Bug:  739746 , 746409 
Change-Id: Ib069fed8e77d1a55d75ae71592cea6096c46ff47
Reviewed-on: https://chromium-review.googlesource.com/577966
Reviewed-by: Peter Wen <wnwen@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488220}
[modify] https://crrev.com/99ff879f6fc416a1181e9a8a68c1686281b8c7e2/build/android/lint/suppressions.xml
[modify] https://crrev.com/99ff879f6fc416a1181e9a8a68c1686281b8c7e2/build/config/android/config.gni
[modify] https://crrev.com/99ff879f6fc416a1181e9a8a68c1686281b8c7e2/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java

Comment 6 by wnwen@chromium.org, Aug 9 2017

Hi Yash, friendly ping if you can plan a fix to the underlying issue and remove suppression. You think this quarter is okay or too busy?

Comment 8 by ymalik@chromium.org, Aug 10 2017

Labels: -M-61 M-62
Yes I can take a look.
Labels: -Pri-1 Pri-2
Labels: -Pri-2 Pri-1
Back to Pri-1 as the lint warning is scary, but probably wrong (I don't think we're actually leaking contexts, but we should make sure).
Summary: Fix potential android context leak in VrShellDelegate (was: Fix StaticFieldLeak lint warning)
Cc: ymalik@chromium.org
 Issue 744549  has been merged into this issue.
Project Member

Comment 13 by bugdroid1@chromium.org, Aug 14 2017

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

commit 4702e7a76d2700297846145db0b0ab7d994c11dc
Author: Yash Malik <ymalik@google.com>
Date: Mon Aug 14 21:10:08 2017

[vr] Fix potential android context leak in VrShellDelegate

This CL removes a static reference to the black overlay view used to hide 2D
Chrome UI when entering VR mode.

Bug:  746409 
Change-Id: I0f9ba1dbb8d6da4496526fd44685b44d902c04b0
Reviewed-on: https://chromium-review.googlesource.com/612847
Commit-Queue: Yash Malik <ymalik@chromium.org>
Reviewed-by: Yash Malik <ymalik@chromium.org>
Reviewed-by: Michael Thiessen <mthiesse@chromium.org>
Reviewed-by: Yusuf Ozuysal <yusufo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494190}
[modify] https://crrev.com/4702e7a76d2700297846145db0b0ab7d994c11dc/chrome/android/java/res/values/ids.xml
[modify] https://crrev.com/4702e7a76d2700297846145db0b0ab7d994c11dc/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java

Comment 14 by wnwen@chromium.org, Aug 28 2017

Thank you!
Status: Fixed (was: Assigned)

Sign in to add a comment