Hello @arthuralvesdev, we're using one issue report per unofficially supported game title, and usually I'd transfer this issue report to #8107, however, this is very specific feedback for wine that should be reproduced with vanilla wine, reported, and evaluated upstream.
https://gitlab.winehq.org/wine/wine/-/wikis/Developer-FAQ#can-i-contribute-code-generated-by-a-large-language-model-llm-tool is also relevant as a secondary detail.
Ok, thanks
Compatibility Report
System Information
I confirm:
Symptoms
In God of War Ragnarök, the framerate intermittently collapses from 60 FPS down to a locked ~10 FPS for several seconds or minutes during gameplay.
The drop occurs whenever a 1000 Hz gaming mouse (e.g. Logitech G403 HERO) is moved. Analysis of Proton debug logs (
steam-2322010.log) and disassembly ofGoWR.exeand Wine'swin32u.sorevealed an unchecked NULL pointer dereference inside Wine'sNtUserGetRawInputData(dlls/win32u/rawinput.cline 533), which triggers up to 1,000 hardware Page Faults /SIGSEGVexceptions (0xc0000005) per second on the window thread (DxWindowThread).Technical Root Cause:
GoWR.exeRVA0xeb81c3):When handling window message
0x00FF(WM_INPUT), the game queriesRID_HEADERpassingpcbSize = NULL:On native Windows, passing
pcbSize == NULLwhenpData != NULLanduiCommand == RID_HEADERsucceeds without crashing because the header size is static (24 bytes).dlls/win32u/rawinput.cline 533):In Wine's
NtUserGetRawInputData:Wine does not check if
data_sizeis NULL before dereferencing*data_size(mov (%r15), %esiin assembly). Becausedata_sizeis NULL, this triggers a hardware Page Fault (#PF) /SIGSEGVinside the syscall dispatcher:At 1000 Hz, mouse movement generates up to 1,000
WM_INPUTmessages per second. Each one causes a kernel signal roundtrip, DWARF stack unwinding, and SEH exception dispatch. In my log, over 8,394 hardware exceptions were recorded (peaking at 700–906 faults/sec onDxWindowThread), starving the game engine and pinning the framerate to 10 FPS.Proposed Fix:
In
dlls/win32u/rawinput.c:Reproduction
handle_syscall_fault (0xc0000005)inwin32u.soin the Proton log.steam-2322010.zip