KernelState::TerminateTitle does not reset memory w/ XamLoaderLaunchTitle #591

Nukem9 opened this Issue Jun 27, 2016 · 3 comments


None yet

4 participants

Nukem9 commented Jun 27, 2016 edited

The title is just an assumption, but here's the stripped down log:

Relevant lines:
(First module load SP) i> 000010A8 Launching module...
d> 00000024 KernelState::TerminateTitle
(Second module load MP) i> 0000161C Launching module...
!> 00000024 BaseHeap::Alloc failed to find contiguous range

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.

XeClutch commented Aug 6, 2016

This is a pretty big one and should be easy to fix, so I am bumping it.

DrChat commented Sep 21, 2016 edited

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment