Search Unity

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:
    123
    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:
    192
    What version of the editor are you using?
     
  3. Julian-Unity3D

    Julian-Unity3D

    Unity Technologies

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

    MidnightGameDeveloper

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