Skip to content

RtlpxLookupFunctionTable loading issues with ARM64 #3828

@Yannick-DG

Description

@Yannick-DG

Environment

  • Host OS: macOS (Apple Silicon / ARM64)
  • Virtualization: Parallels Desktop (ARM64 Windows guest)
  • Architecture: ARM64 / Windows on Arm (WoA)
  • FiveM version: Latest (as of filing)

Description

I've been trying to get FiveM running on macOS via Parallels Desktop on Apple Silicon, and I'm running into what seems to be a launch failure. After some digging and help of the community (https://discord.com/channels/192358910387159041/1474014400368087201), I think they've narrowed it down to two related things that might be worth looking into.

1. xtajit64.dll detection on ARM64 environments

There's a check in [SEHTableHandler.Win32.cpp#L191](https://github.com/citizenfx/fivem/blob/4281018060ac92e91b0f728da36ee5e96ec6381b/code/client/citicore/SEHTableHandler.Win32.cpp#L191) and [ComponentLoader.cpp#L175](https://github.com/citizenfx/fivem/blob/4281018060ac92e91b0f728da36ee5e96ec6381b/code/client/citicore/ComponentLoader.cpp#L175) that looks something like:

if (baseAddress && GetModuleHandle(L"xtajit64.dll") == nullptr)

On Windows on Arm (like in a Parallels environment), xtajit64.dll is Microsoft's x86/x64 JIT emulation layer and is always loaded when running x64 binaries. So the == nullptr check will never be true here, which might cause that code path to behave unexpectedly. It's also worth noting that Microsoft has introduced a newer version called xtajit64se.dll as the updated emulation layer on newer ARM systems.

Expected behavior

Ideally FiveM would either launch successfully in a Parallels ARM64 environment, or if the platform genuinely can't be supported right now show a clear and friendly message letting users know why, rather than failing silently.


Actual behavior

FiveM fails to launch without a clear explanation. Based on the research above, the xtajit64.dll detection logic and EOS Anti-Cheat's VM restrictions seem to be the likely culprits.


I've also heard there's this feature freeze, but it'd be really good to have this fix done so we can continue contributing also on MacOS like we could before.

Appreciate for your time!

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageNeeds a preliminary assessment to determine the urgency and required action

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions