Skip to content

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

Description

@polina-c

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

Activity

  1. self-assigned this
    on Aug 26, 2022
  2. 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.[/+] on Aug 26, 2022
  3. added
    P2important to work on, but not at the top of the work list.
    and removed on Jul 5, 2023
  4. removed their assignment
    on Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2important to work on, but not at the top of the work list.devtools-logging-screenIssues with the Logging screen

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions