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

Open
Nukem9 opened this Issue Jun 27, 2016 · 3 comments

Projects

None yet

4 participants

@Nukem9
Contributor
Nukem9 commented Jun 27, 2016 edited

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.

@x1nixmzeng
Contributor

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
XeClutch commented Aug 6, 2016

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

@DrChat
Collaborator
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