https://bugs.winehq.org/show_bug.cgi?id=57637
Bug ID: 57637 Summary: Regression: Crash on exit in Age of Empires Product: Wine Version: 9.18 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: dplay Assignee: wine-bugs@winehq.org Reporter: krkos@mail.muni.cz Distribution: ---
Created attachment 77765 --> https://bugs.winehq.org/attachment.cgi?id=77765 AoE exit crash backtrace
The bug affects original Age of Empires with UPatch HD 1.2 Release 3. Upon program exit, it crashes with page fault on write access to 0x00000005, see attached backtrace. This was bisected to be caused by 490d5f0fcf8556548743ad65a2a9951c2f503809 "dplayx: Merged IDirectPlayLobby/2A in to IDirectPlayLobby3A.", which seems strange as the backtrace indicates something audio related, but was reproduced repeatedly. The bug manifests on wow64 32bit (configure --enable-win64 --enable-archs=i386,x86_64), compiled with both mingw and clang. I did not test pure 32b wine. The bug is still present in wine 10.0-rc4.
https://bugs.winehq.org/show_bug.cgi?id=57637
Radko Krkoš krkos@mail.muni.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |490d5f0fcf8556548743ad65a2a | |9951c2f503809 CC| |krkos@mail.muni.cz, | |leslie_alistair@hotmail.com
https://bugs.winehq.org/show_bug.cgi?id=57637
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression Summary|Regression: Crash on exit |Crash on exit in Age of |in Age of Empires |Empires
https://bugs.winehq.org/show_bug.cgi?id=57637
--- Comment #1 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Can you provide a log with channel dplay?
https://bugs.winehq.org/show_bug.cgi?id=57637
--- Comment #2 from Radko Krkoš krkos@mail.muni.cz --- Created attachment 77774 --> https://bugs.winehq.org/attachment.cgi?id=77774 AoE log WINEDEBUG=+dplay
https://bugs.winehq.org/show_bug.cgi?id=57637
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
https://bugs.winehq.org/show_bug.cgi?id=57637
--- Comment #3 from Radko Krkoš krkos@mail.muni.cz --- Created attachment 78029 --> https://bugs.winehq.org/attachment.cgi?id=78029 An experimental patch fixing the crash
The crash is indeed caused by DirectPlay Lobby code, if you short-circuit DirectPlayLobbyCreate (by returning an error early), the crash does not happen.
The attached patch fixes the crash for me, but there are three problems: 1. It goes against what Alistair Leslie-Hughes tried to do in 490d5f0fcf8556548743ad65a2a9951c2f503809 and following patches. 2. It does not really make sense (IDirectPlayLobby_QueryInterface with ANSI object just calls the Unicode version). 3. It breaks some tests.
It does however indicate that the problem is somewhere in the lifetime management of the dplobby structure.