Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak
(Filename: ./Runtime/Allocator/ThreadsafeLinearAllocator.cpp Line: 539)
To Debug, enable the define: TLA_DEBUG_STACK_LEAK in ThreadsafeLinearAllocator.cpp. This will output the callstacks of the leaked allocations
(Filename: ./Runtime/Allocator/ThreadsafeLinearAllocator.cpp Line: 541)
also…
Internal: deleting an allocation that is older than its permitted lifetime of 4 frames (age = 12)
(Filename: ./Runtime/Allocator/ThreadsafeLinearAllocator.cpp Line: 313)
I don’t use Jobs or async operations except for LoadSceneAsync and UnloadSceneAsync.
The errors are intermittent, there will be a period when it spams the console, then a period of nothing… then a few here and there… then spam again etc. I have been trying to eliminate objects that might be causing it, but it seems like multiple things can cause it. I’ve had it go away when I disable the 1 directional light with shadow, some particle effects, or line renderers, but it’s not constantly a single type of object.
Only happening on IOS. I am testing on Iphone 6+. Windows/Editor and Mac/Editor do not have the issue.
Unity version 2019.1.5f1 (6f1140cf2297)
It would be really useful for Unity to allow us to enable some debug flag that would let us track where these allocations come from, because as it is now its internal and we have no way of debugging this that i know.
We’re also getting hundreds of these messages spamming the console using 2019.1.x (currently 2019.1.14f1) on some devices (eg. iPhone 5s, iOS 12.3.x) but not so many on others (eg. iPhone 8, X).
Same issue here, using Unity 2019.2.1f1 with Xcode 11 (beta 5). Testing on low end devices Iphone6 IOS 11 & 6 Plus IOS 12.4.
It is a pain in the neck to debug, blindly commenting out different parts of the scripts and testing. A stacktrace would be great to locate them precisely.
Update:
-One reason was casting or receiving shadows on meshes (or particles). After disabling them it was ok.
-But, there are other cases, now I notice that it occurs if I have a second (or third) active camera in scene that renders on render texture (car mirrors). If I disable the mirrors the game plays for hours without a glitch. If I enable them it throws this err in the first minutes.
Specifically, my newer test devices were not throwing any erroneous logs when running on XCode. So everything was looking good for release. My final check involves testing on older (and still dominant) devices. At which point the logs started being clogged with this issue.
Disabling shadows for the older devices solved the issue.
In future, I’ll continue to do my primary dev on the older devices …
Hello everyone, could someone submit a bug report regarding “Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak” errors on iOS and post the bug ID here?
So if a null error is thrown preventing a TempJob from being disposed in a round you will get this error. It will also keep stacking and not go away until you reboot the unity editor because the editor is tracking the thing you didn’t dispose.
If you get it a lot after restarting then I done know what can be done.
As followup - we are absolutely not running any Jobs code ourselves, but clearly there’s some internal stuff running it. This message also went away when I disabled the shadows completely.
@BuzzJive Totally, do you get it even if you’ve had no errors in the editor? Cause the internal stuff will get interrupted by an error and would get that job error. Just want a better stack trace for this…
@8bitgoose I think I understand what you are asking. There are no errors in our game at the time. Other platforms are running everything as expected. tvOS is running as expected as well, but it throws this Job Tempalloc error from seemingly nowhere - sometimes just occasionally, sometimes flooding the logs.
@BuzzJive Ah thanks for the confirmation. It took me weeks to figure out why it was happening and many posts before I realize what I was doing wrong. Pretty rough if you aren’t even touching the jobs systems :(.
Unity QA could not replicate the problem in my bug report (1182525). If anyone has a repro case handy please bug report it and reference case 1182525. I’ll try to make a repro for it when I get a moment.
@greg-harding From what I’ve seen it starts happening when the device starts lagging / overheating. On older ipads I get this warning almost constantly, but on an iPhone XS I only get it after a while once the phone has overheated and everything starts to get out of sync. So if they try to reproduce it with a very simple project and a cube on a recent device, they will never encounter the problem. If you have time try to give them a scene with 1,000,000 triangles + a bunch of post processing effects, lots of game objects with busy Update() methods, and tell them to test it on an iPhone 6S