This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Memory leaks?

Former Member
Former Member
Hi
I've noticed, that after killing processes of Connect it restarts automatically and takes about 50-60 MB of RAM on my phone just after restart. But after couple of hours, memory usage grows to 150, 200, or even 400MB (that is my record).
Is it normal?
Just after restart, Connect starts immediately. But when background processes take 100-200 MB of RAM, it takes about 40-60 seconds to run it.
My phone: Sony Xperia Z Ultra, Android 5.1.1
  • Former Member
    0 Former Member over 9 years ago
    A few questions that will help us track down leaks:

    What Garmin device are you using with Connect Mobile? What Android version? How do you typically use the app? What parts of the app do you use the most?

    Thanks


    Vivoactive,
    Andoid 5.0
    I use only notifications right now, started the app only to see why I didn't received any notifications although they poped up on my phone

    I do understand that the software development cycles are getting shorter, but please: do at least some tests BEFORE your release your software to the clients. It is not ready, it is not even in alpha state.
  • 102

    And we are again at 350MB RAM usage for garmin connect. I have not started the app manually, since my last message. I'm pretty sure that syncing over bluetooth with my 920xt increases memory though.. Is that helping in any way? I fear I can't provide any more detailed RAM statistics with the production apk.

    Herberts-iMac:platform-tools herbert$ ./adb shell dumpsys meminfo com.garmin.android.apps.connectmobile -d
    * daemon not running. starting it now on port 5037 *
    * daemon started successfully *
    Applications Memory Usage (kB):
    Uptime: 580919322 Realtime: 929154893

    ** MEMINFO in pid 17145 [com.garmin.android.apps.connectmobile] **
    Pss Private Private Swapped Heap Heap Heap
    Total Dirty Clean Dirty Size Alloc Free
    ------ ------ ------ ------ ------ ------ ------
    Native Heap 222035 221844 0 0 236352 225888 10463
    Dalvik Heap 131177 131064 0 0 150583 134976 15607
    Dalvik Other 4448 4448 0 0
    Stack 496 496 0 0
    Other dev 8 0 8 0
    .so mmap 224 76 0 0
    .apk mmap 4 0 0 0
    .dex mmap 76 8 68 0
    .oat mmap 187 0 8 0
    .art mmap 1244 1132 0 0
    Other mmap 8 8 0 0
    Unknown 85 84 0 0
    TOTAL 359992 359160 84 0 386935 360864 26070

    App Summary
    Pss(KB)
    ------
    Java Heap: 132196
    Native Heap: 221844
    Code: 160
    Stack: 496
    Graphics: 0
    Private Other: 4548
    System: 748

    TOTAL: 359992 TOTAL SWAP (KB): 0

    Objects
    Views: 67125 ViewRootImpl: 0
    AppContexts: 3951 Activities: 0
    Assets: 6 AssetManagers: 6
    Local Binders: 28 Proxy Binders: 24
    Parcel memory: 17 Parcel count: 70
    Death Recipients: 1 OpenSSL Sockets: 0

    SQL
    MEMORY_USED: 189
    PAGECACHE_OVERFLOW: 12 MALLOC_SIZE: 62

    DATABASES
    pgsz dbsz Lookaside(b) cache Dbname
    4 20 14 0/15/1 /data/user/0/com.garmin.android.apps.connectmobile/databases/gcm_swings.db
    4 2692 147 70/47/15 /data/user/0/com.garmin.android.apps.connectmobile/databases/gcm_cache.db
    Herberts-iMac:platform-tools herbert$
  • Former Member
    0 Former Member over 9 years ago
    That info helps give us some real world data. I am running a Nexus 5 (6.01) and a Fenix 3 and am only seeing about 80MB usage. I see similar mem usage on an LG G4, and other phones. It's very difficult to track down memory usage issues with so many combinations of phones, Android versions, and Garmin devices. We will continue to try and track down memory leaks as we find them.
  • Let me know how I can be of any assistance. If you provide me with a debug build I could even get you a memory dump or allocation statistics. For me it's pretty easy to reproduce, just don't restart the phone for a few days :)
  • Former Member
    0 Former Member over 9 years ago
    Just to add, me too :-(. I've had a Vivosmart HR for a few months now, and started to notice my Nexus 5 (not rooted, latest Android) slow down after about a week of use. I've had over 520 Mb of memory in use!

    Rebooting always resolves the problem ... it's a leak. But the issue always returns, sometimes the same day, sometimes after a few days. My Vivosmart seems to get regular updates - the last this morning. About a week ago I thought an update had fixed the issue, as memory use was low for several days, but then it returned.

    I do use notifications - the point of this device! - with cardio sessions logged each morning (err... except at weekends and through all too regular lazy spells).

    After my now regular reboot this morning, following a sync after my cardio session (relevant??), 3-hour average memory use is "usable" at 110 Mb. When it gets over 300 Mb my phone essentially becomes unusable as I approach my device limit.

    I too would be happy to assist in any way if it expedites a resolution to this issue!

    Mike
  • Former Member
    0 Former Member over 9 years ago
    What Garmin device are you using with Connect Mobile? What Android version? How do you typically use the app? What parts of the app do you use the most?

    FWIW.. GCM 3.3.2 on Android 4.4.2 (Samsung Galaxy S5) when used for notifications only and not for syncing, can run for weeks, always using 80 Mb +/- 10 Mb.
    @CRAIGLP: Is there any indication when the Auto Upload On/Off switch will be re-enabled? I'm looking forward to use newer versions and see how they behave. but not without that switch.
  • Former Member
    0 Former Member over 9 years ago
    ... when used for notifications only and not for syncing ...

    Have you evidence that it is regular sync updates that are causing the leak? Just curious!
    Again this morning I had to reboot my phone - this is becoming a necessity. It was fine yesterday evening, then this morning Connect was using 528MB, down from a max of 591MB. My N5 only has 2GB available, so this just isn't tenable.
    Other posts have indicated that ~80MB is normal. Currently I'd welcome that amount, but what's the reason Connect needs at least four times the memory of other Android apps? It's rare that any app I have needs more than 20MB.
  • Former Member
    0 Former Member over 9 years ago
    Have you evidence that it is regular sync updates that are causing the leak? Just curious!

    I have no evidence, it may be a coincidence. I noticed that the few of people I know who use GCM, mentioned that they have to reboot their phone every day. I am on an old version of GCM, do not sync activities, and it's always around 80 Mb.
  • Former Member
    0 Former Member over 8 years ago
    It was fine yesterday evening, then this morning Connect was using 528MB, down from a max of 591MB. My N5 only has 2GB available, so this just isn't tenable.

    This morning Connect was using 670Mb - my new record! - from ~110Mb the previous evening. My N5 was charging overnight, so this isn't Doze. I had no interaction with my phone in this period.
  • Former Member
    0 Former Member over 8 years ago
    Initial indication are that the update from a couple of days ago has significantly improved this memory leak. :cool: I've not seen >83 Mb consumed in this time.