#408

PES 2021 won't start: c0000018, its 441 MB fixed-base exe doesn't fit the 128 MB exe window

Opent0nn1xopened 9d ago

Fixed-base 441 MB main image cannot load: c0000018 (exe window 128 MB, pool too small)

Device: iPhone 16 Pro Max (iPhone17,2), Madeira 0.1.3 (release IPA), JIT via StikDebug Game: eFootball PES 2021, PES2021.exe (x64, D3D11)

What happensLaunch fails immediately: "The game stopped with Windows error 0xC0000018".

wine: failed to create main module for L"C:\\PES2021\\eFootball PES 2021\\PES2021.exe", status c0000018

Why (from the log and the PE header)

PES2021.exe can only run at its ImageBase:

  • ImageBase 0x140000000, SizeOfImage 0x1b97c000 (~441 MB)
  • Characteristics 0x23 (RELOCS_STRIPPED), DllCharacteristics 0x8120 (no DYNAMIC_BASE)

So it needs [0x140000000, 0x15b97c000), but the executable window is 128 MB (JITAllocator.c winsz = 0x8000000, StikJITHelper.swift exeWinSize), and the image is mapped high instead:

ml1040: executable window [0x140000000,+128MB) held since image load
ml1135: the placeholder was blocked at image load by a mapping at

0x14bd00000+0MB (VM tag 1, prot 3) ml1036: free holes >=64MB in [0x119000000,0x7000000000) with the window held:0x120d78000+498MB 0x14f000000+522MB 0x1700cc000+255MB ml1036: no hole fits a 896MB pool — SHRINKING to 512MB [jit-pool] image 0x7038010000+0x1b97c000 (PES2021.exe) → pool 0x14f005000 used=0x1b985000/0x20000000

Why just enlarging the window won't work

  • The low gap is ~1.4 GB. A 448 MB window at 0x140000000 plus a pool that holds a 441 MB image copy plus ntdll, the DLLs and the FEX code cache (~560 MB or more) don't both fit.
  • A malloc region (tag 1) already sits at 0x14bd00000, inside the needed window, before the constructor(101) claim runs.

Possible directions

  • Don't copy large fixed-base images whole into the RX pool (map the image as-is or JIT it lazily), so the window can grow without taking room from the pool.
  • Reserve a window sized to the game's SizeOfImage earlier (an option per game), or claim the range before anything else allocates there.

Happy to test builds and send full logs :D

Activity

2
intraducine3d ago

The same 128 MB executable-window limit is reported in #329 for a 183 MB fixed-base MapleStory image. Its follow-up reports that a local 192 MB window lets that smaller image load. That is useful evidence for sizing the window from the image. It does not make 192 MB sufficient for this 441 MB PES image.

The 64 GB Nexon reservation in #329 is separate. Both issues stay open. Draft #447 preserves failed fixed-address allocation semantics, but it does not add a larger executable window.

intraducine1d ago

Main now implements the PE-sized/configurable executable window requested here, through merged #461. fixedBaseWindowMB measures fixed-base images, and the pool setup tries to extend the window before placing the JIT pool. exe-window-mb is also available as an override.

Keeping this open for the 441-MB PES image on the reported device. The extension can still fail if an earlier mapping occupies the range, which was one of your observations. The new path reports that failure; I am not claiming a successful PES launch.