I’ve been working on an app for quite a while and never got this error until last week or so (after updating to 2021.1.2f1?) - and now it comes up all the time :-/
I don’t know if this is related, but also since around last week, the contents of any vertical layout group in my app now sometimes suddenly becomes invisible or wiped. This happens only occasionally and so far only on the Android and iOS builds, not when running the app in the editor, which makes it tricky to debug.
After finally figuring out how to enable full stacktrace, I got a bit stuck on how to use the trace information (see below) to solve the problem. The information doesn’t contain a reference to any code that i wrote myself, so I really don’t know what to do with this. Any pointers on how to continue would be appreciated.
Thanks!
A Native Collection has not been disposed, resulting in a memory leak. Allocated from:
Unity.Collections.NativeArray`1:.ctor(Byte, Allocator)
UnityEngine.Networking.UploadHandlerRaw:.ctor(Byte)
UnityEngine.Networking.UnityWebRequest:SetupPost(UnityWebRequest, WWWForm)
UnityEngine.Networking.UnityWebRequest:Post(String, WWWForm)
System.Reflection.MonoMethod:InternalInvoke(Object, Object, Exception&)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object, CultureInfo)
System.Reflection.MethodBase:Invoke(Object, Object)
Google.PortableWebRequest:StartRequest(HttpMethod, String, IDictionary`2, WWWForm) (at /Users/chkuang/Workspace/Git/unity-jar-resolver/source/VersionHandlerImpl/src/PortableWebRequest.cs:481)
Google.c__AnonStorey6:<>m__C() (at /Users/chkuang/Workspace/Git/unity-jar-resolver/source/VersionHandlerImpl/src/PortableWebRequest.cs:443)
Google.RunOnMainThread:ExecuteNext() (at /Users/chkuang/Workspace/Git/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:486)
Google.RunOnMainThread:m__12() (at /Users/chkuang/Workspace/Git/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:536)
Google.RunOnMainThread:RunAction(Action) (at /Users/chkuang/Workspace/Git/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:343)
Google.RunOnMainThread:ExecuteAllUnnested(Boolean) (at /Users/chkuang/Workspace/Git/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:530)
Google.RunOnMainThread:ExecuteAll() (at /Users/chkuang/Workspace/Git/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:512)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
Thanks! I have a lot of unitywebrequests - is it important to put them all in this construction wrapper? (And if it is really important, i suggest that Unity does this automatically in 2021.2.X and onwards ^.^)
– realragnvaldr@stream_in_space_ Could you elaborate a lit more. Where do I find the web request. My game is crashing as soon as I launch it. Is it because of this issue? because I used admediation with unity and inMobi plugin and it works fine in unity, but when I used the updated version of that from play Store on my mobile it is crashing as soon as I launch
– Chethan007