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. Dismiss Notice

Bug New ECS project - persistent allocation memory leak - intel macbook 2018, macOS 14 - Unity 2022.3.01

Discussion in 'Editor & General Support' started by tomm408, Oct 9, 2023.

  1. tomm408

    tomm408

    Joined:
    Dec 25, 2020
    Posts:
    4
    Hi,

    I'm using an intel Macbook Pro 2018, MacOS 'Sonoma' 14.0 (23A344).

    In an attempt to find the cause of the memory leak mentioned below, I've created a new project and set up the following:
    - Unity 2022.3.0f1
    - Using the URP template
    - Imported the basic packages for ECS (UnityPhysics / Entities / Burst / Collections)
    - Created a floor and sphere within a subscene

    As soon as I add any items to my ECS subscene with colliders/Rigidbodies, entering play mode produces the warning. If there are no items in the sub scene the warning doesn't appear:
    'Leak Detected : Persistent allocates 14 individual allocations.
    #0 GetStacktrace(int)
    #1 DebugStringToFile(DebugStringToFileData const&)
    #2 LeakDetection::CheckForLeaks()
    #3 CallbackArray::Invoke()
    #4 ProfilerCallbackInvoke<CallbackArray, &GlobalCallbacks::domainUnloadComplete>::Invoke(char const*)
    #5 MonoManager::CreateAndSetChildDomain()
    #6 MonoManager::BeginReloadAssembly(DomainReloadingData&)
    #7 MonoManager::ReloadAssembly()
    #8 Internal_ADB_Only_ReloadAllUsedAssemblies()
    #9 RefreshInternalV2(AssetDatabase::UpdateAssetOptions, ScanFilter const&, InternalRefreshFlagsV2)
    #10 StopAssetImportingV2Internal(AssetDatabase::UpdateAssetOptions, InternalRefreshFlagsV2, ScanFilter const*, char const*)
    #11 EditorSceneManager::RestoreSceneBackups(dynamic_array<EditorSceneBackup, 0ul>&, EditorSceneManager;PlayModeChange)
    #12 PlayerLoopController::EnterPlayMode()
    #13 PlayerLoopController::SetIsPlaying(bool)
    #14 Application::TickTimer()
    #15 -[EditorApplication TickTimer]
    #16 __NSFireTimer
    #17 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
    #18 __CFRunLoopDoTimer
    #19 __CFRunLoopDoTimers
    #20 __CFRunLoopRun
    #21 CFRunLoopRunSpecific
    #22 RunCurrentEventLoopInMode
    #23 ReceiveNextEventCommon
    #24 _BlockUntilNextEventMatchingListInModeWithFilter
    #25 _DPSNextEvent
    #26 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
    #27 -[NSApplication run]
    #28 NSApplicationMain
    #29 EditorMain(int, char const**)
    #30 main
    #31 start'
    -------------------------------------------------------------------------------------------------------------------------------------------

    Does anybody have an idea for where I might start trying to fix this. I'm a bit out of my depth here because I'm not sure which file(s) I should be investigating.

    Many thanks,
    Tom
     
    Last edited: Oct 9, 2023