Closed dazuo0312 closed 11 months ago
I have the same problem
free It's not a wayland framework problem, flutter's 🐞。You can use frame animation to solve this problem。
free It's not a wayland framework problem, flutter's 🐞。You can use frame animation to solve this problem。 Can you provide a demo? I use frame animation, but the problem still exists. Animationcontroller is used. Webp animation also has this problem. The demo runs under elinux-x11 and there is no problem. Only when running under Wayland can there be a problem. It may be flutter-elinux's bug. The following is a memory screenshot of the demo running under X11 The following is a memory screenshot of the demo running under wayland
Webp animation on Android , the memory is ok ?
Webp animation on Android , the memory is ok ?
yes
Webp animation on Android , the memory is ok ?
yes
Flutter version is 2.5.2 ?
Webp animation on Android , the memory is ok ?
yes
Flutter version is 2.5.2 ?
Flutter version is :2.5.0 or 2.8.1.
We have the same problem, and in addition to the approaches already mentioned, we can confirm that Lottie and Flare cause memory leaks as well, which means that there is basically no way of doing animations at the moment.
Flutter version: 2.10.3
Unfortunately, I couldn't reproduce this issue using hmi_ani. I used x64 Linux host and Weston.
@HidenoriMatsubayashi I used ARM64, Debian, NXP iMX8. There is this problem on the arm64 board.
Yes, I am also experiencing the leak on arm64. Btw, here is the source code that contains a frame animation, as well as Lottie, and Flare animations
Can anyone use debugging tools like Valgrind
to investigate the memory leak points?
Using valgrind does not work, the program will not start correct. I have tried using google/sanitizers that are build in the flutter engine, used LSAN and ASAN, but they only report heap used, but not where the leak is.
Hello. I was able to reproduce it on RPi4. I think the problem will be improved with the following patch.
--- a/src/flutter/shell/platform/linux_embedded/window/elinux_window_wayland.cc
+++ b/src/flutter/shell/platform/linux_embedded/window/elinux_window_wayland.cc
@@ -233,6 +233,7 @@ const wp_presentation_feedback_listener
self->window_decorations_->Draw();
}
+ wp_presentation_feedback_destroy(wp_presentation_feedback);
wp_presentation_feedback_add_listener(
::wp_presentation_feedback(self->wp_presentation_,
self->native_window_->Surface()),
@@ -249,6 +250,7 @@ const wp_presentation_feedback_listener
self->window_decorations_->Draw();
}
+ wp_presentation_feedback_destroy(wp_presentation_feedback);
wp_presentation_feedback_add_listener(
::wp_presentation_feedback(self->wp_presentation_,
self->native_window_->Surface()),
I see. Thanks. Would it be possible for you to send the PR?
Closing.
Flutter -elinux runtime environment: ARM64, Debian, NXP iMX8
The interface runs to display GIF images, and the memory continues to increase, starting at 286M, 12 hours later, up to 900M. flutter-elinux build elinux --release -d elinux-wayland Here is sample code for the test. hmi_ani