Skip to content

Logging screen is leaking with not-GCed _LoggingScreenState, in profile mode. #4416

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

Open
polina-c opened this issue Aug 26, 2022 · 0 comments
Assignees
Labels
P2 important to work on, but not at the top of the work list. screen: logging Issues with the Logging screen

Comments

@polina-c
Copy link
Contributor

polina-c commented Aug 26, 2022

Follow https://github.com/flutter/devtools/blob/master/packages/devtools_app/lib/src/screens/memory/panes/leaks/LEAK_TRACKING.md for DevTools with disabled inspector screen, in profile mode, connected to the counting app.

Navigate from page to page and resize screens till getting non-GCed leaks in console.

Connect another instance of DevTools to the first one to get the leaks:

not-gced:
  total: 4820
  culprits: 25
  victims: 4795
  objects:
    _LoggingScreenState:
      identityHashCode: 706266221
      retainingPath:
        - /Root-0
        - /Isolate-0
        - package:flutter/src/widgets/binding.dart/WidgetsFlutterBinding-785502347
        - package:flutter/src/widgets/framework.dart/BuildOwner-1134452307
        - dart.collection/_InternalLinkedHashMap-0
        - dart.core/_List-0
        - package:flutter/src/widgets/framework.dart/StatefulElement-89914675
        - package:flutter/src/widgets/navigator.dart/NavigatorState-287530411
        - dart.core/_GrowableList-0
        - dart.core/_List-0
        - package:flutter/src/widgets/navigator.dart/_RouteEntry-466314405
        - package:flutter/src/material/dialog.dart/DialogRoute-3140187413
        - dart.core/_Closure-1712828922
        - /Context-797029043
        - dart.core/_Closure-4001193036
        - /Context-3533831527
        - package:devtools_app/src/screens/logging/logging_screen.dart/_LoggingScreenState-706266221
      total-victims: 4771
flutter --version
Flutter 3.0.1-0.0.pre.2590 • channel leak-tracking2 • [email protected]:polina-c/flutter.git
Framework • revision b8c5124e61 (5 hours ago) • 2022-08-26 09:11:08 -0700
Engine • revision 46f80d4196
Tools • Dart 2.19.0 (build 2.19.0-142.0.dev) • DevTools 2.16.0
@polina-c polina-c added the screen: logging Issues with the Logging screen label Aug 26, 2022
@polina-c polina-c self-assigned this Aug 26, 2022
@polina-c polina-c added the P4 label Aug 26, 2022
@polina-c polina-c changed the title Logging screen is leaking with not-GCed _LoggingScreenState in profile mode. Logging screen is leaking with not-GCed _LoggingScreenState, in profile mode. Aug 26, 2022
@kenzieschmoll kenzieschmoll added P2 important to work on, but not at the top of the work list. and removed P4 labels Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 important to work on, but not at the top of the work list. screen: logging Issues with the Logging screen
Projects
None yet
Development

No branches or pull requests

2 participants