24.09 Release - Editor crashed randomly when leaving game mode [incorrect memory management] #18502
Labels
feature/azcore
This item is related to the AZ core engine support libraries.
feature/editor
This item is related to the editor subsystem.
kind/bug-2409
Used for stabilization/24.09 issues
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
priority/critical
Critical priority. Must be actively worked on as someone's top priority right now.
sig/core
Categorizes an issue or PR as relevant to SIG Core
Bug Description
The editor segfaults randomly when exiting game mode.
Debugging in LLDB traces this issue back to
o3de/Code/Framework/AzCore/AzCore/Memory/HphaAllocator.cpp
Line 1137 in c602b49
Assets-Required
Any o3de level
Steps to Reproduce
Repeatedly enter and leave game-mode from the editor in quick succession
Expected Behavior
No crash
Actual Behavior
The O3DE Editor segfaults, i.e. crashes with
signal SIGSEGV: invalid address (fault address: 0x0)
, randomly when exiting game mode. In our current project the Editor crashes in about 20% of the times exiting game mode, making this a significant hindrance for using O3DE productively.Screenshots/Videos
Three exemplary code paths
Found In Branch
main / 24.09.1 release
Commit ID From
c602b49
Desktop/Device
Ubuntu 22.04 LTS
64GB RAM, i9, RTX 3080 Mobile
Additional Context
Debugging in LLDB traces this issue back to
o3de/Code/Framework/AzCore/AzCore/Memory/HphaAllocator.cpp
Line 1137 in c602b49
The page struct
p
provided as argument to thealloc
functiono3de/Code/Framework/AzCore/AzCore/Memory/HphaAllocator.cpp
Lines 1130 to 1146 in c602b49
does not have a valid
mFreeList
member.Since the call to
alloc
stems fromo3de/Code/Framework/AzCore/AzCore/Memory/HphaAllocator.cpp
Line 1233 in c602b49
o3de/Code/Framework/AzCore/AzCore/Memory/HphaAllocator.cpp
Line 1243 in c602b49
nullptr
(sinceget_free_page()
explicitly checks forp->mFreeList
's presence),p
was created ino3de/Code/Framework/AzCore/AzCore/Memory/HphaAllocator.cpp
Line 1247 in c602b49
o3de/Code/Framework/AzCore/AzCore/Memory/HphaAllocator.cpp
Line 1196 in c602b49
In turn, this means that the
page
constructoro3de/Code/Framework/AzCore/AzCore/Memory/HphaAllocator.cpp
Lines 199 to 223 in c602b49
o3de/Code/Framework/AzCore/AzCore/Memory/HphaAllocator.cpp
Line 215 in c602b49
o3de/Code/Framework/AzCore/AzCore/Memory/HphaAllocator.cpp
Line 213 in c602b49
Ultimately, it appears that there is some logic error or race condition somewhere in the memory allocation procedure.
The text was updated successfully, but these errors were encountered: