question

nadrabu3 avatar image
nadrabu3 asked

Is still the SDK error:" A Native Collection has not been disposed, resulting in a memory leak" unsolved?

I'm making a game in Unity, using the Playfab to make a leaderboard. I'm still having the error relative the SDK that is well known, has someone find the solution ? The complete error message is :" 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[]) PlayFab.Internal.d__12:MoveNext() (at Assets\PlayFabSDK\Shared\Internal\PlayFabHttp\PlayFabUnityHttp.cs:117) UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) UnityEngine.MonoBehaviour:StartCoroutineManaged2(MonoBehaviour, IEnumerator) UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator) PlayFab.Internal.PlayFabUnityHttp:MakeApiCall(Object) (at Assets\PlayFabSDK\Shared\Internal\PlayFabHttp\PlayFabUnityHttp.cs:107) PlayFab.Internal.PlayFabHttp:_MakeApiCall(String, String, PlayFabRequestCommon, AuthType, Action`1, Action`1, Object, Dictionary`2, Boolean, PlayFabAuthenticationContext, PlayFabApiSettings, IPlayFabInstanceApi) (at Assets\PlayFabSDK\Shared\Internal\PlayFabHttp\PlayFabHTTP.cs:232) PlayFab.Internal.PlayFabHttp:MakeApiCall(String, PlayFabRequestCommon, AuthType, Action`1, Action`1, Object, Dictionary`2, PlayFabAuthenticationContext, PlayFabApiSettings, IPlayFabInstanceApi) (at Assets\PlayFabSDK\Shared\Internal\PlayFabHttp\PlayFabHTTP.cs:133) PlayFab.PlayFabEventsInstanceAPI:WriteEvents(WriteEventsRequest, Action`1, Action`1, Object, Dictionary`2) (at Assets\PlayFabSDK\Events\PlayFabEventsInstanceAPI.cs:118) PlayFab.Public.ScreenTimeTracker:Send() (at Assets\PlayFabSDK\Entity\ScreenTimeTracker.cs:190) PlayFab.Public.ScreenTimeTracker:OnApplicationFocus(Boolean) (at Assets\PlayFabSDK\Entity\ScreenTimeTracker.cs:165) PlayFab.Internal.PlayFabHttp:OnApplicationFocus(Boolean) (at Assets\PlayFabSDK\Shared\Internal\PlayFabHttp\PlayFabHTTP.cs:338) UnityEditorInternal.InternalEditorUtility:OnGameViewFocus(Boolean) UnityEditor.PlayModeView:SetFocus(Boolean) UnityEditor.GameView:OnLostFocus() UnityEditor.HostView:OnLostFocus()

sdks
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Xiao Zha avatar image
Xiao Zha answered

What's the version of the PlayFab Extension, PlayFab SDK and Unity? And could you please provide some code snippet or detailed reproduce steps so that we can reproduce the issue for better research? Also, you may try to update the PlayFab Extension and SDK to the latest version and use the LTS version of Unity to see if the issue still exists. You can find the latest version on PlayFab/UnitySDK: Unity C# SDKs for PlayFab (github.com).

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.