Standard Side Menu App Freezes after multiple launches - doh!

Hi there good people! I was having freezing problems with my Android 4.4.2 side menu type app and decided to try reproduce the error using the standard template from Ionic, which gave the same issue on multiple phones.

Steps to reproduce:

  1. sudo ionic start myapp sidemenu
  2. cd myapp
  3. sudo ionic platform add android
  4. sudo ionic run android
  5. In the new app, navigate to a menu, then, press back key until you exit
  6. Relaunch the app via the icon, and repeat step 5
  7. Do this about 5 times until the app freezes!

So far have tested this on a Samsung S4 and S5 running Android 4.4.2 All seem to freeze. Anyone else having issues with this? Running on a Motorolla with Android 5.1 is fine.

Cheers
Shaun

EDIT 1: I have just tested using the tabs template, same problem!

EDIT 2: If I press the Home button to get to Android’s home screen whilst the app is frozen, and then relaunch the app, it is unfrozen (until a complete the above steps again!)

EDIT 3 I added console logs to the various menu items. These are still firing when I tap on them, and showing on the Chrome ADB console logs, even though the display is frozen.

It seems to have something to do with resources not being released in Android 4.4.2 when you leave the app and re-enter multiple times (even though I could not pick up anything significant in the heap snapshots on Chrome ADB). If you force stop the app once you leave via Android Setttings, then all fine when you re-enter.

My advice, report this at Ionic GitHub repository.

But only if you can’t find a problem.

Tell me have you used remote Chrome debugging?

Morning, thanks for the reply! Yes, I use the Chrome ADB debugging tool to debug remotely when running on the phone, awesome tool. In this case nothing shows up in the console, and the heap snapshots don’t seem to show me any significant memory loss (though I am not an expert at going through the heap logs) Also the CPU snapshot shows idle at 99%. I have put some console logs in the various menu items, and these still fire and show in the console even though the screen does nothing!

Have just tested with Android 5.1 and the problem does not exist there, just on 4.4.2 it seems

I am having a very similar issue. My app freezes when it changes pages. Did you ever figure out a solution to this???

I am also having a very similar issue. I have built two ionic apps. Both worked perfectly on the phone for a few days, and then would freeze on the splash screen. Any solutions for this? OR, has anyone deployed an ionic app on the phone and had it continue to work without self-destructing in a few days? And if so, did you take any extra steps?