Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Resolved Updating Playername and then leaving play mode results in memory leak

Discussion in 'Authentication' started by MidnightGameDeveloper, Apr 14, 2023.

  1. MidnightGameDeveloper

    MidnightGameDeveloper

    Joined:
    Apr 26, 2014
    Posts:
    114
    Hello,
    when using the new Player name management BETA in Authentication 2.5.0-pre.3 I get an memory leak after updating my playername the moment I leave the play mode in the editor. See full stack trace below:

    Code (CSharp):
    1. A Native Collection has not been disposed, resulting in a memory leak. Allocated from:
    2. Unity.Collections.NativeArray`1:.ctor(Byte[], Allocator) (at /Users/bokken/build/output/unity/unity/Runtime/Export/NativeArray/NativeArray.cs:69)
    3. UnityEngine.Networking.UploadHandlerRaw:.ctor(Byte[]) (at /Users/bokken/build/output/unity/unity/Modules/UnityWebRequest/Public/UploadHandler/UploadHandler.bindings.cs:95)
    4. Unity.Services.Authentication.AuthenticationApiClient:BuildWebRequest(String, WebRequestVerb, ApiRequestOptions, IApiConfiguration) (at Library/PackageCache/com.unity.services.authentication@2.5.0-pre.3/Runtime/Network/AuthenticationApiClient.cs:183)
    5. Unity.Services.Authentication.<SendAsync>d__19`1:MoveNext() (at Library/PackageCache/com.unity.services.authentication@2.5.0-pre.3/Runtime/Network/AuthenticationApiClient.cs:124)
    6. System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start(<SendAsync>d__19`1&)
    7. Unity.Services.Authentication.AuthenticationApiClient:SendAsync(String, WebRequestVerb, ApiRequestOptions, IApiConfiguration, CancellationToken)
    8. Unity.Services.Authentication.AuthenticationApiClient:PostAsync(String, ApiRequestOptions, IApiConfiguration, CancellationToken) (at Library/PackageCache/com.unity.services.authentication@2.5.0-pre.3/Runtime/Network/AuthenticationApiClient.cs:35)
    9. Unity.Services.Authentication.Generated.Api.<UpdateNameAsync>d__10:MoveNext() (at Library/PackageCache/com.unity.services.authentication@2.5.0-pre.3/Runtime/Generated/PlayerNames/Api/PlayerNamesApi.cs:213)
    10. System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start(<UpdateNameAsync>d__10&)
    11. Unity.Services.Authentication.Generated.Api.PlayerNamesApi:UpdateNameAsync(String, UpdateNameRequest, CancellationToken)
    12. Unity.Services.Authentication.<UpdatePlayerNameAsync>d__118:MoveNext() (at Library/PackageCache/com.unity.services.authentication@2.5.0-pre.3/Runtime/AuthenticationServiceInternal.cs:508)
    13. System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start(<UpdatePlayerNameAsync>d__118&)
    14. Unity.Services.Authentication.AuthenticationServiceInternal:UpdatePlayerNameAsync(String)
     
  2. Julian-Unity3D

    Julian-Unity3D

    Unity Technologies

    Joined:
    Apr 28, 2022
    Posts:
    189
    What version of the editor are you using?
     
  3. Julian-Unity3D

    Julian-Unity3D

    Unity Technologies

    Joined:
    Apr 28, 2022
    Posts:
    189
    I've confirmed with the engineers, they are aware and are working on a fix.
     
  4. MidnightGameDeveloper

    MidnightGameDeveloper

    Joined:
    Apr 26, 2014
    Posts:
    114
    Thanks!
     
    Julian-Unity3D likes this.