Welcome, Guest

Author Topic: Trying to track down a memory leak in Coherent 1.14.5.10 - XBox, Unreal 4.16.3  (Read 111 times)

aduran

  • Posts: 1
    • View Profile
I'm trying to track down a memory leak involving the Unreal Coherent GT plugin on an XBoxOne.

We unload all the javascript/html pages and then some time later, reload them, and now use more memory than before - as tracked through our allocator override (which logs to Unreal Engine Stats).  I connected the inspector and can see that on the timeline the "Document Count" and "DOM Node Count" both increase - and the inspector verifies the additional memory usage that I saw in Unreal(although it does not list as much memory as Unreal does - I assume because Unreal is tracking internal system allocations that are always loaded).  The leak is not small - up to 15 megs per occurrence.

I've attempted to destroy the Coherent::UIGT::UISystem(and recreate it when needed) but that doesn't free all the memory, even if I force font unloading, document cache unloading, etc.

I tried turning on "InspectorJSMemoryStats" but I cannot see that it made any difference in the information available to me in the Inspector.

Additional Questions
  • Is there a way to find out, in the inspector, which documents are loaded?
  • Is there a way to force Coherent UI GT to relinquish all memory allocated?
  • How can I see the data from InspectorJSMemoryStats in the inspector?

Thank you.



Tony

  • Administrator
  • *****
  • Posts: 28
    • View Profile
Hey aduran,

Straight to your questions:

1. To check the loaded resources in the HTML page you can use the Inspector tool and specifically the Network tab. There you can see all the requested resources along with their status, type, load time and other attributes of the resource.

2. In order to remove all Coherent GT-related resources, you can call FreeUIGTLibraryResources to unload most modules used by Coherent UI GT and free all memory kept for quick initialization. This method should be called after the last Uninitialize call. One thing worth mentioning is that after the FreeUIGTLibraryResources is being called the library can't be used anymore during the program run.

3. Enabling the InspectorMemoryStats allows you to examine the memory used by the major calls of our API -  Layout, Paint and Recalculate Styles. In order to do so, first, you have to enable those stats via a UISystem method - system->InspectorJSMemoryStatsEnabled(true);. Do keep in mind that this can have a performance impact and it should be used only for debugging purposes.

Once you can share info on the project you’re working on, feel free to shoot us an email at support@coherent-labs.com so we could further help tackle this.

Hope this helps!

Tony,
Support Engineer at Coherent Labs

Tags: