ryujinx-mirror / ryujinx

Hard-fork of the Ryujinx project
MIT License
2.1k stars 534 forks source link

[Bug]Running "Dr. Kawashima’s Brain Training" crashed with Fatal error. System.AccessViolationException: Attempted to read or write protected memory. #39

Open baix2015 opened 1 month ago

baix2015 commented 1 month ago

Description of the issue

Crashed when I starting a game. It just happend in a specific game both in Mac and Win platform.

Reproduction steps

File - Load Game File, then crashed.

Log file

The console log:

00:00:00.001 |N| Application ReloadConfig: Loading configuration from: C:\Users\[redacted]\AppData\Roaming\Ryujinx\Config.json
00:00:00.115 |I| Configuration LogValueChange: EnableFileLog set to: True
00:00:00.143 |I| Configuration LogValueChange: ResScale set to: 1
00:00:00.148 |I| Configuration LogValueChange: ResScaleCustom set to: 1
00:00:00.148 |I| Configuration LogValueChange: MaxAnisotropy set to: -1
00:00:00.148 |I| Configuration LogValueChange: AspectRatio set to: Fixed16x9
00:00:00.149 |I| Configuration LogValueChange: BackendThreading set to: Auto
00:00:00.149 |I| Configuration LogValueChange: GraphicsBackend set to: Vulkan
00:00:00.150 |I| Configuration LogValueChange: PreferredGpu set to: 0x10DE_0x28E0
00:00:00.150 |I| Configuration LogValueChange: AntiAliasing set to: None
00:00:00.151 |I| Configuration LogValueChange: ScalingFilter set to: Bilinear
00:00:00.151 |I| Configuration LogValueChange: ScalingFilterLevel set to: 80
00:00:00.151 |I| Configuration LogValueChange: EnableDockedMode set to: True
00:00:00.155 |I| Configuration LogValueChange: EnableVsync set to: True
00:00:00.155 |I| Configuration LogValueChange: EnableShaderCache set to: True
00:00:00.155 |I| Configuration LogValueChange: EnableTextureRecompression set to: False
00:00:00.155 |I| Configuration LogValueChange: EnableMacroHLE set to: True
00:00:00.155 |I| Configuration LogValueChange: EnableColorSpacePassthrough set to: False
00:00:00.155 |I| Configuration LogValueChange: EnablePtc set to: True
00:00:00.155 |I| Configuration LogValueChange: EnableInternetAccess set to: False
00:00:00.155 |I| Configuration LogValueChange: EnableFsIntegrityChecks set to: True
00:00:00.155 |I| Configuration LogValueChange: FsGlobalAccessLogMode set to: 0
00:00:00.156 |I| Configuration LogValueChange: AudioBackend set to: SDL2
00:00:00.156 |I| Configuration LogValueChange: AudioVolume set to: 1
00:00:00.156 |I| Configuration LogValueChange: MemoryManagerMode set to: HostMappedUnsafe
00:00:00.156 |I| Configuration LogValueChange: ExpandRam set to: False
00:00:00.156 |I| Configuration LogValueChange: IgnoreMissingServices set to: False
00:00:00.156 |I| Configuration LogValueChange: UseHypervisor set to: True
00:00:00.158 |I| Configuration LogValueChange: MultiplayerMode set to: Disabled
00:00:00.161 |N| Application PrintSystemInfo: Ryujinx Version: r.dc545c3
00:00:00.164 |N| Application Print: Operating System: Microsoft Windows 10.0.22631 (X64)
00:00:00.164 |N| Application Print: CPU: 13th Gen Intel(R) Core(TM) i9-13900HX ; 32 logical
00:00:00.165 |N| Application Print: RAM: Total 13.7 GiB ; Available 6 GiB
00:00:00.166 |N| Application PrintSystemInfo: Logs Enabled: Info, Warning, Error, Guest, Stub
00:00:00.166 |N| Application PrintSystemInfo: Launch Mode: UserProfile
00:00:00.041 |I| Gpu : Backend Threading (Auto): True
00:00:00.881 |N| Application LoadGuestApplication: Using Firmware Version: 18.1.0
00:00:00.881 |I| Application LoadGuestApplication: Loading as XCI.
00:00:00.891 |I| ModLoader QueryContentsDir: Searching mods for Application 010062200D392000 in "C:\Users\[redacted]\AppData\Roaming\Ryujinx\mods\contents"
00:00:00.891 |I| ModLoader QueryContentsDir: Searching mods for Application 010062200D392000 in "C:\Users\[redacted]\AppData\Roaming\Ryujinx\sdcard\atmosphere\contents"
00:00:00.893 |I| Loader Load: Loading rtld...
00:00:00.896 |I| Loader PrintRoSectionInfo: rtld:
    Module: nnrtld
00:00:00.896 |I| Loader Load: Loading main...
00:00:00.978 |I| Loader PrintRoSectionInfo: main:
    Module: D:\Drill\workspace\BuildAsiaRelease\Programs\Outputs\NX64\Drill\NX_Release\Drill.nss
    SDK Libraries: SDK MW+Nintendo+NintendoWare_Atk-9_4_0-Release
                   SDK MW+Nintendo+NintendoWare_Ui2d-9_4_0-Release
                   SDK MW+Nintendo+NintendoWare_Font-9_4_0-Release
                   SDK MW+Nintendo+NintendoSDK_gfx-9_4_0-Release
                   SDK MW+NVIDIA+CUDA-9000-17_5_0-Release
                   SDK MW+NVIDIA+CUDART-8000-17_5_0-Release
                   SDK MW+Nintendo+NintendoSDK_libcurl-9_4_0-Release
                   SDK MW+Nintendo+NintendoSDK_libz-9_4_0-Release
                   SDK MW+Nintendo+NintendoWare_Bezel_Engine-1_35_1-Release
                   SDK MW+Nintendo+NintendoWare_G3d-9_4_0-Release
                   SDK MW+Nintendo+NintendoWare_Fxt-1_35_0-Release
                   SDK MW+Nintendo+NintendoWare_Vfx-9_4_0-Release
                   SDK MW+Nintendo+NEX_RK-4_6_3
                   SDK MW+Nintendo+NEX_R2-4_6_3
                   SDK MW+Nintendo+NEX_DS-4_6_3
                   SDK MW+Nintendo+NEX-4_6_3-
                   SDK MW+Nintendo+PiaClone-5_23_0
                   SDK MW+Nintendo+PiaCommon-5_23_0
                   SDK MW+Nintendo+Pia-5_23_0
                   SDK MW+Nintendo+PiaFramework-5_23_0
                   SDK MW+Nintendo+PiaLan-5_23_0
                   SDK MW+Nintendo+PiaLocal-5_23_0
                   SDK MW+Nintendo+PiaReckoning-5_23_0
                   SDK MW+Nintendo+PiaSession-5_23_0
                   SDK MW+Nintendo+PiaSync-5_23_0
                   SDK MW+Nintendo+PiaTransport-5_23_0
                   SDK MW+Nintendo+PiaNex-5_23_0-forNEX-4_6_3
                   SDK MW+Nintendo+NEX_MM-4_6_3
                   SDK MW+NVIDIA+PhysX-3_4_0-release
00:00:00.979 |I| Loader Load: Loading subsdk0...
00:00:01.006 |I| Loader PrintRoSectionInfo: subsdk0:
    Module: glslc
00:00:01.006 |I| Loader Load: Loading subsdk1...
00:00:01.024 |I| Loader PrintRoSectionInfo: subsdk1:
    Module: multimedia
    SDK Libraries: SDK MW+Nintendo+NintendoSDK_movie-9_4_0-Release
00:00:01.024 |I| Loader Load: Loading sdk...
00:00:01.069 |I| Loader PrintRoSectionInfo: sdk:
    Module: nnSdk
    FS SDK Version: 9.4.0
    SDK Libraries: SDK MW+Nintendo+NintendoSDK_libz-9_4_0-Release
                   SDK MW+Nintendo+NintendoSdk_nnSdk-9_4_0-Release
                   SDK MW+Nintendo+NintendoSDK_NVN-9_4_0-Release
