question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Skyline crashes on ARM macOS with Hypervisor or Host memory mode

See original GitHub issue

Description of Issue

The Skyline modding framework crashes on ARM macOS when either the Hypervisor or any Memory Manager mode other than Software is used.

Reproduction Steps

  1. Download the latest Skyline beta from https://github.com/skyline-dev/skyline/releases/tag/beta
  2. Right-click Super Smash Bros. Ultimate in the game list and select Open Atmosphere Mods Directory
  3. Copy the exefs folder in the downloaded .zip to this directory
  4. Start the game with the Hypervisor or any Memory Manager mode other than Software

Note that this crash is triggered by the Skyline mod loader itself even with if no other mods like Arcropolis are loaded.

Log File

Crash with Hypervisor: Ryujinx_1.0.0-dirty_2023-01-31_21-13-44.log

Crash with Host Memory Manager mode: Ryujinx_1.0.0-dirty_2023-01-31_21-14-23.log

Crash with Host unchecked Memory Manager mode: Ryujinx_1.0.0-dirty_2023-01-31_21-16-41.log

OS

macOS Ventura 13.2

Ryujinx version

Commit 9044cb38d19194bb29595ac09cad8857364650b2

Game version

1.0.0

Environment?

  • CPU: Apple M2 Max
  • GPU: Apple M2 Max
  • RAM: 32 GB
  • Applied Mods: Skyline

Additional context?

No response

Issue Analytics

  • State:closed
  • Created 8 months ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
gdkchancommented, Feb 5, 2023

I’ve experimented with host mapped mode a bit, seems like forcing Skyline use a 16 KB-aligned destination address in the svcMapProcessMemory call doesn’t help either. I guess this doesn’t necessarily mean that the physical address on the host has the correct alignment as well? It’s possible that I did something wrong though, I’m not really familiar with this part of the Skyline code base.

The emulator physical memory allocation is also not 16 KB aligned. We should probably enforce physical memory allocations to be 16 KB aligned when using host mapped mode on platforms with 16 KB pages.

1reaction
gdkchancommented, Feb 6, 2023

Is this also the case in Ryujinx?

Not on the hypervisor. On the JIT it always invalidates the unmapped memory ranges on the JIT cache. There’s a InvalidateCacheRange method on the CpuContext, but it’s currently unused, and it does nothing on the hypervisor https://github.com/Ryujinx/Ryujinx/blob/master/Ryujinx.Cpu/AppleHv/HvCpuContext.cs#L34

Read more comments on GitHub >

github_iconTop Results From Across the Web

FAQ and Troubleshooting · Ryujinx/Ryujinx Wiki
Help! Why is the emulator crashing? Refer to the troubleshooting and game-specific sections below. If you can't find your issue in this ...
Read more >
Investigating memory access crashes
The crashed thread tried to access memory that isn't appropriately aligned. This exception code is rare because 64-bit ARM CPUs work with misaligned...
Read more >
Guest OS crashing on mac os 11.1 host
Hi, I have been using Vmware fusion free edition to play a little bit of Diablo 2 with a friend of mine online....
Read more >
Virtualbox VM on Mac crashing/aborting
Heyy, on an M1 MacBook Air, macOS Ventura, and I'm currently trying to get a Windows 7 VM on VirtualBox. I've set up...
Read more >
VirtualBox Problems on macOS (Security & Access)
Some Common Symptoms: VirtualBox and/or the Virtual Machine crashes immediately or may crash while your are interacting with the VM or when you ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found