Skip to content

[BUG]: [Regression] Older Intel Macs: Crash on launch after v1.7.5849 (Memory Map failure) #11728

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
shinra-electric opened this issue Aug 19, 2024 · 15 comments · May be fixed by #11734
Open

Comments

@shinra-electric
Copy link

Describe the Bug

PCSX2 crashes on launch on older Intel Macs with the following error message:

Failed to map data memory at an acceptable location

Reproduction Steps

I tried updating PCSX2 on an old Intel MacBook Air, and it crashed at launch. I bisected the builds, with v1.7.5847 working fine and all builds from v1.7.5849 were broken. (There was no v1.7.5848 release).

Because the crash was instant at launch, there were no logs. However I noticed that if I enable logging as well as the log window (in the previous build), an alert would pop up and I could get a screenshot of the log window.

I tested on a 2015 MacBook Air:
2.2Ghz Core i7
Intel HD 6000

Also tested on a 2015 MacBook Pro with the same results:
2.7 Ghz Core i5
Intel Iris Graphics 6100

(I should also note that they are both running Sonoma via OCLP, though this shouldn't be an issue since v1.7.5847 works fine).

Screenshot 2024-08-19 at 17 03 47 Screenshot 2024-08-19 at 17 04 05 ![Screenshot 2024-08-19 at 17 12 14](https://github.com/user-attachments/assets/9dbe1eb4-ff73-4faf-9b44-a6bd22d741f0)

Expected Behavior

No response

PCSX2 Revision

v1.7.5849

Operating System

macOS 14 (Sonoma)

If Linux - Specify Distro

No response

Logs & Dumps

No response

@ynazar1
Copy link

ynazar1 commented Aug 20, 2024

Maybe the MAC build isn't universal or using ARM only features/flags? Working here on M1 Max. Sonoma 10.16.1 I don't have any games to test on mac, but it starting UI perfectly fine.

@TellowKrinkle TellowKrinkle linked a pull request Aug 21, 2024 that will close this issue
@shinra-electric
Copy link
Author

I can confirm that #11734 fixes this on my 2015 MBP 👍🏼

@lightningterror lightningterror added this to the Release 2.2 milestone Aug 22, 2024
@jimjamyaha
Copy link

I can confirm that #11734 fixes this on my 2015 MBP 👍🏼

Excellent - have you run this on a self-compiled version with the patch/change included?

@shinra-electric
Copy link
Author

Excellent - have you run this on a self-compiled version with the patch/change included?

No, I used the CI build from the GitHub action for this PR.

@jimjamyaha
Copy link

This fixes the issue for me. MacBook Pro 2012, OCLP, Sonoma 14.6.1.

@atarixle
Copy link

atarixle commented Sep 16, 2024

BTW the same change in Duckstation lets it crash too. The build before "use mach routines for VM mem ... something" works.

@Alius17
Copy link

Alius17 commented Dec 18, 2024

Tested versions until latest nightly 2.3.66 and confirm not working ( Intel i5 Macbook pro 2015, 16gb Ram, MacOS Sequoia; Intel Xeon x5690 Mac Pro 2010, 32gb Ram, RX580 8Gb Vram, MacOS Sequoia), same error occurs and app crashes instantly. Version 1.7.5847 works well in both computers. If you need help testing any version, would gladly do so.

@lightningterror lightningterror pinned this issue Jan 12, 2025
@yayakotto
Copy link

Hey,

I have a 2016 MacBook Pro and im having this very issue with that same message. I've updated my Mac along with opencore legacy patch. Is there something I need to download based on what this thread has found? Need some guidance.

@Alius17
Copy link

Alius17 commented Feb 24, 2025

Just install Version 1.7.5847 from the same page, and dont update till further notice. Works fine if you don't update. Good luck!

@yayakotto
Copy link

Thanks man, so I tried that and all the app icon does when click to open it is that it bounces up and down on my dock like it's about to open but never does. then when It does stop bouncing it just stays still without officially opening. You ever run into that issue?

@Alius17
Copy link

Alius17 commented Feb 24, 2025

No, but you have to give permission to the app (full disk access) an also, you can check another usa bios file, or if you are in sequoia, allow permission from third party apps. Hope this helps. If not maybe you could post your logfile to see what is the problem...

@yayakotto
Copy link

Yeah I just added it to have full disk access but still nothing. Can you tell me how to retrieve my log file? Apologies I'm not too savvy with the process.

@Mrlinkwii
Copy link
Contributor

Mrlinkwii commented May 18, 2025

@shinra-electric can i ask the status of this on latest nightly

@shinra-electric
Copy link
Author

PR 13667 doesn't help this issue.

emulog.txt

@RTHPJM
Copy link

RTHPJM commented May 21, 2025

I have this issue too. It started recently for me. I've been happily using PCSX2 for some time now, therefore I wondered what I had recently changed. It turns out that I decided to use OpenCore Legacy Patcher (OCLP) to re-enable my Broadcom-based wireless. (Apple removed Kernel Extension support for older Broadcom chipsets in Sonoma - I think, maybe earlier). To do this OCLP requires a specific set of System Integrity Protection (SIP) flags to be set.

These flags disable elements of SIP. Knowing this I have tested each bit-wise flag using the NVRAM variable csr-active-config. It turns out that all flags are okay except one. When the flag CSR_ALLOW_UNAUTHENTICATED_ROOT is set (bit position 11, from zero-based bit counting), PCSX2 fails to start with the console output of:

[ 0.2081] mach_vm_map() failed: 3
[ 0.2081] mach_vm_map() failed: 3
[ 0.2081] mach_vm_map() failed: 3
[ 0.2081] mach_vm_map() failed: 3
[ 0.2081] mach_vm_map() failed: 1
[ 0.2081] mach_vm_map() failed: 1
[ 0.2081] mach_vm_map() failed: 1
[ 0.2081] mach_vm_map() failed: 1
[ 0.2081] mach_vm_map() failed: 1
[ 0.2081] mach_vm_map() failed: 1
[ 0.2081] mach_vm_map() failed: 1
[ 0.2083] ReportErrorAsync: Error: Failed to map data memory at an acceptable location.
[ 0.2083] ReportErrorAsync: Error: Failed to allocate VM memory.
[ 0.2092] Releasing host memory for virtual systems...

The CSR_ALLOW_UNAUTHENTICATED_ROOT flag is required by the OCLP team when re-enabling Broadcom wireless cards because the process performs root-patching. Root-patching means that the sealed System partition needs to be altered, hence the "root" System partition can no longer be validated as unmodified, thus requiring SIP to be downgraded.

At the moment then, I can have either WiFi enabled or PCSX2 usable, but not both. As to why PCSX2 is sensitive to this particular flag, I don't know! I will continue to research...

I'm posting here with the hope that @TellowKrinkle and the dev team might find this information useful.

References:
Apple's csr.h header file from their Open Source Software repository
OCLP Post-Installation manual page about SIP and the features re-enabled by root-patching

EDIT:

I forgot to mention that when testing, you can boot into the Recovery partition of Mac OS, then open a terminal from the Utilities menu. From the Terminal, issue the command...

csrutil authenticated-root disable

(Must be done from Recovery)

Reboot into Mac OS
Confirm from a regular Terminal with the command

csrutil authenticated-root status

(Or, if you're already using OpenCore, then set the csr-active-config NVRAM variable)

Finally, I forgot to say I'm on Intel flavour of Mac OS. I don't have an Apple Silicon Mac to test on so I don't know if the CSR_ALLOW_UNAUTHENTICATED_ROOT causes the same issue on Apple Silicon....

I'm testing on latest stable release: v2.2.0 at the time of writing.

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

Successfully merging a pull request may close this issue.

10 participants