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

Issue 914541 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 13
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug



Sign in to add a comment

Memory leak from FaceDetector and TextDetector

Project Member Reported by reillyg@chromium.org, Dec 12

Issue description

Chrome Version: 72.0.3626.14
OS: Win10

What steps will reproduce the problem?
(1) Initialize a FaceDetector or TextDetector.
(2) Repeatedly call their detect() method.

What is the expected result?
Detecting features in an input should be possible indefinitely.

What happens instead?
The GPU process eventually crashes when it runs out of memory.
 
Labels: ShapeDetection
Project Member

Comment 2 by bugdroid1@chromium.org, Dec 13

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

commit 2766d748b8a0a8f546ce4c7357ce5c95ac21d71d
Author: Reilly Grant <reillyg@chromium.org>
Date: Thu Dec 13 17:52:36 2018

Fix memory leaks in FaceDetector and TextDetector on Windows

This code was previously using the ComPtr::GetAddressOf() method when
calling functions that output a COM object. This does not release its
reference to the object currently stored in the ComPtr. In at least one
instance, CreateWinBitmapWithPixelFormat(), this leads to a memory leak.
In other instances it is simply less readable than the alternative.

Bug:  914541 
Change-Id: I3a18e2ffba4538926a915d64918b13483a4fb6a1
Reviewed-on: https://chromium-review.googlesource.com/c/1375111
Commit-Queue: Robert Liao <robliao@chromium.org>
Reviewed-by: Robert Liao <robliao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616358}
[modify] https://crrev.com/2766d748b8a0a8f546ce4c7357ce5c95ac21d71d/services/shape_detection/detection_utils_win.cc
[modify] https://crrev.com/2766d748b8a0a8f546ce4c7357ce5c95ac21d71d/services/shape_detection/face_detection_impl_win.cc
[modify] https://crrev.com/2766d748b8a0a8f546ce4c7357ce5c95ac21d71d/services/shape_detection/face_detection_provider_win.cc
[modify] https://crrev.com/2766d748b8a0a8f546ce4c7357ce5c95ac21d71d/services/shape_detection/text_detection_impl_win.cc

Status: Fixed (was: Started)
Labels: -Pri-3 M-72 Merge-Request-72 Pri-1
Given the severity of this leak I would like to request a merge to M-72. The risk of this change is low because this is an experimental feature.
Project Member

Comment 5 by sheriffbot@chromium.org, Dec 14

Labels: -Merge-Request-72 Merge-Review-72 Hotlist-Merge-Review
This bug requires manual review: M72 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: govind@(Android), kariahda@(iOS), djmm@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Review-72 Merge-Approved-72
Project Member

Comment 7 by bugdroid1@chromium.org, Dec 14

Labels: -merge-approved-72 merge-merged-3626
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/244959fcf152d963a06bb08e046aa95b36da1ad7

commit 244959fcf152d963a06bb08e046aa95b36da1ad7
Author: Reilly Grant <reillyg@chromium.org>
Date: Fri Dec 14 22:31:45 2018

Fix memory leaks in FaceDetector and TextDetector on Windows

This code was previously using the ComPtr::GetAddressOf() method when
calling functions that output a COM object. This does not release its
reference to the object currently stored in the ComPtr. In at least one
instance, CreateWinBitmapWithPixelFormat(), this leads to a memory leak.
In other instances it is simply less readable than the alternative.

Bug:  914541 
Change-Id: I3a18e2ffba4538926a915d64918b13483a4fb6a1
Reviewed-on: https://chromium-review.googlesource.com/c/1375111
Commit-Queue: Robert Liao <robliao@chromium.org>
Reviewed-by: Robert Liao <robliao@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#616358}(cherry picked from commit 2766d748b8a0a8f546ce4c7357ce5c95ac21d71d)
Reviewed-on: https://chromium-review.googlesource.com/c/1379059
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/branch-heads/3626@{#370}
Cr-Branched-From: d897fb137fbaaa9355c0c93124cc048824eb1e65-refs/heads/master@{#612437}
[modify] https://crrev.com/244959fcf152d963a06bb08e046aa95b36da1ad7/services/shape_detection/detection_utils_win.cc
[modify] https://crrev.com/244959fcf152d963a06bb08e046aa95b36da1ad7/services/shape_detection/face_detection_impl_win.cc
[modify] https://crrev.com/244959fcf152d963a06bb08e046aa95b36da1ad7/services/shape_detection/face_detection_provider_win.cc
[modify] https://crrev.com/244959fcf152d963a06bb08e046aa95b36da1ad7/services/shape_detection/text_detection_impl_win.cc

Labels: Merge-Merged-72-3626
The following revision refers to this bug: 
https://chromium.googlesource.com/chromium/src.git/+/244959fcf152d963a06bb08e046aa95b36da1ad7

Commit: 244959fcf152d963a06bb08e046aa95b36da1ad7
Author: reillyg@chromium.org
Commiter: reillyg@chromium.org
Date: 2018-12-14 22:31:45 +0000 UTC

Fix memory leaks in FaceDetector and TextDetector on Windows

This code was previously using the ComPtr::GetAddressOf() method when
calling functions that output a COM object. This does not release its
reference to the object currently stored in the ComPtr. In at least one
instance, CreateWinBitmapWithPixelFormat(), this leads to a memory leak.
In other instances it is simply less readable than the alternative.

Bug:  914541 
Change-Id: I3a18e2ffba4538926a915d64918b13483a4fb6a1
Reviewed-on: https://chromium-review.googlesource.com/c/1375111
Commit-Queue: Robert Liao <robliao@chromium.org>
Reviewed-by: Robert Liao <robliao@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#616358}(cherry picked from commit 2766d748b8a0a8f546ce4c7357ce5c95ac21d71d)
Reviewed-on: https://chromium-review.googlesource.com/c/1379059
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/branch-heads/3626@{#370}
Cr-Branched-From: d897fb137fbaaa9355c0c93124cc048824eb1e65-refs/heads/master@{#612437}

Sign in to add a comment