Open jeltaqq opened 6 years ago
@Ergo720 Would you like to take a peek at this one?
Error 87 means an invalid parameter has been passed to VirtualProtect. I need a kernel log from a debug build of cxbx to understand better the issue, since release builds don't show the log from the manager. @jeltaqq can you create one please? Also, can you upload a kernel log from a release build for the other game issues you posted? Without such a log, we can't understand why the game is crashing
One more note: I actually encountered the same error in Panzer Dragoon ORTA when pressing the start button on the main menu. However, it only ever happened once and I couldn't reproduce it afterwards no matter how many times I tried. Probably this is a rare condition so I won't be surprised if @jeltaqq can't reproduce it now
Debug build log KrnlDebug.txt
Thanks. The problem is that the game is passing PAGE_NOCACHE | PAGE_WRITECOMBINE to MmSetAddressProtect, which AFAIK is an invalid protection combination and will become 0 when VirtualProtect is called with it, which is indeed and invalid parameter. The fix is easy: a ternary operator checking for 0 in VirtualProtect will do it
@ergo720 And what should be returned on either side of the ternary operator?
MmSetAddressProtect just fails and returns FALSE if PAGE_READWRITE or PAGE_READONLY are not set, independently of PAGE_NOCACHE | PAGE_WRITECOMBINE EDIT: to be more precise an internal function returns FALSE and causes MmSetAddressProtect to return immediately without changing anything. This can be emulated by skipping the call to VirtualProtect and not updating the permissions of the vma
Improve error ReprotectVMA, but has crash.
Received Exception Code 0xC0000005 @ EIP := 0x77D0DE33
Previous behavior:
Crashed with * ReprotectVMA: VirtualProtect could not protect the vma! The error code was 87
Current behavior:
crashes
Tested with 735a4bcf
Description
Dumps
Xbe.txt
Status
Previous behavior:
None reported
Current behavior:
state-crashes
Screenshots
Additional Information
Tested with build 1cc0220b