How I can identify why a Flutter app crashing?

68 Views Asked by At

I have been developing an application in Flutter for a few months and when I went to test it, I had the following problem after a few hours of consecutive execution, the app ran out of memory, I tried to check if they were variables or instances, but I was not successful, anyone Would you help me?

2

There are 2 best solutions below

0
Suat Özkaya On

You can try to examine the memory tab in the dev tools. You can take different memory snapshot at different pages, also you see the objects in memory and use garbage collector to see if anything changes.

https://docs.flutter.dev/tools/devtools/memory

https://medium.com/@fluttergems/mastering-dart-flutter-devtools-memory-view-part-7-of-8-e7f5aaf07e15

0
WizardKing On

If you are in VSCode, press cmd/ctrl + alt + d and select Open Memory Page option to view memory usage by Flutter Application.

Or select Open DevTools in Web Browser for all the tools in one place.