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

Usage question #154

Closed
deckerst opened this issue Oct 19, 2023 · 3 comments
Closed

Usage question #154

deckerst opened this issue Oct 19, 2023 · 3 comments

Comments

@deckerst
Copy link

I wanted to give this package a try and did the following:

  1. added leak_tracker to pubspec (resolving to leak_tracker v9.0.6),
  2. added the following before runApp:
  LeakTracking.start();
  MemoryAllocations.instance.addListener(
    (event) => LeakTracking.dispatchObjectEvent(event.toMap()),
  );

which is not what's in README, but which is in the minimal example,
3) launched my app in debug mode on a real device,
4) opened DevTools (v2.25.0) > Memory tab > Detect Leaks tab (where I see several leak detection logs),
5) pressed Analyze and Download.

It fails with the following feedback: Error: TypeError: Instance of 'minified:JP': type 'minified:JP' is not a subtype of type 'minified:GP'

And for what it's worth, I also see in the browser dev console the following log (when launching DevTools, but I don't know whether it's related to the issue here):
Attempted to call extension 'ext.flutter.inspector.structuredErrors', but no service with that name exists

Using Flutter Channel stable, 3.13.8, on Ubuntu 23.04 6.2.0-34-generic, locale en_GB.UTF-8.

Am I doing something wrong?

@polina-c
Copy link
Contributor

polina-c commented Nov 2, 2023

Thank you for your question.

At the moment the package is unstable and is work in progress. Our first priority is to clean up memory leaks in Flutter Framework and enable regression testing for leaks.

This is how you can help to enable it faster:

  1. Vote here: leak_tracker MVP flutter/devtools#6266 (comment)
  2. Contribute here: Clean up memory leaks in Flutter Framework, phase 2. flutter/flutter#137311

Does it help?

@polina-c polina-c closed this as completed Nov 2, 2023
@deckerst
Copy link
Author

deckerst commented Nov 2, 2023

Actually I've already used the package and it helped me fix many leaks, but I was curious about the integration in DevTools. Thanks for working on this!

@polina-c
Copy link
Contributor

polina-c commented Nov 2, 2023

Good to know! For integration with DevTools you can vote/comment here: #172

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants