https://bugs.winehq.org/show_bug.cgi?id=47858
Bug ID: 47858 Summary: x3daudio1_{0,1,2} need ABI corrections Product: Wine Version: 4.17 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: x3daudio Assignee: wine-bugs@winehq.org Reporter: galtgendo@o2.pl Distribution: ---
Created attachment 65361 --> https://bugs.winehq.org/attachment.cgi?id=65361 patch that attempts to fix the problem
Primary purpose of this bug is the problem addressed in recently sent "x3daudio: fix lib exports" patch.
Patch attached should fix the problem...that is, if the problem is properly diagnosed.
However, there's a secondary purpose. App used to notice and diagnose the problem was Supreme Commander (RTS - see the entry in appdb).
Without the patch, builtin fails early with a missing function error. With the patch, game goes as far as the menu...
...but if (for example) you try to start a skirmish, it crashes.
I'm not sure whether it's a problem with wine or a problem with FAudio. With native x3daudio, it works, so the problem is still in this or underlying lib.
Going by the debug channel, game first calls X3DAudioInitialize a couple times (seemingly successfully), then it calls X3DAudioCalculate with 0x61 flags and goes into faultrep after that call. Shortly after that it terminates, often with that annoying err:ntdll:RtlpWaitForCriticalSection hang.
https://bugs.winehq.org/show_bug.cgi?id=47858
Vijay Kamuju infyquest@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |infyquest@gmail.com Resolution|--- |FIXED Fixed by SHA1| |a53a9a98f7b505ec9697c5fe594 | |62e294dba1165
--- Comment #1 from Vijay Kamuju infyquest@gmail.com --- fix committed https://source.winehq.org/git/wine.git/commitdiff/a53a9a98f7b505ec9697c5fe59...
https://bugs.winehq.org/show_bug.cgi?id=47858
Rafał Mużyło galtgendo@o2.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|FIXED |--- Status|RESOLVED |UNCONFIRMED
--- Comment #2 from Rafał Mużyło galtgendo@o2.pl --- As I've said, that's only the first part.
Given that back then, bug 12182 was started with Supreme Commander in mind, yet it's still not working, it would be better to keep this open until the final part is done: either a problem in wine is found that generates the crash in X3DAudioCalculate or it's definitely diagnosed as a bug in FAudio.
https://bugs.winehq.org/show_bug.cgi?id=47858
--- Comment #3 from Rafał Mużyło galtgendo@o2.pl --- ...and that's because the current advice in appdb is still "use native", cause even after the commited fix, it stays valid.
https://bugs.winehq.org/show_bug.cgi?id=47858
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
https://bugs.winehq.org/show_bug.cgi?id=47858
--- Comment #4 from Rafał Mużyło galtgendo@o2.pl --- OK, so, I've finally googled the proper way of running gdb on wine (given that 'winedbg --gdb' is useless to me).
If my guess is correct, the outlook (for this bug) is bad.
#0 0x7da0f694 in CalculateMatrix (MatrixCoefficients=0x2cf0058, normalizedDistance=<optimized out>, eToLDistance=1483.90259, emitterToListener=..., DstChannelCount=2, SrcChannelCount=1, pEmitter=0x2d09530, pListener=0x2d094c0, Flags=97, ChannelMask=<optimized out>) at FAudio-19.06/src/F3DAudio.c:1226 #1 F3DAudioCalculate (Instance=0x2d0958c "\003", pListener=0x2d094c0, pEmitter=0x2d09530, Flags=97, pDSPSettings=0x2d09500) at FAudio-19.06/src/F3DAudio.c:1473 #2 0x7dac9378 in LEGACY_X3DAudioCalculate (handle=<optimized out>, listener=<optimized out>, emitter=<optimized out>, flags=<optimized out>, out=<optimized out>) at dlls/x3daudio1_1/../xaudio2_7/x3daudio.c:91
(gdb) print *(pListener) $2 = {OrientFront = {x = 0, y = 0, z = 1}, OrientTop = {x = 0, y = 1, z = 0}, Position = {x = 0, y = -4, z = 0}, Velocity = {x = 0, y = 0, z = 0}, pCone = 0x2e422020} (gdb) print *(pListener->pCone) Cannot access memory at address 0x2e422020
...and what exactly is my guess ?
Well, as wine doesn't provide xactengine (even though a partial implementation seems to exist in FAudio), native lib needs to be used. Now, compare the value of pListener and pListener->pCone...
I believe we're hitting a variant of bug 38668, more exactly, the part described in bug 41618 comment 5. This would mean that native xactengine requires native x3daudio.
https://bugs.winehq.org/show_bug.cgi?id=47858
Rafał Mużyło galtgendo@o2.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|x3daudio1_{0,1,2} need ABI |native xactengine dlls |corrections |won't work properly with | |builtin x3daudio dlls
--- Comment #5 from Rafał Mużyło galtgendo@o2.pl --- I think that for better visibility it's time to rename this bug to the problem it actually addresses. After all, it's initial target was a placeholder as that part was already fixed.
https://bugs.winehq.org/show_bug.cgi?id=47858
--- Comment #6 from Rafał Mużyło galtgendo@o2.pl --- ...well, this bug is kinda concluded, yet not.
wine now has builtin xactengine2, but the problem now is FAudio.
As per src/FACT_internal.c (FACT_INTERNAL_SupportedContent), FAudio doesn't support pre-3.0 content.
For Supreme Commander case, this means it's not supported. It's also nothing that could be fixed in wine, short of finding a different library for it.
https://bugs.winehq.org/show_bug.cgi?id=47858
Rémi Bernon rbernon@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rbernon@codeweavers.com
--- Comment #7 from Rémi Bernon rbernon@codeweavers.com --- Or add the support for the old format to FAudio? It may not be that easy though, a quick and dirty hack shows that it then triggers all sorts of TODO asserts in FAudio.