[Bug 46805] New: Multiple applications crash when playing sound
https://bugs.winehq.org/show_bug.cgi?id=46805 Bug ID: 46805 Summary: Multiple applications crash when playing sound Product: Wine Version: 4.3 Hardware: x86 OS: Mac OS X Status: UNCONFIRMED Severity: normal Priority: P2 Component: xaudio2 Assignee: wine-bugs(a)winehq.org Reporter: zakk(a)rsdio.com Created attachment 63826 --> https://bugs.winehq.org/attachment.cgi?id=63826 console output trace+xaudio2 Using the winehq portable 4.3 distribution. 32 bit clean prefix, with d3dx9 installed (required for some games to start). Multiple games are crashing when they attempt to play the first sound. (incomplete) list of games: Eschatos Minus Zero DoDonPachi Resurrection Mushihimesama Deathsmiles EXZEAL XIIZeal DeltaZeal There ARE games where audio works great, and even a few that improved with the move to Faudio in 4.3. All the stack traces look the same. I've attached an output log with trace+xaudio2 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=46805 Ken Thomases <ken(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |flibitijibibo(a)gmail.com --- Comment #1 from Ken Thomases <ken(a)codeweavers.com> --- This is a crash where FAudio_INTERNAL_GenerateOutput() calls FAudio_INTERNAL_DecodePCM16() and that calls through the FAudio_INTERNAL_Convert_S16_To_F32 function pointer. But that function pointer is NULL. I suspect the problem is in the FAudio build configuration, since it should have SSE2, but I'm not sure how FAudio_INTERNAL_InitSIMDFunctions() failed to either set it or assert. Is FAudio_assert() sometimes compiled to nothing? If so, it seems bad that FAudio_INTERNAL_InitSIMDFunctions() can be completely ineffective. Should that assert be a compile-time assert to prevent such broken builds? Ethan, any suggestions? -- 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.
https://bugs.winehq.org/show_bug.cgi?id=46805 pattietreutel <katyaberezyaka(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katyaberezyaka(a)gmail.com -- 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.
https://bugs.winehq.org/show_bug.cgi?id=46805 --- Comment #2 from Ethan Lee <flibitijibibo(a)gmail.com> --- Something isn't quite right with the build... on macOS we're guaranteed to have SSE2: https://github.com/FNA-XNA/FAudio/blob/master/src/FAudio_internal_simd.c#L40 FAudio_assert will get optimized out in release builds, in debug builds we do pop up a message when this gets hit: https://github.com/FNA-XNA/FAudio/blob/master/src/FAudio_internal_simd.c#L17... So the issue is most likely SSE2 detection, which looks like this: https://hg.libsdl.org/SDL/file/c005c49beaa9/src/cpuinfo/SDL_cpuinfo.c#l260 https://hg.libsdl.org/SDL/file/c005c49beaa9/src/cpuinfo/SDL_cpuinfo.c#l211 Not sure why this would fail though... if you can drop it in, here's the FNA build of SDL2 (and FAudio): http://fna.flibitijibibo.com/archive/fnalibs.tar.bz2 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=46805 Ken Thomases <ken(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |michael(a)fds-team.de --- Comment #3 from Ken Thomases <ken(a)codeweavers.com> --- (In reply to Ethan Lee from comment #2)
Something isn't quite right with the build... on macOS we're guaranteed to have SSE2:
https://github.com/FNA-XNA/FAudio/blob/master/src/FAudio_internal_simd.c#L40
That code checks for __MACOSX__. What are you expecting to have defined that? On my Mac, it's *not* predefined by the compiler. It's not defined by any system header files I can find, either. That said, I see that even if that preprocessor branch isn't taken, the SSE2 code should still be compiled in (unless -mno-sse or something was specified). I guess we need to get input from whomever is building FAudio and SDL2 for these Mac packages. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=46805 --- Comment #4 from Ethan Lee <flibitijibibo(a)gmail.com> --- It's a bit roundabout, but the dependency tree is FAudio_internal_simd.c > FAudio_internal.h > SDL_stdinc.h > SDL_config.h > SDL_platform.h ... which finally defines __MACOSX__: https://hg.libsdl.org/SDL/file/c005c49beaa9/include/SDL_platform.h#l85 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=46805 Sebastian Lackner <sebastian(a)fds-team.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian(a)fds-team.de --- Comment #5 from Sebastian Lackner <sebastian(a)fds-team.de> --- Most likely FAudio was compiled without SSE2 support. All of our packages are cross-compiled on Linux, and unfortunately thats a scenario often not considered / tested very well in build scripts. @Ethan Lee: I assume we can fix this issue by adding -msse2 to the CFLAGS, however, it seems really unfortunate that there is no warning about this during compile time. Why is there code to define __SSE2__ on __x86_64__, but not for __MACOSX__? What if, for whatever reason, SDL_hasSSE2 retuns false? In my opinion, it shouldn't be possible to build a package without any converter functions. Note that SSE was correctly detected in the SDL2 build, which also uses cmake: --- snip --- [...] [23:02:39] -- SSE (Wanted: ON): ON [23:02:39] -- SSE2 (Wanted: ON): ON [23:02:39] -- SSE3 (Wanted: ON): ON [...] --- snip --- -- 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.
https://bugs.winehq.org/show_bug.cgi?id=46805 --- Comment #6 from Sebastian Lackner <sebastian(a)fds-team.de> --- Created attachment 63829 --> https://bugs.winehq.org/attachment.cgi?id=63829 libfaudio compiled with CFLAGS="-msse2" @Zakk: Could you test if the issue still exists with this version of libfaudio? It should be sufficient to replace the /usr/lib/libFAudio.0.19.03.dylib file included in the Wine package with this one. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=46805 --- Comment #7 from Zakk <zakk(a)rsdio.com> --- the attached -msse2 libfaudio does indeed fix the problem -- 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.
https://bugs.winehq.org/show_bug.cgi?id=46805 Anthony Jagers <noonetinone(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |noonetinone(a)gmail.com -- 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.
https://bugs.winehq.org/show_bug.cgi?id=46805 Sebastian Lackner <sebastian(a)fds-team.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Product|Wine |Packaging Resolution|--- |FIXED Summary|Multiple applications crash |Multiple applications crash |when playing sound |when playing sound (faudio | |built without SSE2) Version|4.3 |unspecified Component|xaudio2 |wine-packages --- Comment #8 from Sebastian Lackner <sebastian(a)fds-team.de> --- I've just pushed new Wine packages (version 4.3-2 available at http://dl.winehq.org/wine-builds/macosx/download.html) that include Faudio built with CFLAGS="-msse2". As usual, the Wine CDN seems pretty slow to me, but I have no influence on that - in a few minutes the packages should hopefully be available at a decent speed. Marking this bug as FIXED, please let me know if you notice any other packaging issues. @Ethan Lee: I would still recommend to make your code more foolproof: Showing a warning when SSE2 is not correctly detected would be nice. Even without SSE2 enabled, it might be a good idea to have generic fallback functions always compiled in. I don't think saving a few bytes is worth the risk of bugs. ;) -- 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.
https://bugs.winehq.org/show_bug.cgi?id=46805 Rosanne DiMesio <dimesio(a)earthlink.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #9 from Rosanne DiMesio <dimesio(a)earthlink.net> --- Closing fixed packaging bug. -- 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.
participants (2)
-
wine-bugs@winehq.org -
WineHQ Bugzilla