Closed sunchangtan closed 1 year ago
@sunchangtan Thanks for the report. When you say memory leak, can you provide a video, a log or screenshot that shows it ? Also, please follow below steps and provide the details so that we can analyze it properly.
Furthermore, as you mentioned the memory leak in latest version (3.10.0), would be good to have comparison with previous stable so we know and can compare the results properly.
Make sure to verify on latest master version as well, so see if the claimed memory leak is consistent on that version too or not.
@darshankawar Thank you for your response, and I apologize for the delayed reply. Please take a look at the screenshots below. They are Xcode memory analysis and Dart memory analysis respectively. Additionally, I can confirm that Flutter 3.7.12 does not have this issue.
Thanks for the update. Did you run above in --profile
mode ? Also does latest master version show the same behavior too ?
Thanks for the update. Did you run above in
--profile
mode ? Also does latest master version show the same behavior too ?
@darshankawar I run in debug mode and release mode, the laster version 3.10.1 show the same behavior too !
Thanks for the update. But we would generally want to run in --profile
mode by enabling trace flutter run --profile --trace-skia
to properly capture which frames could be causing the leak.
I encountered the same BUG in v3.10.1 today, looking forward to solving it.
Revisiting the issue, I ran the add_to_app example using stable 3.7.12 and latest version and saw below behavior:
Based on above verification and original report, going ahead and adding applicable labels for team's input. Currently, won't add regression
as I mostly. see similar behavior when it comes to memory usage.
I encountered the same BUG in v3.10.1 today, looking forward to solving it.
The issue still exists in version 3.10.3.
同样遇到
The issue still exists in version 3.10.3, looking forward to solving it.
I found the same BUG in v3.10.0
The issue still exists in version 3.10.5
@cyanglaz, there was a reference cycle fixed on the macOS side that looks related to this https://github.com/flutter/engine/commit/6ff02c17268ff8d0dc0cf33c7df0ef76c66cecff. Are you looking into this? If so, just thought to put this on your radar!
Hope to solve this problem as soon as possible, our project has not been launched due to this problem
I have submitted a PR to solve this problem. flutter/engine#43379
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.
Is there an existing issue for this?
Steps to reproduce
this demo can reproduce https://github.com/flutter/samples/tree/main/add_to_app/multiple_flutters/multiple_flutters_ios
Expected results
FlutterViewController can release normal
Actual results
FlutterViewController memory leak
Code sample
this demo can reproduce https://github.com/flutter/samples/tree/main/add_to_app/multiple_flutters/multiple_flutters_ios
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]Logs
Logs
```console [Paste your logs here] ```Flutter Doctor output
[✓] Flutter (Channel stable, 3.10.0, on macOS 13.3.1 22E772610a darwin-arm64, locale zh-Hans-CN) • Flutter version 3.10.0 on channel stable at /Users/tank/Development/fvm-cache/stable • Upstream repository https://github.com/flutter/flutter.git • Framework revision 84a1e904f4 (2 days ago), 2023-05-09 07:41:44 -0700 • Engine revision d44b5a94c9 • Dart version 3.0.0 • DevTools version 2.23.1 • Pub download mirror https://pub.flutter-io.cn • Flutter download mirror https://storage.flutter-io.cn
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0) • Android SDK at /Users/tank/Library/Android/sdk • Platform android-33, build-tools 33.0.0 • ANDROID_HOME = /Users/tank/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694) • All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.2) • Xcode at /Users/tank/Downloads/Xcode.app/Contents/Developer • Build 14C18 • CocoaPods version 1.12.1
[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.2) • Android Studio at /Applications/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.6b802.4-9586694)
[✓] IntelliJ IDEA Ultimate Edition (version 2022.1.4) • IntelliJ at /Applications/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.78.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.64.0
[✓] Connected device (4 available) • Tank (mobile) • 00008120-0006248A2EF8C01E • ios • iOS 16.4.1 20E252 • iPhone 14 Pro Max (mobile) • D40CC530-5F72-4B9A-B820-84DBC57FB4E9 • ios • com.apple.CoreSimulator.SimRuntime.iOS-16-2 (simulator) • macOS (desktop) • macos • darwin-arm64 • macOS 13.3.1 22E772610a darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 113.0.5672.92
[✓] Network resources • All expected network resources are available.
• No issues found!