Description
I created special repo for reproduce: https://github.com/DisDis/flutter-pi-oom
Host:
- clone flutter-pi-oom
- copy gen_snapshot_linux_x64 to project root
- Build release version ./build_linux.sh && ./build_aot.sh
RaPi:
- create flutter-pi-oom folder and flutter-pi-oom/images
- copy flutter-pi, icudtl.dat, libflutter_engine.so.debug, libflutter_engine.so.release to flutter-pi-oom/
- copy flutter-pi-oom/build/flutter_assets to RaPi flutter-pi-oom/flutter_assets
- extract images.7z all files to flutter-pi-oom/images
- delete images.7z
- exec ./run.sh or flutter in release mode
- wait 10min, OOM :)
This application does not consume memory directly.
However, the 'buff/cache'(in TOP command) is leaking gradually.
Init: 761mb 'buff/cache'
After 1min: 1339mb
after 3min: 2195mb
after 5min: 3048mb
after 8min: 3400mb
System slows down
after KILL process: buff/cache free
MySystem : RaPi4 (4Gb)
i tried on kernel:
Linux raspberrypi 5.4.35-v7l+ #1314 SMP Fri May 1 17:47:34 BST 2020 armv7l GNU/Linux
and
Linux raspberrypi 4.19.118-v7l+ #1311 SMP Mon Apr 27 14:26:42 BST 2020 armv7l
the result is the same.
I noticed that memory leak happens after somes effects 'DepthEffect, ForegroundToBackgroundEffect...' ( see https://github.com/DisDis/flutter-pi-oom/blob/master/lib/effects.dart#L18 and https://github.com/DisDis/flutter-pi-oom/blob/master/lib/main.dart#L85 )