[Bug 53010] Split/Second crashes on launch

WineHQ Bugzilla wine-bugs at winehq.org
Thu May 19 10:35:57 CDT 2022


https://bugs.winehq.org/show_bug.cgi?id=53010

--- Comment #5 from Gabriel Ivăncescu <gabrielopcode at gmail.com> ---
Created attachment 72387
  --> https://bugs.winehq.org/attachment.cgi?id=72387
Debugging log hack

I tried to hack my devices list to report exactly the same as your log, and I
still can't reproduce it, unfortunately. The game also has anti-debugging. That
said, I managed to understand what triggers the crash, but not sure *why* it
happens in your case.

So, the game sets up a cookie on the stack, just before the exception handler.
The cookie is taken from some global variable. It then calls a bunch of ole and
mmdevapi functions, and returns. Just before it returns, it checks the cookie
to see if it matches with the global value. In my case it always matches, so it
works fine.

In your case, it seems the cookie does not match, and then it calls a function
that quits with STATUS_STACK_BUFFER_OVERRUN. This is a standard stack
protection since it assumes something overwrote past the end of a buffer and
changed the cookie.

I've attached a debugging hack which prints the cookie on each function called
by the game's fmodex.dll within that problematic part in your log. Please make
sure to compile wine with the normal -fno-omit-frame-pointer (if you messed
with it) because otherwise it will crash and not output anything useful. It
should at least show after which point the cookie gets modified.

There's also the possibility it doesn't get modified at all, but the global
value changes, and at least this will make it known.

Note that this patch isn't supposed to fix it, it just attempts to print the
cookie, so the game crashing at the same spot is a good thing when you run it.

Please compile wine git with this debugging hack and run it with
+ole,+pulse,+mmdevapi,+seh,+unwind,+debugstr,+loaddll

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


More information about the wine-bugs mailing list