devtools icon indicating copy to clipboard operation
devtools copied to clipboard

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

Open polina-c opened this issue 3 years ago • 0 comments

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 avatar Aug 26 '22 18:08 polina-c