Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak

Hi,

We have a lot of users of the GameAnalytics SDK reporting to us that they get the following warning:

Internal: JobTempAlloc has allocations
that are more than 4 frames old - this
is not allowed and likely a leak at
GameAnalyticsSDK.Events.GA_Debug.HandleLog
(System.String logString,
System.String stackTrace,
UnityEngine.LogType type) <0x00000 +
0xffffffff> 0 in
<00000000000000000000000000000000>:0
at
UnityEngine.Application+LogCallback.Invoke
(System.String condition,
System.String stackTrace,
UnityEngine.LogType type) <0x00000 +
0xffffffff> 0 in
<00000000000000000000000000000000>:0
at
UnityEngine.Application.CallLogCallback
(System.String logString,
System.String stackTrace,
UnityEngine.LogType type,
System.Boolean invokedOnMainThread)
<0x00000 + 0xffffffff> 0 in
<00000000000000000000000000000000>:0

To Debug, enable the define:
TLA_DEBUG_STACK_LEAK in
ThreadsafeLinearAllocator.cpp. This
will output the callstacks of the
leaked allocations at
GameAnalyticsSDK.Events.GA_Debug.HandleLog
(System.String logString,
System.String stackTrace,
UnityEngine.LogType type) <0x00000 +
0xffffffff> 0 in
<00000000000000000000000000000000>:0
at
UnityEngine.Application+LogCallback.Invoke
(System.String condition,
System.String stackTrace,
UnityEngine.LogType type) <0x00000 +
0xffffffff> 0 in
<00000000000000000000000000000000>:0
at
UnityEngine.Application.CallLogCallback
(System.String logString,
System.String stackTrace,
UnityEngine.LogType type,
System.Boolean invokedOnMainThread)
<0x00000 + 0xffffffff> 0 in
<00000000000000000000000000000000>:0

But we can’t really reproduce it ourselves. So I want to hear if there are anyone who knows what goes wrong.

Here are links to the source of the files affected:
https://raw.githubusercontent.com/GameAnalytics/GA-SDK-UNITY/master/Unity%205/GameAnalytics/Plugins/Scripts/Events/GA_Debug.cs
https://raw.githubusercontent.com/GameAnalytics/GA-SDK-UNITY/master/Unity%205/GameAnalytics/Plugins/Scripts/GameAnalytics.cs

Hope someone can help with some tips to how to solve this.

Thanks,

Martin
Lead SDK Developer @ GameAnalytics

I haven’t seen this during development. But I have only seen in my GameAnalytics Dashboard after I launch the game.
I also get another warning “To Debug, enable the define TLA_DEBUG_STACK_LEAK, … at GameAnalyticsSDK.Events.GA_Debug.HandleLog…”
I’m not sure what to do with that.

I had a similar issue even with the latest version of GameAnalytics. After a little bit search, I found that the problem is somehow related to the high fps of the game. I solved it by setting “Vsync Count = Every V Blank”. It was “Don’t sync” before. Setting “Application.targetFrameRate = 60” might also help.


Spoke too soon. Problem persists.


I finally solved my problem. You can read it here.

https://forum.unity.com/threads/assetbundles-aup-textures-jobtempalloc-has-allocations-that-are-more-than-4-frames-old.774440/#post-5860951