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.

Crash on my compiled MacOS version on every games

See original GitHub issue

Bug Report

The binary MacOS version provided on website works very well, but when I compile my own version of Ryujinx, I run into a memory protection issue with a crash.

What’s the issue you encountered?

I am on MacOS Ventura 13.2 on a Mac Mini M1. I tried on a Macbook air M1 and I get same results.

I just launch Monkey Island game and I get that error. It seems to be the same on other games.

00:00:00.907 |E| Application : Unhandled exception caught: Ryujinx.Memory.MemoryProtectionException: Failed to set memory protection to “ReadWriteExecute”. at Ryujinx.Memory.MemoryManagement.Reprotect(IntPtr address, UInt64 size, MemoryPermission permission, Boolean forView, Boolean throwOnFail) in /Users/superced/Documents/ryujinx/Ryujinx/Ryujinx.Memory/MemoryManagement.cs:line 122 at Ryujinx.Memory.MemoryBlock.Reprotect(UInt64 offset, UInt64 size, MemoryPermission permission, Boolean throwOnFail) in /Users/superced/Documents/ryujinx/Ryujinx/Ryujinx.Memory/MemoryBlock.cs:line 172 at Ryujinx.Cpu.Jit.JitMemoryBlock.MapAsRwx(UInt64 offset, UInt64 size) in /Users/superced/Documents/ryujinx/Ryujinx/Ryujinx.Cpu/Jit/JitMemoryBlock.cs:line 20

How can the issue be reproduced?

I compiled latest Ryujinx MacOS version using MacOS script. I launch any game. I get a crash. I noticed that I cannot select “CPU virtualization” instead of JIT on this build.

Log file

