Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@blasten
Copy link

@blasten blasten commented Feb 28, 2021

I encountered these issues while debugging customer:money app.

  1. Memory leak:
┬───
│ GC Root: Global variable in native code
│
├─ android.database.ContentObserver$Transport instance
│    Leaking: UNKNOWN
│    ↓ ContentObserver$Transport.mContentObserver
│                                ~~~~~~~~~~~~~~~~
├─ io.flutter.view.AccessibilityBridge$3 instance
│    Leaking: UNKNOWN
│    Anonymous subclass of android.database.ContentObserver
│    ↓ AccessibilityBridge$3.this$0
│                            ~~~~~~
├─ io.flutter.view.AccessibilityBridge instance
│    Leaking: UNKNOWN
│    ↓ AccessibilityBridge.platformViewsAccessibilityDelegate
│                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
├─ io.flutter.plugin.platform.PlatformViewsController instance
│    Leaking: UNKNOWN
│    ↓ PlatformViewsController.overlayLayerViews
│                              ~~~~~~~~~~~~~~~~~
├─ android.util.SparseArray instance
│    Leaking: UNKNOWN
│    ↓ SparseArray.mValues
│                  ~~~~~~~
├─ java.lang.Object[] array
│    Leaking: UNKNOWN
│    ↓ Object[].[0]
│               ~~~
├─ io.flutter.embedding.android.FlutterImageView instance
│    Leaking: YES (View.mContext references a destroyed activity)
│    mContext instance of *****.app.MainActivity with mDestroyed = true
│    View#mParent is set
│    View#mAttachInfo is null (view detached)
│    View.mWindowAttachCount = 1
│    ↓ FlutterImageView.mContext
╰→ *****.app.MainActivity instance
  1. RunsOnCreationTaskRunner/FML_DCHECK_TASK_RUNNER_IS_CURRENT check had a bug if thread merging is enabled. The unit test shows the bug.

  2. Added leakcanary to start performing memory leak tests in the scenario app. (Will follow up with more instructions on how to use it as I learn more).

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on
    writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.
  • The reviewer has submitted any presubmit flakes in this PR using the engine presubmit flakes form before re-triggering the failure.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@blasten blasten added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Mar 2, 2021
@fluttergithubbot fluttergithubbot merged commit 735876e into flutter:master Mar 2, 2021
cbracken pushed a commit to flutter/flutter that referenced this pull request Mar 4, 2021
* aa3bb5e [web] Fix painting of last placeholder in paragraph (flutter/engine#24716)

* a5ae18b [web] Fix pointer events for Wacom pen (flutter/engine#24719)

* 4993c8e Roll Skia from d863ae52d4bb to 036ba86489d7 (3 revisions) (flutter/engine#24732)

* 7f1de85 Roll Dart SDK from f209e60a5415 to 761ed531161f (1 revision) (flutter/engine#24730)

* 44ba1cc Roll Skia from 036ba86489d7 to 786d42c6dac4 (1 revision) (flutter/engine#24733)

* 735876e Fix memory leak and bug in the RunsOnCreationTaskRunner check (flutter/engine#24690)

* 454d29c Roll Skia from 786d42c6dac4 to 12e760e958a7 (10 revisions) (flutter/engine#24738)

* 2c605fd Roll Fuchsia Linux SDK from tJbtmEE4Q... to YhRvbuj9c... (flutter/engine#24739)

* bf97442 Roll Skia from 12e760e958a7 to e80e169ba4c1 (1 revision) (flutter/engine#24740)

* 4d2caac Fix UWP build for UpdateCursorRect rename (flutter/engine#24697)

* 83b2f8f Roll Fuchsia Mac SDK from PRe0w0i4z... to 4TE5n81B-... (flutter/engine#24745)

* 410dd6f Roll Dart SDK from 761ed531161f to f527ddd39bb1 (3 revisions) (flutter/engine#24746)

* 91d9278 Roll Dart SDK from f527ddd39bb1 to 041a6dd2e76b (1 revision) (flutter/engine#24749)

* 03e0a11 Roll Fuchsia Linux SDK from YhRvbuj9c... to _0kewDFPJ... (flutter/engine#24750)

* f5b1351 Roll Skia from e80e169ba4c1 to acf26501fb5a (4 revisions) (flutter/engine#24752)

* 21de22a Roll Skia from acf26501fb5a to a1e30a3a280a (5 revisions) (flutter/engine#24753)

* e29fd6d Roll Fuchsia Mac SDK from 4TE5n81B-... to kPp_BF0q3... (flutter/engine#24759)

* de78d2a Roll Skia from a1e30a3a280a to f0de96f7b82a (7 revisions) (flutter/engine#24760)

* a33687d Roll Skia from f0de96f7b82a to 46d9bb255df4 (2 revisions) (flutter/engine#24762)

* 95215b7 Roll Dart SDK from 041a6dd2e76b to b9302efc8d9a (3 revisions) (flutter/engine#24764)

* 4aeffbe Move CIPD package creation tools under tools/cipd (flutter/engine#24766)

* 8ef7b63 Roll Skia from 46d9bb255df4 to e4ef35caa1bc (9 revisions) (flutter/engine#24769)

* 4bef5f8 Enables semantics when voice control is turned on (flutter/engine#24640)

* a546f16 Roll Fuchsia Linux SDK from _0kewDFPJ... to _vRi_XkB7... (flutter/engine#24771)

* e31cdad Added dependency on CppWinRT for UWP builds (flutter/engine#24770)

* a5ba994 Roll Skia from e4ef35caa1bc to 4db57264955f (1 revision) (flutter/engine#24772)

* 3cf4f1d Revert "[web] Fix painting of last placeholder in paragraph (#24716)" (flutter/engine#24773)

* 91120b3 Roll Skia from 4db57264955f to 21c8ad62cd82 (2 revisions) (flutter/engine#24774)
renyou added a commit that referenced this pull request Mar 8, 2021
renyou added a commit that referenced this pull request Mar 9, 2021
renyou added a commit to renyou/engine that referenced this pull request Mar 9, 2021
renyou added a commit that referenced this pull request Mar 9, 2021
renyou added a commit that referenced this pull request Mar 10, 2021
* Revert "Fix memory leak and bug in the RunsOnCreationTaskRunner check (#24690)" (#24874)

This reverts commit 735876e.

* Roll Skia from 07ee548d5bcd to da076e9aca26 (41 revisions) (#24914)

Co-authored-by: skia-flutter-autoroll <[email protected]>
hjfreyer pushed a commit to hjfreyer/engine that referenced this pull request Mar 22, 2021
hjfreyer pushed a commit to hjfreyer/engine that referenced this pull request Mar 22, 2021
chriscraws pushed a commit to chriscraws/engine that referenced this pull request Mar 23, 2021
chriscraws pushed a commit to chriscraws/engine that referenced this pull request Mar 23, 2021
@blasten blasten deleted the memory_test branch March 30, 2021 23:44
blasten pushed a commit to blasten/engine that referenced this pull request Mar 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes platform-android waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants