Game-compatibility: Monster 4x4: World Circuit [US-073] [1.01]

Created on 7 Jan 2018  ·  8Comments  ·  Source: Cxbx-Reloaded/game-compatibility

Description


* ReprotectVMA: VirtualProtect could not protect the vma! The error code was 87

Dumps


Xbe.txt

Status

Previous behavior:

None reported

Current behavior:

state-crashes

Screenshots

message

Additional Information


Tested with build 1cc0220b

issue-memory region-us-canada state-crashes type-retail xdk-5849

Most helpful comment

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

All 8 comments

@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

Description


Improve error ReprotectVMA, but has crash.


Received Exception Code 0xC0000005 @ EIP := 0x77D0DE33

Dumps


KrnlDebug.txt

Status

Previous behavior:

Crashed with * ReprotectVMA: VirtualProtect could not protect the vma! The error code was 87

Current behavior:

crashes

Screenshots

Additional Information


Tested with 735a4bcf

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kennethedmonds picture kennethedmonds  ·  3Comments

PatrickvL picture PatrickvL  ·  4Comments

fatjohnny118 picture fatjohnny118  ·  3Comments

hotzenplotz3000 picture hotzenplotz3000  ·  3Comments

gandalfthewhite19890404 picture gandalfthewhite19890404  ·  3Comments