00:00:00.037 |I| Configuration LogValueChange: ResScale set to: 1 00:00:00.039 |I| Configuration LogValueChange: ResScaleCustom set to: 1 00:00:00.039 |I| Configuration LogValueChange: MaxAnisotropy set to: -1 00:00:00.040 |I| Configuration LogValueChange: AspectRatio set to: Fixed16x9 00:00:00.040 |I| Configuration LogValueChange: BackendThreading set to: Auto 00:00:00.040 |I| Configuration LogValueChange: GraphicsBackend set to: Vulkan 00:00:00.041 |I| Configuration LogValueChange: PreferredGpu set to: 0x106B_0xD0103EF 00:00:00.041 |I| Configuration LogValueChange: EnableDockedMode set to: True 00:00:00.046 |I| Configuration LogValueChange: EnableVsync set to: True 00:00:00.046 |I| Configuration LogValueChange: EnableShaderCache set to: True 00:00:00.046 |I| Configuration LogValueChange: EnableTextureRecompression set to: False 00:00:00.046 |I| Configuration LogValueChange: EnableMacroHLE set to: True 00:00:00.046 |I| Configuration LogValueChange: EnablePtc set to: True 00:00:00.046 |I| Configuration LogValueChange: EnableInternetAccess set to: False 00:00:00.046 |I| Configuration LogValueChange: EnableFsIntegrityChecks set to: True 00:00:00.046 |I| Configuration LogValueChange: FsGlobalAccessLogMode set to: 0 00:00:00.046 |I| Configuration LogValueChange: AudioBackend set to: SDL2 00:00:00.046 |I| Configuration LogValueChange: AudioVolume set to: 1 00:00:00.046 |I| Configuration LogValueChange: MemoryManagerMode set to: HostMappedUnsafe 00:00:00.047 |I| Configuration LogValueChange: ExpandRam set to: False 00:00:00.047 |I| Configuration LogValueChange: IgnoreMissingServices set to: False 00:00:00.048 |N| Application PrintSystemInfo: Ryujinx Version: 1+1 00:00:00.052 |N| Application Print: Operating System: Darwin 22.3.0 Darwin Kernel Version 22.3.0: Thu Jan 5 20:49:43 PST 2023; root:xnu-8792.81.2~2/RELEASE_ARM64_T8103 (Arm64) 00:00:00.052 |N| Application Print: CPU: Apple M1� ; 8 logical 00:00:00.052 |N| Application Print: RAM: Total 16384 MiB ; Available 3089 MiB 00:00:00.054 |N| Application PrintSystemInfo: Logs Enabled: Info, Warning, Error, Guest, Stub 00:00:00.054 |N| Application PrintSystemInfo: Launch Mode: UserProfile 00:00:00.101 |I| Gpu : Backend Threading (Auto): True 00:00:00.352 |N| Application LoadGuestApplication: Using Firmware Version: 15.0.1 00:00:00.352 |I| Application LoadGuestApplication: Loading as XCI. 00:00:00.394 |I| Application AddAocItem: Found AddOnContent with TitleId 010021101831F001 00:00:00.409 |I| ModLoader QueryContentsDir: Searching mods for Title 010021101831E000 00:00:00.409 |I| ModLoader QueryContentsDir: Searching mods for DLC 010021101831F001 00:00:00.410 |I| ModLoader QueryContentsDir: Searching mods for Title 010021101831E000 00:00:00.410 |I| ModLoader QueryContentsDir: Searching mods for DLC 010021101831F001 00:00:00.413 |I| Application EnsureSaveData: Ensuring required savedata exists. 00:00:00.416 |I| Loader LoadExeFs: Loading rtld… 00:00:00.420 |I| Loader PrintRoSectionInfo: rtld: Module: nnrtld 00:00:00.420 |I| Loader LoadExeFs: Loading main… 00:00:00.453 |I| Loader PrintRoSectionInfo: main: Module: C:\Users\dwnyl\Flabnapple\Projects\weirdengine_Build\NX\NX64\Retail\Weird.nss SDK Libraries: SDK MW+Nintendo+NintendoSDK_libz-14_3_0-Release 00:00:00.453 |I| Loader LoadExeFs: Loading subsdk0… 00:00:00.566 |I| Loader PrintRoSectionInfo: subsdk0: Module: opengl SDK Libraries: SDK MW+Nintendo+NintendoSDK_OpenGL-14_3_0-Release 00:00:00.566 |I| Loader LoadExeFs: Loading subsdk1… 00:00:00.569 |I| Loader PrintRoSectionInfo: subsdk1: Module: vulkan SDK Libraries: SDK MW+Nintendo+NintendoSDK_Vulkan-14_3_0-Release 00:00:00.569 |I| Loader LoadExeFs: Loading sdk… 00:00:00.617 |I| Loader PrintRoSectionInfo: sdk: Module: nnSdk FS SDK Version: 14.3.0 SDK Libraries: SDK MW+Nintendo+NintendoSDK_libz-14_3_0-Release SDK MW+Nintendo+NintendoSdk_nnSdk-14_3_0-Release SDK MW+Nintendo+NintendoSdk_BuildTarget-64Bit SDK MW+Nintendo+NintendoSDK_NVN-14_3_0-Release 00:00:00.907 |E| Application : Unhandled exception caught: Ryujinx.Memory.MemoryProtectionException: Failed to set memory protection to “ReadWriteExecute”. at Ryujinx.Memory.MemoryManagement.Reprotect(IntPtr address, UInt64 size, MemoryPermission permission, Boolean forView, Boolean throwOnFail) in /Users/superced/Documents/ryujinx/Ryujinx/Ryujinx.Memory/MemoryManagement.cs:line 122 at Ryujinx.Memory.MemoryBlock.Reprotect(UInt64 offset, UInt64 size, MemoryPermission permission, Boolean throwOnFail) in /Users/superced/Documents/ryujinx/Ryujinx/Ryujinx.Memory/MemoryBlock.cs:line 172 at Ryujinx.Cpu.Jit.JitMemoryBlock.MapAsRwx(UInt64 offset, UInt64 size) in /Users/superced/Documents/ryujinx/Ryujinx/Ryujinx.Cpu/Jit/JitMemoryBlock.cs:line 20 at ARMeilleure.Translation.Cache.JitCache.ReprotectAsWritable(Int32 offset, Int32 size) in /Users/superced/Documents/ryujinx/Ryujinx/ARMeilleure/Translation/Cache/JitCache.cs:line 99 at ARMeilleure.Translation.Cache.JitCache.Map(CompiledFunction func) in /Users/superced/Documents/ryujinx/Ryujinx/ARMeilleure/Translation/Cache/JitCache.cs:line 63 at ARMeilleure.CodeGen.CompiledFunction.MapT in /Users/superced/Documents/ryujinx/Ryujinx/ARMeilleure/CodeGen/CompiledFunction.cs:line 51 at ARMeilleure.Translation.TranslatorStubs.GenerateSlowDispatchStub() in /Users/superced/Documents/ryujinx/Ryujinx/ARMeilleure/Translation/TranslatorStubs.cs:line 200 at System.Lazy1.ViaFactory(LazyThreadSafetyMode) at System.Lazy1.ExecutionAndPublication(LazyHelper, Boolean) at System.Lazy1.CreateValue() at System.Lazy1.get_Value() at ARMeilleure.Translation.TranslatorStubs.get_SlowDispatchStub() in /Users/superced/Documents/ryujinx/Ryujinx/ARMeilleure/Translation/TranslatorStubs.cs:line 49 at ARMeilleure.Translation.Translator…ctor(IJitMemoryAllocator allocator, IMemoryManager memory, Boolean for64Bits) in /Users/superced/Documents/ryujinx/Ryujinx/ARMeilleure/Translation/Translator.cs:line 79 at Ryujinx.Cpu.Jit.JitCpuContext…ctor(ITickSource tickSource, IMemoryManager memory, Boolean for64Bit) in /Users/superced/Documents/ryujinx/Ryujinx/Ryujinx.Cpu/Jit/JitCpuContext.cs:line 14 at Ryujinx.Cpu.Jit.JitEngine.CreateCpuContext(IMemoryManager memoryManager, Boolean for64Bit) in /Users/superced/Documents/ryujinx/Ryujinx/Ryujinx.Cpu/Jit/JitEngine.cs:line 17 at Ryujinx.HLE.HOS.ArmProcessContext1..ctor(UInt64 pid, ICpuEngine cpuEngine, GpuContext gpuContext, T memoryManager, Boolean for64Bit) in /Users/superced/Documents/ryujinx/Ryujinx/Ryujinx.HLE/HOS/ArmProcessContext.cs:line 39 at Ryujinx.HLE.HOS.ArmProcessContextFactory.Create(KernelContext context, UInt64 pid, UInt64 addressSpaceSize, InvalidAccessHandler invalidAccessHandler, Boolean for64Bit) in /Users/superced/Documents/ryujinx/Ryujinx/Ryujinx.HLE/HOS/ArmProcessContextFactory.cs:line 64 at Ryujinx.HLE.HOS.Kernel.Process.KProcess.InitializeMemoryManager(ProcessCreationFlags flags) in /Users/superced/Documents/ryujinx/Ryujinx/Ryujinx.HLE/HOS/Kernel/Process/KProcess.cs:line 1086 at Ryujinx.HLE.HOS.Kernel.Process.KProcess.Initialize(ProcessCreationInfo creationInfo, ReadOnlySpan1 capabilities, KResourceLimit resourceLimit, MemoryRegion memRegion, IProcessContextFactory contextFactory, ThreadStart customThreadStart) in /Users/superced/Documents/ryujinx/Ryujinx/Ryujinx.HLE/HOS/Kernel/Process/KProcess.cs:line 251 at Ryujinx.HLE.HOS.ProgramLoader.LoadNsos(KernelContext context, MetaLoader metaData, ProgramInfo programInfo, Byte[] arguments, IExecutable[] executables) in /Users/superced/Documents/ryujinx/Ryujinx/Ryujinx.HLE/HOS/ProgramLoader.cs:line 317 at Ryujinx.HLE.HOS.ApplicationLoader.LoadExeFs(IFileSystem codeFs, String displayVersion, MetaLoader metaData, Boolean isHomebrew) in /Users/superced/Documents/ryujinx/Ryujinx/Ryujinx.HLE/HOS/ApplicationLoader.cs:line 652 at Ryujinx.HLE.HOS.ApplicationLoader.LoadNca(Nca mainNca, Nca patchNca, Nca controlNca) in /Users/superced/Documents/ryujinx/Ryujinx/Ryujinx.HLE/HOS/ApplicationLoader.cs:line 513 at Ryujinx.HLE.HOS.ApplicationLoader.LoadXci(String xciFile) in /Users/superced/Documents/ryujinx/Ryujinx/Ryujinx.HLE/HOS/ApplicationLoader.cs:line 257 at Ryujinx.HLE.Switch.LoadXci(String xciFile) in /Users/superced/Documents/ryujinx/Ryujinx/Ryujinx.HLE/Switch.cs:line 74 at Ryujinx.Ava.AppHost.LoadGuestApplication() in /Users/superced/Documents/ryujinx/Ryujinx/Ryujinx.Ava/AppHost.cs:line 517 at Ryujinx.Ava.UI.Windows.MainWindow.<>c__DisplayClass69_0.<<LoadApplication>b__0>d.MoveNext() in /Users/superced/Documents/ryujinx/Ryujinx/Ryujinx.Ava/UI/Windows/MainWindow.axaml.cs:line 268 — End of stack trace from previous location — at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object) at Avalonia.Threading.AvaloniaSynchronizationContext.<>c__DisplayClass5_0.<Post>b__0() in //src/Avalonia.Base/Threading/AvaloniaSynchronizationContext.cs:line 33 at Avalonia.Native.Interop.Impl.__MicroComIAvnSignaledCallbackVTable.Signaled(Void* this, Int32 priority, Int32 priorityContainsMeaningfulValue) in //src/Avalonia.Native/Interop.Generated.cs:line 4336 — End of stack trace from previous location — at Avalonia.Native.PlatformThreadingInterface.RunLoop(CancellationToken cancellationToken) in //src/Avalonia.Native/PlatformThreadingInterface.cs:line 90 at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken) in //src/Avalonia.Base/Threading/Dispatcher.cs:line 65 at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args) in //src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 120 at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode) in //src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 209 at Ryujinx.Ava.Program.Main(String[] args) in /Users/superced/Documents/ryujinx/Ryujinx/Ryujinx.Ava/Program.cs:line 92

