Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PaintingContext creates layer that is never disposed. #133939

Closed
polina-c opened this issue Sep 3, 2023 · 6 comments · Fixed by #134802
Closed

PaintingContext creates layer that is never disposed. #133939

polina-c opened this issue Sep 3, 2023 · 6 comments · Fixed by #134802
Labels
a: leak tracking Issues and PRs related to memory leaks detected by leak_tracker a: tests "flutter test", flutter_test, or one of our tests found in release: 3.14 Found to occur in 3.14 framework flutter/packages/flutter repository. See also f: labels. has reproducible steps The issue has been confirmed reproducible and is ready to work on P2 Important issues not at the top of the work list r: fixed Issue is closed as already fixed in a newer version team-framework Owned by Framework team triaged-framework Triaged by Framework team

Comments

@polina-c
Copy link
Contributor

polina-c commented Sep 3, 2023

PR: #133940

final OffsetLayer layer = child.updateCompositedLayer(oldLayer: null);
@polina-c polina-c changed the title PaintingContext create later that is never sisposed. PaintingContext creates level that is never disposed. Sep 3, 2023
@polina-c
Copy link
Contributor Author

polina-c commented Sep 3, 2023

@goderbauer and @chunhtai , can you help to triage it?

@danagbemava-nc danagbemava-nc added in triage Presently being triaged by the triage team framework flutter/packages/flutter repository. See also f: labels. team-framework Owned by Framework team and removed in triage Presently being triaged by the triage team labels Sep 4, 2023
@polina-c polina-c added the in triage Presently being triaged by the triage team label Sep 6, 2023
@polina-c
Copy link
Contributor Author

polina-c commented Sep 6, 2023

Adding this to triage to get it triaged.

@danagbemava-nc
Copy link
Member

Hi @polina-c, can you provide a complete minimal reproducible code sample?

PS: after adding the team-framework label the issue is now in the incoming list for the framework team so it will be picked up by secondary triage. in triage is usually used by primary triage.

@danagbemava-nc danagbemava-nc added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Sep 6, 2023
@polina-c
Copy link
Contributor Author

polina-c commented Sep 6, 2023

Steps:

  1. Convert the test 'InkFeature skips painting if intermediate node skips' to testWidgetsWithLeakTracking, the same way as the linked PR.
  2. run flutter test test/material/material_test.dart and see failures

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Sep 6, 2023
@danagbemava-nc
Copy link
Member

Reproducible using the steps outlined above.

test logs
To run this test again: /Users/nexus/dev/sdks/flutters/bin/cache/dart-sdk/bin/dart test /Users/nexus/dev/sdks/flutters/packages/flutter/test/material/material_test.dart -p vm --plain-name 'Border painting (tearDownAll)'
00:09 +41 -4: LookupBoundary (tearDownAll) [E]                                                                                                                                    
  Expected: leak free
    Actual: <Instance of 'Leaks'>
     Which: contains leaks:
            # The text is generated by leak_tracker.
            # For leak troubleshooting tips open:
            # https://github.com/dart-lang/leak_tracker/blob/main/doc/TROUBLESHOOT.md
            notDisposed:
              total: 4
              objects:
                PictureLayer:
                  test: InkFeature skips painting if intermediate node skips
                  identityHashCode: 1059258944
                ContainerLayer:
                  test: InkFeature skips painting if intermediate node skips
                  identityHashCode: 643197407
                PictureLayer:
                  test: InkFeature skips painting if intermediate node skips
                  identityHashCode: 892199783
                ContainerLayer:
                  test: InkFeature skips painting if intermediate node skips
                  identityHashCode: 925766089
            
            
  
  package:matcher                                                  expect
  package:flutter_test/src/widget_tester.dart 458:18               expect
  package:leak_tracker_flutter_testing/src/test_widgets.dart 81:5  _tearDownTestingWithLeakTracking
  ===== asynchronous gap ===========================
  dart:async                                                       _CustomZone.registerBinaryCallback
  package:leak_tracker_flutter_testing/src/test_widgets.dart 59:9  configureLeakTrackingTearDown.<fn>
flutter doctor -v
[✓] Flutter (Channel master, 3.14.0-14.0.pre.137, on macOS 13.4.1 22F770820d darwin-arm64, locale en-GB)
    • Flutter version 3.14.0-14.0.pre.137 on channel master at /Users/nexus/dev/sdks/flutters
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 83c24274bb (2 hours ago), 2023-09-07 01:20:06 -0400
    • Engine revision 187c5b3c5f
    • Dart version 3.2.0 (build 3.2.0-134.0.dev)
    • DevTools version 2.27.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/nexus/Library/Android/sdk
    • Platform android-33, build-tools 33.0.1
    • Java binary at: /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/223.8836.35.2231.10406996/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode-14.3.0.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.3)
    • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/223.8836.35.2231.10406996/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.2)
    • IntelliJ at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/232.8660.185/IntelliJ IDEA.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] IntelliJ IDEA Ultimate Edition (version 2023.2.1)
    • IntelliJ at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/232.9559.62/IntelliJ IDEA.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.81.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.72.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 13.4.1 22F770820d darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 116.0.5845.179

[✓] Network resources
    • All expected network resources are available.

• No issues found!

@danagbemava-nc danagbemava-nc added a: tests "flutter test", flutter_test, or one of our tests has reproducible steps The issue has been confirmed reproducible and is ready to work on found in release: 3.14 Found to occur in 3.14 and removed in triage Presently being triaged by the triage team labels Sep 7, 2023
@goderbauer goderbauer added P2 Important issues not at the top of the work list triaged-framework Triaged by Framework team labels Sep 12, 2023
@jacob314 jacob314 changed the title PaintingContext creates level that is never disposed. PaintingContext creates layer that is never disposed. Sep 13, 2023
@danagbemava-nc danagbemava-nc added the r: fixed Issue is closed as already fixed in a newer version label Sep 18, 2023
@polina-c polina-c added the a: leak tracking Issues and PRs related to memory leaks detected by leak_tracker label Sep 21, 2023
@github-actions
Copy link

github-actions bot commented Oct 5, 2023

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: leak tracking Issues and PRs related to memory leaks detected by leak_tracker a: tests "flutter test", flutter_test, or one of our tests found in release: 3.14 Found to occur in 3.14 framework flutter/packages/flutter repository. See also f: labels. has reproducible steps The issue has been confirmed reproducible and is ready to work on P2 Important issues not at the top of the work list r: fixed Issue is closed as already fixed in a newer version team-framework Owned by Framework team triaged-framework Triaged by Framework team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants