This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/DRA745: memory leak when do animation

Part Number: DRA745

Tool/software: Linux

Dear Android (6AM.1.X) expert,

This issue was found on DRA745 running Andoird 6AM.1.2.

When do scaling and transparency changes for two imageviews to show an animation. The memory consumption of the application keep increasing at speed about 15MB per hour.

This might not be memory leak in our code as it's quite a simple one and we have check it carefully.

We doubt it may caused by graphich related HAL or PVR driver.

We also install our application to on DRA7XX_EVM board runing pure 6AM.1.3 prebuilt image from TI website. This issue still happened.

However, this doesn't happened on 6AL.1.2.

So please Android/Dra7xx expert familarly 6AM.1.X help us fixing this issue.

Thanks!

Li Guangyu

Software engineer from Singulato auto

  • Hi Li,

    can you provide the test app so the Android experts can investigate the issue?

    Thanks,
    Yordan
  • Hi Li,

    I have forwarded your question to Android graphics experts.

    Regards,
    Yordan
  • Thanks for Yordan's kindly help!

    We also test this application on other Android 6.01 device (a qualcomm android phone), and there has no such memory leak being noticed.
    So it's possible that there are something introduce this issue in 6AM release.

    Regards,
    Guangyu
  • Hi Guangyu,

    Thanks for the test application, that will certainly help in reproducing and understanding the issue much faster. We are still currently ascertaining the issue and will provide update on any finding. Just so that we are looking at the same numbers, how are you tracking the memory leak - /proc/meminfo or something else.

    Thanks,
    Gowtham
  • Hi Gowtham,

    We run command "dumpsys meminfo com.smartcar.animationmemorytest" and will find the native heap keep growing.
    Meanwhile, a decrease of lowmemory could be noticed.

    Regards,
    Guangyu
  • Hi Gowtham,

    We run command dumpsys meminfo com.smartcar.animationmemorytest and the native heap keep growing.
    Meanwhile, the free space of lowmemory keep decreasing.

    Regards,
    Guangyu
  • Hi Guangyu,

    There is no update on this yet, however I confirm that we are seeing the
    behavior you mentioned with the test application and will post update when we
    more details.

    Thanks,
    Gowtham
  • Hi Gowtham,

    Thanks for your updating on this issue.
    Also we have done some test trying to find some clue, here is the update.

    We found another procedure (application) that will lead to memory leak, and the leaked memory is low memory, not high memory as in previous test.
    The application name is PVRmemoryleakdemo, I will upload both APK and source code.

    Test steps:
    1, install the apk and change the setting to allow PVRMemoryLeakDemo run on the top layer, othere wise it will crash.
    2, run this app and press button "switch window".
    3, run command "dumpsys meminfo com.smartcar.pvrmemoryleakdemo" and pay attention to "Private Other"
    4, each time "switch window" was pressed, "Private Other" will increase.

    The test was done on EVM with android release 6AM.1.3 with ro.sf.lcd_density=320, however if set ro.sf.lcd_density=160, no memory leak will happened.

    Hope this BUG can be caught and fixed soon.

    Best Regards!
    Guangyu Lipvrissue.7z

  • Dear Gowtham,

    Is there any news for this issue?
    One more tips, to change ro.sf.lcd_density from 160 to 320, we could pull out build.prop, modify it, remount system the push it back.

    Best Regards,
    Guangyu Li
  • Dear Gowtham,

    Here is some update:
    We tried with 6AM.1.3-P1, memory leak is still there.
    Then we tried 6AO.1.0, no memory leak noticed.

    Wish this could be helpful for you to trace this issue.

    Best Regards,
    Guangyu Li
  • Hi Guangyu,

    Thanks for the update, it is quite an interesting observation. There hasn't been
    much difference in the graphics binaries from 6AM1.3-P1 to 6AO1.0. So far from
    your analysis, the following holds (correct me if I am mistaken)

    • No issue seen with 6AL1.2 and 6AO1.0 releases.
    • Issue is seen with 6AM1.3 and 6AM1.3-P1 releases.
    • With 6AM1.x release the issue is seen with `ro.sf.lcd_density=320` and not with `ro.sf.lcd_density=160`.

    Couple of questions

    • You have attached two scenarios where this is noticed, have you seen this for more scenarios or is this restricted to these two from your testing so far.
    • Do you see memory being reclaimed on closing the application.

    I have tried reproducing this issue with our intermediate release leading to
    6AO1.0 and could not reproduce in it. So far its likely isolated to 6AM1.3
    release. I don't have any updates on the fix yet but this is still in active
    debug.

    Thanks,
    Gowtham