00:00:01.133 |I| Ptc Initialize: Initializing Profiled Persistent Translation Cache (enabled: True).
00:00:01.140 |I| Loader LoadNsos: Loading image 0 at 0x0000000008500000...
00:00:01.141 |I| Loader LoadNsos: Loading image 1 at 0x0000000008504000...
00:00:01.147 |I| Loader LoadNsos: Loading image 2 at 0x0000000009c58000...
00:00:01.150 |I| Loader LoadNsos: Loading image 3 at 0x000000000a560000...
00:00:01.152 |I| Loader LoadNsos: Loading image 4 at 0x000000000ac6d000...
00:00:01.157 |I| ModLoader LoadCheats: Build ids found for application 010062200D392000:
    31A2773EA6928FFE3D32B17B3AD08F54826DA39F000000000000000000000000
    A9CC756F25299FCED19C82FA38EB07BB00000000000000000000000000000000
    F92AF17ED915BE68A70ED0B46ED256CD294217D9000000000000000000000000
    8BDABFABC6964CD9E55B7079659F51F1056576FA000000000000000000000000
    014256A5D58180219805A7D05FBA02E4EEFF0B8D000000000000000000000000
00:00:01.160 |I| Application EnsureSaveData: Ensuring required savedata exists.
00:00:01.221 |I| Loader Start: Application Loaded: 脑科学专家 川岛隆太博士监修 大人的Nintendo Switch脑部锻炼 v1.0.0 [010062200d392000] [64-bit]
00:00:01.237 |I| GUI.WindowThread Hid Configure: Configured Controller JoyconPair to Player1
00:00:01.244 |I| GUI.WindowThread Hid SetupNpad: Connected Controller JoyconPair to Player1
00:00:01.713 |N| GUI.RenderThread Gpu PrintGpuInformation: NVIDIA NVIDIA GeForce RTX 4060 Laptop GPU (Vulkan v1.3.278, Driver v556.13.0.0)
00:00:01.713 |N| GUI.RenderThread Gpu PrintGpuInformation: GPU Memory: 7957 MiB
00:00:01.718 |I| GPU.MainThread Gpu LoadShaders: Loading 0 shaders from the cache...
00:00:01.723 |I| GPU.MainThread Gpu LoadShaders: Shader cache loaded.
00:00:02.114 |S| HLE.OsThread.47 ServiceAm GetAppletResourceUserId: Stubbed. {appletResourceUserId: 1}
00:00:02.189 |S| HLE.OsThread.47 ServiceAm AcquireForegroundRights: Stubbed.
00:00:02.198 |S| HLE.OsThread.47 ServiceAm SetFocusHandlingMode: Stubbed. {unknownFlag1: False ; unknownFlag2: False ; unknownFlag3: True}
00:00:02.201 |S| HLE.OsThread.47 ServiceAm SetOutOfFocusSuspendingEnabled: Stubbed. {outOfFocusSuspendingEnabled: False}
00:00:02.240 |S| HLE.OsThread.47 ServicePctl Initialize: Stubbed.
00:00:05.189 |S| HLE.OsThread.4 ServiceNv FinishInitialize: Stubbed.
00:00:05.293 |S| HLE.OsThread.4 ServiceNv InitializeEx: Stubbed.
00:00:05.338 |S| HLE.OsThread.4 ServiceNv GetActiveSlotMask: Stubbed.
00:00:05.346 |S| HLE.OsThread.4 ServiceNv ZbcSetTable: Stubbed.
00:00:05.346 |S| HLE.OsThread.4 ServiceNv GetActiveSlotMask: Stubbed.
00:00:05.348 |S| HLE.OsThread.4 ServiceNv ZbcSetTable: Stubbed.
00:00:05.348 |S| HLE.OsThread.4 ServiceNv GetActiveSlotMask: Stubbed.
00:00:05.350 |S| HLE.OsThread.4 ServiceNv ZbcSetTable: Stubbed.
00:00:05.350 |S| HLE.OsThread.4 ServiceNv GetActiveSlotMask: Stubbed.
00:00:05.538 |I| HLE.OsThread.47 SurfaceFlinger CreateLayerFromId: Creating layer 1
00:00:05.669 |S| HLE.OsThread.4 ServiceNv SetNvMapFd: Stubbed.
00:00:05.670 |S| HLE.OsThread.4 ServiceNv AllocGpfifoEx2: Stubbed.
00:00:05.671 |S| HLE.OsThread.4 ServiceNv AllocObjCtx: Stubbed.
00:00:05.671 |S| HLE.OsThread.4 ServiceNv SetTimeout: Stubbed.
00:00:05.673 |S| HLE.OsThread.4 ServiceNv SetErrorNotifier: Stubbed.
00:00:05.674 |S| HLE.OsThread.4 ServiceNv SetUserData: Stubbed.
00:00:05.675 |S| HLE.OsThread.4 ServiceNv SetTimeslice: Stubbed.
00:00:05.680 |S| HLE.OsThread.4 ServiceNv ZcullBind: Stubbed.
00:00:05.742 |S| HLE.OsThread.3 ServiceHid ActiveNpadImpl: Stubbed. {appletResourceUserId: 1 ; revision: 3}
00:00:05.744 |S| HLE.OsThread.3 ServiceHid ActivateTouchScreen: Stubbed. {appletResourceUserId: 1}
00:00:05.747 |S| HLE.OsThread.3 ServiceHid ActivateDebugPad: Stubbed. {appletResourceUserId: 1}
00:00:05.754 |S| HLE.OsThread.3 ServiceHid SetSupportedNpadIdType: Stubbed. 9 Players: Player1,Player2,Player3,Player4,Player5,Player6,Player7,Player8,Handheld
00:00:05.757 |S| HLE.OsThread.3 ServiceHid AcquireNpadStyleSetUpdateEventHandle: Stubbed. {appletResourceUserId: 4294967296 ; npadId: Player1 ; npadStyleSet: -8302010945232699392}
00:00:05.757 |S| HLE.OsThread.3 ServiceHid AcquireNpadStyleSetUpdateEventHandle: Stubbed. {appletResourceUserId: 4294967296 ; npadId: Player2 ; npadStyleSet: -8302010739074269184}
00:00:05.758 |S| HLE.OsThread.3 ServiceHid AcquireNpadStyleSetUpdateEventHandle: Stubbed. {appletResourceUserId: 4294967296 ; npadId: Player3 ; npadStyleSet: -8302010532915838976}
00:00:05.758 |S| HLE.OsThread.3 ServiceHid AcquireNpadStyleSetUpdateEventHandle: Stubbed. {appletResourceUserId: 4294967296 ; npadId: Player4 ; npadStyleSet: -8302010326757408768}
00:00:05.758 |S| HLE.OsThread.3 ServiceHid AcquireNpadStyleSetUpdateEventHandle: Stubbed. {appletResourceUserId: 4294967296 ; npadId: Player5 ; npadStyleSet: -8302010120598978560}
00:00:05.758 |S| HLE.OsThread.3 ServiceHid AcquireNpadStyleSetUpdateEventHandle: Stubbed. {appletResourceUserId: 4294967296 ; npadId: Player6 ; npadStyleSet: -8302009914440548352}
00:00:05.758 |S| HLE.OsThread.3 ServiceHid AcquireNpadStyleSetUpdateEventHandle: Stubbed. {appletResourceUserId: 4294967296 ; npadId: Player7 ; npadStyleSet: -8302009708282118144}
00:00:05.758 |S| HLE.OsThread.3 ServiceHid AcquireNpadStyleSetUpdateEventHandle: Stubbed. {appletResourceUserId: 4294967296 ; npadId: Player8 ; npadStyleSet: -8302009502123687936}
00:00:05.758 |S| HLE.OsThread.3 ServiceHid AcquireNpadStyleSetUpdateEventHandle: Stubbed. {appletResourceUserId: 4294967296 ; npadId: Handheld ; npadStyleSet: -8302009295965257728}
00:00:05.762 |S| HLE.OsThread.3 ServiceHid SetSupportedNpadStyleSet: Stubbed. {pid: 127 ; appletResourceUserId: 1 ; type: ProController, Handheld}
00:00:05.765 |I| GUI.WindowThread Hid SetupNpad: Connected Controller ProController to Player1
00:00:05.996 |I| HLE.OsThread.11 AudioRenderer AcquireSessionId: Registered new renderer (0)
00:00:05.998 |I| HLE.OsThread.11 AudioRenderer Initialize: Initializing with REV8
00:00:06.006 |I| AudioProcessor.Worker AudioRenderer Work: Starting audio processor
00:00:06.007 |I| AudioRendererManager.Worker AudioRenderer SendCommands: Starting audio renderer
00:00:06.045 |I| HLE.OsThread.11 AudioRenderer Start: Starting renderer id 0
00:00:06.269 |S| HLE.OsThread.47 ServiceAcc InitializeApplicationInfo: Stubbed. {TitleId: 72165483838251008}
00:00:06.277 |S| HLE.OsThread.47 ServiceAcc IsUserAccountSwitchLocked: Stubbed.
00:00:06.431 |I| AudioProcessor.Worker Audio EnsureAudioStreamSetup: New audio stream setup with a target sample count of 240
00:00:06.804 |S| HLE.OsThread.47 ServiceAm SetFocusHandlingMode: Stubbed. {unknownFlag1: True ; unknownFlag2: False ; unknownFlag3: True}
00:00:06.804 |S| HLE.OsThread.47 ServiceAm SetOutOfFocusSuspendingEnabled: Stubbed. {outOfFocusSuspendingEnabled: False}
00:00:06.805 |S| HLE.OsThread.47 ServiceAm SetRestartMessageEnabled: Stubbed. {restartMessageEnabled: True}
00:00:06.806 |S| HLE.OsThread.47 ServiceAm SetOperationModeChangedNotification: Stubbed. {operationModeChangedNotification: True}
00:00:06.806 |S| HLE.OsThread.47 ServiceAm SetPerformanceModeChangedNotification: Stubbed. {performanceModeChangedNotification: True}
00:00:06.807 |S| HLE.OsThread.47 ServiceAm LockExit: Stubbed.
00:00:06.863 |S| HLE.OsThread.47 ServiceIrs ActivateIrsensorWithFunctionLevel: Stubbed. {appletResourceUserId: 3 ; packedFunctionLevel: 1}
00:00:06.870 |S| HLE.OsThread.3 ServiceHid StartSixAxisSensor: Stubbed. {appletResourceUserId: 1 ; sixAxisSensorHandle: 131075}
00:00:07.577 |S| HLE.OsThread.3 ServiceHid SetSupportedNpadStyleSet: Stubbed. {pid: 127 ; appletResourceUserId: 1 ; type: Handheld, JoyconPair}
00:00:07.577 |I| GUI.WindowThread Hid SetupNpad: Connected Controller JoyconPair to Player1
00:00:07.579 |S| HLE.OsThread.3 ServiceHid SetNpadHandheldActivationMode: Stubbed. {appletResourceUserId: 1 ; _npadHandheldActivationMode: Single}
00:00:07.630 |S| HLE.OsThread.4 ServiceNv InitializeEx: Stubbed.
Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at ARMeilleure.Translation.Translator.Execute(ARMeilleure.State.ExecutionContext, UInt64)
   at Ryujinx.Cpu.Jit.JitCpuContext.Execute(Ryujinx.Cpu.IExecutionContext, UInt64)
   at Ryujinx.HLE.HOS.ArmProcessContext`1[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Execute(Ryujinx.Cpu.IExecutionContext, UInt64)
   at Ryujinx.HLE.HOS.Kernel.Threading.KThread.ThreadStart()
   at System.Threading.Thread+StartHelper.RunWorker()
   at System.Threading.Thread+StartHelper.Run()
   at System.Threading.Thread.StartCallback()

The log file: Ryujinx.20241009-015457-407.log

OS

Windows 11 23H2

Ryujinx version (revision hash)

dc545c3

Game version

1.0.0

CPU

i7-13700HX

GPU

RTX4050

RAM

16GB

List of applied mods

No response

Additional context?

No response

baix2015 commented 1 month ago

The log file in Mac:

00:00:00.363 |I| Configuration LogValueChange: ResScale set to: 2
00:00:00.368 |I| Configuration LogValueChange: ResScaleCustom set to: 1
00:00:00.368 |I| Configuration LogValueChange: MaxAnisotropy set to: -1
00:00:00.368 |I| Configuration LogValueChange: AspectRatio set to: Fixed16x9
00:00:00.369 |I| Configuration LogValueChange: BackendThreading set to: Auto
00:00:00.369 |I| Configuration LogValueChange: GraphicsBackend set to: Vulkan
00:00:00.370 |I| Configuration LogValueChange: PreferredGpu set to: 0x106B_0xE0303EF
00:00:00.370 |I| Configuration LogValueChange: AntiAliasing set to: None
00:00:00.370 |I| Configuration LogValueChange: ScalingFilter set to: Bilinear
00:00:00.370 |I| Configuration LogValueChange: ScalingFilterLevel set to: 80
00:00:00.371 |I| Configuration LogValueChange: EnableDockedMode set to: True
00:00:00.375 |I| Configuration LogValueChange: EnableVsync set to: True
00:00:00.375 |I| Configuration LogValueChange: EnableShaderCache set to: True
00:00:00.375 |I| Configuration LogValueChange: EnableTextureRecompression set to: False
00:00:00.375 |I| Configuration LogValueChange: EnableMacroHLE set to: False
00:00:00.375 |I| Configuration LogValueChange: EnableColorSpacePassthrough set to: False
00:00:00.375 |I| Configuration LogValueChange: EnablePtc set to: True
00:00:00.375 |I| Configuration LogValueChange: EnableInternetAccess set to: False
00:00:00.375 |I| Configuration LogValueChange: EnableFsIntegrityChecks set to: True
00:00:00.375 |I| Configuration LogValueChange: FsGlobalAccessLogMode set to: 0
00:00:00.376 |I| Configuration LogValueChange: AudioBackend set to: SDL2
00:00:00.376 |I| Configuration LogValueChange: AudioVolume set to: 1
00:00:00.376 |I| Configuration LogValueChange: MemoryManagerMode set to: HostMapped
00:00:00.376 |I| Configuration LogValueChange: ExpandRam set to: False
00:00:00.376 |I| Configuration LogValueChange: IgnoreMissingServices set to: True
00:00:00.376 |I| Configuration LogValueChange: UseHypervisor set to: True
00:00:00.378 |I| Configuration LogValueChange: MultiplayerMode set to: Disabled
00:00:00.378 |N| Application PrintSystemInfo: Ryujinx Version: r.dc545c3
00:00:00.381 |N| Application Print: Operating System: macOS 15.1.0 (24B5055e) (Arm64)
00:00:00.381 |N| Application Print: CPU: Apple M1 Pro ; 10 logical
00:00:00.382 |N| Application Print: RAM: Total 16 GiB ; Available 4.7 GiB
00:00:00.383 |N| Application PrintSystemInfo: Logs Enabled: Info, Warning, Error, Guest, Stub
00:00:00.384 |N| Application PrintSystemInfo: Launch Mode: UserProfile
00:00:01.749 |E| .NET TP Worker 2024-10-09 09:15:32.520 Ryujinx[3741:206825] +[IMKClient subclass]: chose IMKClient_Modern
00:00:02.027 |E| .NET TP Worker 2024-10-09 09:15:32.799 Ryujinx[3741:206825] +[IMKInputSession subclass]: chose IMKInputSession_Modern
regginator commented 1 month ago

For future reference, please attach the name of the title you were trying to run. (In this case, 010062200D392000 appears to be "Dr. Kawashima’s Brain Training")

I don't own this title, are any other games yielding the same results as this crash?

baix2015 commented 1 month ago

I have edited the title to indicate the name of the game, and currently I have not encountered this issue while running other games. Perhaps I can provide you with the game file in some way, which is approximately 2GB in size.

regginator commented 1 month ago

Sorry, can't do piracy 🙃 If necessary, someone else who owns the title can submit a PR for this.

Potatoman967 commented 1 week ago

For future reference, please attach the name of the title you were trying to run. (In this case, 010062200D392000 appears to be "Dr. Kawashima’s Brain Training")

I don't own this title, are any other games yielding the same results as this crash?

totk is giving the same error, sometimes on launch, sometimes after playing for a couple hours https://pastebin.com/WQdxQ4xi Using totk optimizer and some graphics mods to fix islands in the distance, black screen on weapon selection its been doing it before the mods too, theres a reddit thread of someone having the same problem https://www.reddit.com/r/Ryujinx/comments/yz0ybg/fatal_error_systemaccessviolationexception_issue/