[Bug 50010] Deus Ex Mankind Divided crashes if Wine is compiled with mingw

WineHQ Bugzilla wine-bugs at winehq.org
Wed Oct 21 15:07:32 CDT 2020


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

--- Comment #20 from Paul Gofman <pgofman at codeweavers.com> ---
I've got a GOG version of the game and could reproduce the issue.

It does not happen when the game run from GOG Galaxy but does happen when run
as standalone.

The culprit are C++ exceptions thrown and processed from Galaxy64.dll when GOG
Galaxy is not run during the game start. It took a bit of time to find as the
exception themselves are processed seemingly fine, happen on Windows the same
way, and are at least a few seconds away from the fatal access violation crash
in completely different place (in main game exe).
Yet the problem seems to be there, I am loosing R15 register value in
consolidate unwind callback wrapper. I've just sent the fix which solves the
problem for me: https://source.winehq.org/patches/data/194894
The problem does not happen with the non-mingw build because the unwind info
handling is completely different and doesn't have such bug.

The whole sequence of exceptions (which otherwise works perfectly) is
remarkable:
- The initial exception gets handled and results in consolidated unwind;
- Consolidated unwind callback throws a new C++ exception itself (probably the
app throws exception in C++ destructor);
- The exception gets caught by the same handler and that unexpectedly results
in the same consolidated unwind;
- Yet it doesn't result in the infinite loop, at the third attempt unwind
callback manages to complete and the whole process is getting unwind to the
app's catch block.

Not fully related to this bug report, but while debugging this I also found
that we also mess up the registers in NtRaiseExceptions (this doesn't get call
on x64 if the debugger is not present). The game works fine under debugger on
Windows but crashes on Wine soon after the same exceptions; I am going to make
some patch for that also.

-- 
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