xenia
xenia copied to clipboard
KernelState::TerminateTitle does not reset memory w/ XamLoaderLaunchTitle
The title is just an assumption, but here's the stripped down log: https://gist.github.com/Nukem9/6f96e39fe00243c1c2d6114c67382e9a
Relevant lines:
(First module load SP) i> 000010A8 Launching module...
https://gist.github.com/Nukem9/6f96e39fe00243c1c2d6114c67382e9a#file-xenia-cod4-log-L354
d> 00000024 KernelState::TerminateTitle
https://gist.github.com/Nukem9/6f96e39fe00243c1c2d6114c67382e9a#file-xenia-cod4-log-L842
(Second module load MP) i> 0000161C Launching module...
https://gist.github.com/Nukem9/6f96e39fe00243c1c2d6114c67382e9a#file-xenia-cod4-log-L1133
!> 00000024 BaseHeap::Alloc failed to find contiguous range
https://gist.github.com/Nukem9/6f96e39fe00243c1c2d6114c67382e9a#file-xenia-cod4-log-L1165
COD4 then tries to relaunch itself multiple times using less memory:
d> 00000024 (DebugPrint) PHYSICAL_MEMORY_SIZE needs to be reduced to around 52 (365953024 smaller)
d> 00000024 (DebugPrint) PHYSICAL_MEMORY_SIZE needs to be reduced to around -6 (426770432 smaller)
It eventually overflows and loops infinitely on MmAllocatePhysicalMemoryEx
.
I placed a breakpoint on Memory::Reset() and it's never called...causing subsequent allocs to fail.
Good spot!
There is similar behaviour when you launch 2 different titles - the file system is not reset and has multiple devices with file conflicts.
This is a pretty big one and should be easy to fix, so I am bumping it.
I will look at this as time permits.
I cleared up one issue of the x64 JIT storing important constants in guest memory - don't think there's much more that we need to clear up.
I launched 360menuv3 but as you say the app hangs when I try to launch a game. if anyone gets this fixed I would love to test it!