Environment?

Mac Mini M1, Macbook air M1

  • Ryujinx version: 1.0.596

  • Game version: 1.1.0
    Monkey Island

  • System Specs:

    • OS: MacOS 13.2
    • CPU: M1
    • GPU: M1
    • RAM: 16GiB
  • Applied Mods : / No

Additional context?

I use brew to install all dependancies in order to build MacOS version. Notice that official build works well on all my M1 Mac.

Issue Analytics

  • State:closed
  • Created 8 months ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
HyperCedcommented, Jan 27, 2023

distribution/macos/create_macos_release.sh . …/temp/ …/output/ distribution/macos/entitlements.xml 1 1

But it’s better to wait for the merge. At this time, maybe we’ll be able to improve the software. I love what Ryujinx has done using the Apple virtualization framework. Great work!

0reactions
HyperCedcommented, Jan 30, 2023

It works perfectly now ! I was able to compile and run Monkey Island.

I’ll be able to try to debug games that were not working. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mac OSX - (SOLVED) - Game Crash. Where are the logs?
QUESTION: For the executable mac version of my game, where can I find a log to see why it crashed? TL;DR background: I...
Read more >
Cemu (macos) - crash on start BoTW, was previously running
Hi all - using experimental 2.0.13. Was running BoTW on CEMU MacOS no issues earlier today, then this evening whenever I start the...
Read more >
Crash starting app after upgrade to Monterey
Our application is failing to start resulting in a segmentation fault. I am new to debugging such things on MacOS. Using lldb I...
Read more >
Fix the BIGGEST issue with Switch games on Mac! RyuSAK mod
Edit: RyuSAK now has an official macOS release, download here: ... Quick video showing how to fix shader compilation stutter on RyuSAK.
Read more >
Bug - Crashes and freezes (macOS, m1)
Getting freezes and occasional crashes when operating UI. Happens randomly when toggling maximized game view, switching scene/game tab, ...
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