Search Unity

Unity UI iOS memory keep increasing infinitely when have animated UI element

Discussion in 'UGUI & TextMesh Pro' started by kactus223, Jun 19, 2019.

  1. kactus223

    kactus223

    Joined:
    May 20, 2014
    Posts:
    35
    Recently I've faced an extraordinary memory leak in the UI system. Game memory consumption keeps increasing when there is an animated UI item (an Image, for instance). I leave the game idly run without any interaction and see in XCode, memory increases about 1MB every 5 seconds and doesn't stop until the OS runs out of memory and terminate the game. If I disable the canvas that contains that Image, memory stops increasing immediately. I've checked Profiler and noticed that in Memory section, Used Total and Reserved Total doesn't increase at all. But in CPU Usage section, there is a 2KB GC Alloc every frame caused by Canvas.SendWillRenderCanvases(). I think this is the cause of the leak, but I can't find a way to eliminate it. I've also tried setting up a similar environment on an empty project but haven't faced the leak. Did we do something wrong?
     

    Attached Files:

  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    Please submit a bug-report as described in this document:
    https://unity3d.com/unity/qa/bug-reporting

    It's important that you report these issues together with a reproduction project if you want them to get fixed. If you don't do it, it might be a long time until someone else reports them or until Unity Technologies find them.

    After you submitted the bug-report, you receive a confirmation email with a bug-report Case number. Please post the Case number (number only, not the link) in this forum thread for Unity staff to pick up.