What is TLS Allocator ALLOC_TEMP_THREAD, underlying allocator ALLOC_TEMP_THREAD has unfreed allocations and how do I fix it.
So I was just minding my own business making a quick little game in Unity2D and then I got these error that I am unsure of how to fix or what they mean:
TLS Allocator ALLOC_TEMP_THREAD, underlying allocator ALLOC_TEMP_THREAD has unfreed allocations, size 28
and Allocation of 28 bytes at 0000022F800000B0
I am assuming these are being caused by a memory leak but I am not sure and nothing in my code looks like it would cause a memory leak.
Here is the only script I have in my game right now: using UnityEngine; public class PlayerMovement : MonoBehaviour { protected float speed = 10.0f; protected float jumpSpeed = 15.0f; protected bool isGrounded = false; public Rigidbody2D rb2; void Update() { if (Input.GetKey(KeyCode.A) || Input.GetKey(KeyCode.LeftArrow)) { rb2.AddForce(transform.right * -speed); } else if (Input.GetKey(KeyCode.D) || Input.GetKey(KeyCode.RightArrow)) { rb2.AddForce(transform.right * speed); } else if (Input.GetKeyDown(KeyCode.Space) || Input.GetKeyDown(KeyCode.UpArrow)) { if (isGrounded) { rb2.AddForce(transform.up * jumpSpeed); } } } void OnCollisionEnter2D(Collision2D col) { if (col.gameObject.tag == "Ground") { isGrounded = true; } } void OnCollisionExit2D(Collision2D col) { isGrounded = false; } }
(^ yeah i know it's really messy don't judge me) So what in this script is causing this error
Answer by j-millen · Nov 04, 2020 at 04:06 PM
@ZenTheDev1 I was having this in Unity 2020.1. I removed the Allegorithmic substance support, including Editor modifications, and the errors went away.
Answer by stfunity · Dec 22, 2021 at 11:35 AM
This is one of those kind of errors where frankly console should realize it's the Editor sh*dding the bed and stop making it everyone else's problem. I am busy beta testing stuff and it clogs the console with useless errors.
Answer by dustinmorman93 · Jan 22 at 02:25 AM
I had the same issue after updating my project to a newer version. It was specifically happening after I would push my changes with the Collab tool. Turns out the issue was I didn't add WebGL to the new version and had forgot I had done some testing early on with WebGL in the project and hadn't removed everything pertaining to it. After adding the WebGL Module to the Unity version this issue was fixed.
Answer by Jonathan-Bro · Feb 21 at 03:59 PM
Happens on 2020.3.28 as well after publishing an update to Collaborate. Restarting Unity shuts the message up, but it's a lousy solution.
Answer by theosname · Apr 19, 2021 at 12:37 PM
Also getting a similar error on 2020.3.4f1 and 2020.3.3 but only once after I build the game into WebGL. After building though, if I try to run the game in the editor, I get 999+ of the same errors.
I saw a post years ago about this same issue in Unity 5.3 or something, and they fixed the errors in the editor by reimporting all the assets in the project which works for me. But, Unity devs don't want people doing this as it is time and resource intensive so I submitted a bug report for those reasons and because I think the errors are why the build won't play on learn.unity.com. This is not surprising, but I can't build the game without causing the errors again so I can't publish the newest version of my game. :/