http://bugs.winehq.org/show_bug.cgi?id=20799
Summary: Mirror's Edge freeze during startup Product: Wine Version: 1.1.30 Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: wylda@volny.cz
Created an attachment (id=24909) --> (http://bugs.winehq.org/attachment.cgi?id=24909) Console output from wine 1.1.30 with OpenAL enabled, i.e. crashing
Hi, last working version 1.1.29. In 1.1.30 Mirror's Edge begins to freeze during start up. Git bisect gave me following commit:
862965f4f71b19f251934b11d1e998831ccbaee6 is first bad commit commit 862965f4f71b19f251934b11d1e998831ccbaee6 Author: Chris Robinson chris.kcat@gmail.com Date: Tue Aug 25 03:26:35 2009 -0700
openal32: Add a stub DLL thunk.
:100755 100755 3874a35a0bfd4b09557b70da5002997990e6e4a9 329b2437d86b9110756b19d5112ef23850312fb0 M configure :100644 100644 0d2e860cde3230a48c3f07eb8fc76b6b89e66e72 adec95f6231a723469af3ba929cb402cc0f46a12 M configure.ac :040000 040000 c1840765b8243d56793701292703ab61169876c6 a1167dbd19bde794fef6e1b68a112f6a32f0f3a4 M dlls :040000 040000 b91f345e148e69435dc9a83f697f28b9ee06fa1f f5d07b2aee106b5bb0ccb14bd7c2f5e20d1d5d53 M include
Looks like OpenAL initial implementation??
So i tried under 1.1.30:
./configure --with-opengl --verbose <--- *** FREEZES ***
./configure --with-opengl --verbose --without-openal <--- **** WORKS ****
I read about other problems in OpenAL, so i upgraded OpenAL to v1.10.622. No change. Then i tried put slots slots=1 and sends=1 in /etc/openal/alsoft.conf. No change :-(
http://bugs.winehq.org/show_bug.cgi?id=20799
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression CC| |chris.kcat@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #1 from Chris chris.kcat@gmail.com 2009-11-22 20:04:24 --- Have you tried anything newer than 1.1.30? There were some fixes afterward. If it still happens with latest Git, can you provide a +relay trace? You can probably filter it to just openal if it's too long:
WINEDEBUG=+relay wine app.exe 2>&1 | grep -i openal &>log.txt
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #2 from Wylda wylda@volny.cz 2009-11-23 02:03:28 --- Created an attachment (id=24916) --> (http://bugs.winehq.org/attachment.cgi?id=24916) _FILTERED_ console log with +relay
So i tried under wine-1.1.33-301-gd963e97:
./configure --with-opengl --verbose <--- *** FREEZES ***
./configure --with-opengl --verbose --without-openal <--- **** WORKS ****
I expanded filtered words a bit (sorry if nonsense): wine MirrorsEdge.exe 2>&1 | egrep -i "openal|alsa|sound|snd|volume|al lib"
http://bugs.winehq.org/show_bug.cgi?id=20799
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Mirror's Edge freeze during |Mirror's Edge freezes |startup |during startup
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #3 from Chris chris.kcat@gmail.com 2009-11-23 02:51:09 --- Hmm, looks like I'm going to need the full thing. If you can, try a +all log if it's not too big, otherwise at least an unfiltered +relay. Thanks.
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #4 from Wylda wylda@volny.cz 2009-11-24 15:51:34 --- (In reply to comment #3)
Hmm, looks like I'm going to need the full thing. If you can, try a +all log if it's not too big, otherwise at least an unfiltered +relay. Thanks.
Hi Chris, i finally see brave man, who is not afraid of +all :-)) Unfortunately that log had 28gigs. So i did +relay and hope it will show something. It's 5meg and i spend some time looking where to put it.
I blindly choosed https://www.dropboks.com/. Username: wylda@volny.cz and random password: wylda7476.
Hope that stored log will be few days available. If not, do not hesitate to ask for another (and recommend where to store it;)
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #5 from Chris chris.kcat@gmail.com 2009-11-24 20:18:11 --- Looks like it's dying in DirectSoundCreate, which shouldn't be affected by an OpenAL DLL. Can you provide a +relay,+dsound,+seh,+tid log?
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #6 from Wylda wylda@volny.cz 2009-11-25 00:26:07 --- (In reply to comment #5)
Looks like it's dying in DirectSoundCreate, which shouldn't be affected by an OpenAL DLL. Can you provide a +relay,+dsound,+seh,+tid log?
Gladly, i have uploaded "console_log_relay_dsound_seh_tid.log.bz2" on the same place.
Just for note: When i notice that game freeze i press Ctrl+C in console, so if you see something unusual at the and it can be mentioned Ctrl+C.
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #7 from Chris chris.kcat@gmail.com 2009-11-25 02:34:36 --- It's definitely crashing when trying to open a DirectSound device. Can you provide a +relay,+dsalsa,+seh,+tid trace? After that, can you see if it works if you set the audio to Emulation? In winecfg, Audio tab, set Hardware Acceleration to Emulation, then see if it will start up.
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #8 from Wylda wylda@volny.cz 2009-11-26 03:11:48 --- (In reply to comment #7)
It's definitely crashing when trying to open a DirectSound device. Can you provide a +relay,+dsalsa,+seh,+tid trace?
Done, uploaded to usual place: "console_log_relay_dsalsa_seh_tid.log.bz2"
After that, can you see if it works if you set the audio to Emulation? In winecfg, Audio tab, set Hardware Acceleration to Emulation, then see if it will start up.
Yes, it works when set to Emulation! When i put it back to Hardware, it freezes again.
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #9 from Chris chris.kcat@gmail.com 2009-11-26 05:37:42 --- This seems to be a well-masked DSound/winealsa bug.
To clarify, the freeze that happens is actually a crash that the game tries to catch, but ends up getting stuck. The DLL stub came up as the first bad commit because it only adds stub functions. If anything tries to call those functions, Wine will purposely crash/abort. Wine 1.1.30 still crashed because the game tries to open the "Generic Software" or "Generic Hardware" device, which the DLL did not yet handle (it does now), and the host libopenal also doesn't.. so opening an audio device fails, and the game crashes.
Fast forward to a recent Wine Git, and you have commit 059017f9143d08c007f24e04a7249d2d1d24fcf2, which enables "full" audio acceleration when ALSA doesn't have mmap. Before then, a device without mmap automatically fell back to "Emulation" for audio acceleration. But now, it goes ahead with "full" audio acceleration and hits a code path that some drivers apparently don't handle as well as others.
Long story short (too late): initial commits for OpenAL caused failures, but were fixed soon after Wine 1.1.30. Some time before a recent Git, a winealsa bug was exposed for non-mmap devices, that only certain drivers seem to trip over. I'll attach a patch that should fix that bug for non-emulated dsound with winealsa. If you could test it with Full audio acceleration, that would be great.
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #10 from Chris chris.kcat@gmail.com 2009-11-26 05:38:46 --- Created an attachment (id=24960) --> (http://bugs.winehq.org/attachment.cgi?id=24960) Avoid calling snd_pcm_sw_params with an uninitialized sw_params struct
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #11 from Wylda wylda@volny.cz 2009-11-26 06:38:10 --- (In reply to comment #10)
Created an attachment (id=24960)
--> (http://bugs.winehq.org/attachment.cgi?id=24960) [details]
Avoid calling snd_pcm_sw_params with an uninitialized sw_params struct
Unfortunately this patch does not work, i.e. after applying the behavior is the same = "freezes" when set to Hardware.
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #12 from Chris chris.kcat@gmail.com 2009-11-26 07:01:55 --- It might be crashing somewhere else, then. Can you provide another +relay,+dsalsa,+seh,+tid trace with the patch applied?
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #13 from Wylda wylda@volny.cz 2009-11-26 07:59:03 --- (In reply to comment #12)
It might be crashing somewhere else, then. Can you provide another +relay,+dsalsa,+seh,+tid trace with the patch applied?
Gladly uploaded to the usual place: "console_log_patch1_relay_dsalsa_seh_tid.log.bz2"
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #14 from Chris chris.kcat@gmail.com 2009-11-26 18:58:22 --- As I figured, it's crashing a little bit further during ALSA setup, this time with an illegal instruction error vs. NULL function pointer call as before.
Am I correct in thinking you're using PulseAudio? The PCM type is listed as plug, as opposed to hw or dmix, which seems to indicate that.
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #15 from Wylda wylda@volny.cz 2009-11-26 19:22:12 --- (In reply to comment #14)
Am I correct in thinking you're using PulseAudio? The PCM type is listed as plug, as opposed to hw or dmix, which seems to indicate that.
How do i know? I thought, that i don't use it, but i'm running on KDE4, which uses kmix which dependent on libpulse-mainloop-glib0 (modified Debian Lenny).
But that is only a library.
Packages like "pulseaudio", "pulseaudio-utils", "pulseaudio-module-x11", "pulseaudio-module-hal", "pulseaudio-module-jack" are NOT installed.
I tried "dpkg -l | grep -i pulse": ii libpulse-browse0 PulseAudio client libraries (zeroconf suppor ii libpulse-dev PulseAudio client development headers and li ii libpulse-mainloop-glib0 PulseAudio client libraries (glib support) ii libpulse0 PulseAudio client libraries
...but those are just libraries. How do i find out, if i use PA?
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #16 from Chris chris.kcat@gmail.com 2009-11-26 19:31:37 --- Check if there's a 'pulseaudio' process running. Also, what sound hardware do you have?
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #17 from Wylda wylda@volny.cz 2009-11-26 19:45:38 --- (In reply to comment #16)
Check if there's a 'pulseaudio' process running.
No, output of "ps auxf" does not contain word pulse.
Also, what sound hardware do you have?
lspci -v says: 00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02)
It's ASUS board with P35 chipset.
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #18 from Wylda wylda@volny.cz 2009-11-26 19:54:35 ---
To be sure, now i uninstalled those 4 pulse's libraries, kmix (unfortunately), kdemultimedia (unfortunately) and the game still freezes...
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #19 from Wylda wylda@volny.cz 2009-11-28 06:46:05 ---
Hi Chris, (politely) asking if there is some progress or ideas what should i do or try next?
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #20 from Chris chris.kcat@gmail.com 2009-11-28 07:17:41 --- I'm running low on ideas. Could you perhaps try running the game with winedbg? You may need to run 'pass' for some of the exceptions, but the one we're interested in is either a NULL pointer access (read/write violation on address 0x000000, though it may be some "nearby" value; a really high value like 0xffffffxx, or really low around 0x000000xx) or an Illegal Instruction. When you get one of them, run 'bt', and let me know what it says.
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #21 from Wylda wylda@volny.cz 2009-11-28 10:53:23 --- Created an attachment (id=24994) --> (http://bugs.winehq.org/attachment.cgi?id=24994) winedbg log
(In reply to comment #20)
I'm running low on ideas. Could you perhaps try running the game with winedbg? You may need to run 'pass' for some of the exceptions, but the one we're interested in is either a NULL pointer access (read/write violation on address 0x000000, though it may be some "nearby" value; a really high value like 0xffffffxx, or really low around 0x000000xx) or an Illegal Instruction. When you get one of them, run 'bt', and let me know what it says.
OK, i tried... I had absolutely no idea what am i doing :) what are the commands i enter etc. Sorry if doing wrong - running windbg, winedbg's commands etc...
Now i found out, that i did this log _without_ your patch here. If it is a problem i can redo. I also put extra new lines into log so it looks more readable.
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #22 from Chris chris.kcat@gmail.com 2009-11-28 20:57:36 --- Hmm, that trace looks odd.
It would be helpful if you could try it again with that patch applied. I have a feeling I know what it'll do, but I'd like to see.
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #23 from Wylda wylda@volny.cz 2009-11-29 03:10:15 --- Created an attachment (id=24999) --> (http://bugs.winehq.org/attachment.cgi?id=24999) winedbg log with applied Chris's patch
(In reply to comment #22)
Hmm, that trace looks odd.
It would be helpful if you could try it again with that patch applied. I have a feeling I know what it'll do, but I'd like to see.
You are right, after i applied that patch, traced changed.
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #24 from Nikolay Sivov bunglehead@gmail.com 2009-11-29 03:20:32 --- Don't know about first thread crash, but second is about Pulseaudio:
--- 3 0x7d8c2061 in libasound.so.2 (+0x32061) (0x092dddf0) 4 0xb5e7a17a pa_parse_sample_format+0x1aa() in libpulse.so.0 (0x092dde24) ---
http://bugs.winehq.org/show_bug.cgi?id=20799
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #24999|0 |1 is obsolete| |
--- Comment #25 from Wylda wylda@volny.cz 2009-11-29 08:07:33 --- Created an attachment (id=25004) --> (http://bugs.winehq.org/attachment.cgi?id=25004) winedbg log with applied Chris's patch
This is a new trace, because the previous was looking like crashing somewhere in alsa and debian had new version which fixed some crash, so i did it again with new affected libraries (and their debuging symbol).
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #26 from Wylda wylda@volny.cz 2009-11-29 15:05:14 --- Created an attachment (id=25011) --> (http://bugs.winehq.org/attachment.cgi?id=25011) another winedbg log with applied Chris's patch
Now i'm getting pretty consistent backtraces with DSDB_CreateMMAP, which precede one or two lines. Couldn't be something bad in this function and this randomness has influence how far i can go? Is this OK to get such backtraces (different in "length")??
PS: is this enough or should i try getting anothers?
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #27 from Chris chris.kcat@gmail.com 2009-11-29 20:53:24 --- Quite sure now that some of ALSA's function pointers are getting trashed, somehow. Unfortunately, I have no idea how. Don't suppose you can try running it with valgrind?
WINEDEBUG=+dsalsa valgrind --trace-children=yes wine MirrorsEdge.exe 2>&1 | tee out.log
It will run very slowly, but it will hopefully be helpful. It will also be somewhat noisy, with a lot of dubious warnings. It'll help if you have another wine app running first (like winemine or notepad) so it doesn't needlessly trace wineserver and such, too.
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #28 from Wylda wylda@volny.cz 2009-11-30 07:43:11 ---
Hi, could anyone help with valgrind? In few hours i want to give it a try, but also want to use Chris's hint "run another wine app first". How do i do that?
Does it mean to run standalone wineserver (how?) than stick notepad on it (how?), close notepad and keep wineserver running (how?) and stick on it WINEDEBUG=+dsalsa valgrind --trace-children=yes wine MirrorsEdge.exe 2>&1 | tee out.log??
I'm probably saying bullshit... so would be nice if someone could write few steps here to do by recommended way. Thanks in advance.
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #29 from Nikolay Sivov bunglehead@gmail.com 2009-11-30 07:48:50 --- (In reply to comment #28)
Hi, could anyone help with valgrind? In few hours i want to give it a try, but also want to use Chris's hint "run another wine app first". How do i do that?
http://wiki.winehq.org/Wine_and_Valgrind
Does it mean to run standalone wineserver (how?) than stick notepad on it (how?), close notepad and keep wineserver running (how?) and stick on it WINEDEBUG=+dsalsa valgrind --trace-children=yes wine MirrorsEdge.exe 2>&1 | tee out.log??
Just run notepad in separate terminal window first and keep it running.
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #30 from Dmitry Timoshkov dmitry@codeweavers.com 2009-11-30 07:51:30 --- Just run 'wine notepad' in one terminal window, minimize notepad (to make it go out of the way, and not produce any painting flood in the logs). Then in a separate terminal window run your app with logs you need.
http://bugs.winehq.org/show_bug.cgi?id=20799
Benoit PIERRE benoit.pierre@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |benoit.pierre@gmail.com
--- Comment #31 from Benoit PIERRE benoit.pierre@gmail.com 2009-12-01 16:22:45 --- As a work-around, to be able to test other aspects of the game, you can disable sound by editing "~/EA Games/Mirror's Edge/TdGame/Config/TdEngine.ini" and replacing occurrences of "bUseSound=True" by "bUseSound=False".
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #32 from Wylda wylda@volny.cz 2009-12-01 19:12:54 --- Created an attachment (id=25041) --> (http://bugs.winehq.org/attachment.cgi?id=25041) valgrind dies
Hi thanks all for advices about valgrind. I had to use switch --error-limit=no, to get further, but anyway valgrind crashes :( I'm using valgrind-3.5.0-Debian and log is attached. I thought it complains about msvcr80.dll, but even if i use native version from winxp, it won't let me go any further. Another advice?
http://bugs.winehq.org/show_bug.cgi?id=20799
Warren Dumortier nwarrenfl@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nwarrenfl@gmail.com
--- Comment #33 from Warren Dumortier nwarrenfl@gmail.com 2009-12-02 07:12:42 --- I bought the game on Steam with Wine 1.1.33 and it works without any sound or startup problems. Are you sure this is still the case in latest Wine?
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #34 from Wylda wylda@volny.cz 2009-12-03 15:10:22 --- Created an attachment (id=25063) --> (http://bugs.winehq.org/attachment.cgi?id=25063) winedbg log from current git (wine-1.1.33-647-gb07bc34)
(In reply to comment #33)
I bought the game on Steam with Wine 1.1.33 and it works without any sound or startup problems. Are you sure this is still the case in latest Wine?
Hi, yes still the same problem in current git (wine-1.1.33-647-gb07bc34). Don't compare two different version (retail DVD vs. down-loadable steam version). If it was not mentioned before, this bug is in DVD version.
@Benoit PIERRE> Good point, but now i'm not interested in work arounding this problem, but interested in help with fixing this nasty bug. Another work around is compiling wine with --without-openal.
Attaching log from wine-1.1.33-647-gb07bc34 and again it looks OK till DSDB_CreateMMAP, then jumps in wrong place or in Chris's words "ALSA's function pointers are getting trashed".
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #35 from Wylda wylda@volny.cz 2009-12-03 15:24:16 --- Created an attachment (id=25064) --> (http://bugs.winehq.org/attachment.cgi?id=25064) Another valgrind log from current git (wine-1.1.33-647-gb07bc34)
This is a valgrind log from current git (wine-1.1.33-647-gb07bc34) run without a WINEDEBUG, but i feel there is something wrong with it and i don't know what it is (or how to use it correctly).
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #36 from Warren Dumortier nwarrenfl@gmail.com 2009-12-03 16:44:18 --- Can't you simply deactivate the openal dll file in winecfg? Also i see there were some commits related to OpenAL and there will be a new version tomorrow, maybe you should test again tomorrow!
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #37 from Wylda wylda@volny.cz 2009-12-03 17:59:47 --- (In reply to comment #36)
Can't you simply deactivate the openal dll file in winecfg?
Hi. I do not know, if i got your point correctly, but if you mean setting in "Libraries" tab, than the states are following:
openal32 (builtin) <--- *** FREEZES *** openal32 (native) <--- **** WORKS **** openal32 (disabled) <--- **** WORKS ****
In dir Program Files/EA Games/Mirror's Edge/Binaries/ there are files MirrorsEdge.exe, OpenAL32.dll, wrap_oal.dll, ...
When i clear above setting in "Libraries" tab, there are another states based on "Audio" tab setting:
Hardware Acceleration: Full <--- *** FREEZES *** Hardware Acceleration: Emulation <--- **** WORKS ****
All the above testing done under current git (wine-1.1.33-647-gb07bc34).
Also i see there were some commits related to OpenAL and there will be a new version tomorrow, maybe you should test again tomorrow!
OK, i will gladly test it. (hopefully i find some free time)
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #38 from Warren Dumortier nwarrenfl@gmail.com 2009-12-04 06:07:58 --- Yes i meant in the libraries section of winecfg. But as i said maybe testing with the new Wine version which should be out today to see if it will work, it's only a guess.
But if i understand, if OpenAL is disabled it works, so it means there's a fallback sound library support?
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #39 from Wylda wylda@volny.cz 2009-12-04 12:27:28 --- (In reply to comment #38)
Yes i meant in the libraries section of winecfg. But as i said maybe testing with the new Wine version which should be out today to see if it will work, it's only a guess.
Still does not work under wine-1.1.33-700-g6b8c9ae. And when i look into to web git, it does not show any changes in sound area. So it's not the surprise, that the behavior is the same like in comment #37.
But if i understand, if OpenAL is disabled it works, so it means there's a fallback sound library support?
I think so. Chris explain that in comment #9. Mirror edge was working till 1.1.30, because there was no OpenAL support (if i read that correctly) and game worked fine.
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #40 from Wylda wylda@volny.cz 2009-12-08 16:16:03 ---
Still doesn't work under wine-1.1.34-149-g578881f.
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #41 from Wylda wylda@volny.cz 2010-02-28 10:17:25 ---
Still not fixed in wine-1.1.39-163-g583f0f0.
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #42 from Wylda wylda@volny.cz 2010-03-04 09:28:50 --- Created an attachment (id=26599) --> (http://bugs.winehq.org/attachment.cgi?id=26599) Valgrind log from wine 1.1.39
(In reply to comment #27)
Quite sure now that some of ALSA's function pointers are getting trashed, somehow.
I gave it another try under valgrind... Can't be this the problem with jumping into a wrong place? Full log attached.
Invalid read of size 4 at 0x7BC4B54B: RtlAllocateHeap (heap.c:1651) by 0x637B4D6: IME_AddToSelected (ime.c:562) by 0x637B9DC: ImeSelect (ime.c:644) by 0x5321856: ImmCreateContext (imm.c:655) by 0x5323E21: ImmGetContext (imm.c:1367) by 0x637CF80: IME_UpdateAssociation (ime.c:1033) by 0x63B5FF7: open_xim (xim.c:412) by 0x63B609B: X11DRV_SetupXIM (xim.c:428) by 0x63AABED: x11drv_init_thread_data (x11drv_main.c:665) by 0x6387319: thread_init_display (x11drv.h:567) by 0x6387338: X11DRV_GetCursorPos (mouse.c:1015) by 0x49D00CA: GetCursorPos (input.c:201) Address 0x7f00000c is not stack'd, malloc'd or (recently) free'd
Warning: set address range perms: large range [0x82000000, 0xb7780000) (noaccess)
Warning: set address range perms: large range [0x3170238, 0x7f83fdd4) (undefined)
Warning: set address range perms: large range [0x3170238, 0x7f83fdd8) (noaccess)
Jump to the invalid address stated on the next line at 0x31A77A8: ??? (in /path/to/app/MirrorsEdge.exe) Address 0x31a77a8 is not stack'd, malloc'd or (recently) free'd
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #43 from Wylda wylda@volny.cz 2010-03-06 08:15:40 ---
Still not fixed in wine-1.1.40.
http://bugs.winehq.org/show_bug.cgi?id=20799
Enrico Enrico_m@gmx.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |Enrico_m@gmx.de
--- Comment #44 from Enrico Enrico_m@gmx.de 2010-03-11 04:37:02 --- (In reply to comment #43)
Still not fixed in wine-1.1.40.
Just want to add that I have the same problem with the steam version of Mirror's Edge. Buildin openal does not work, but the native one (shipped with the game) works fine.
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #45 from Wylda wylda@volny.cz 2010-03-20 19:20:38 --- Created an attachment (id=26937) --> (http://bugs.winehq.org/attachment.cgi?id=26937) Console log from Unreal tournament 3
Unreal Tournament 3 is another game, which suffers from bug in OpenAL. Tested under wine-1.1.41.
When i run this game with OpenAL set to native, it runs OK.
Following command causes crash, which is attached: WINEDLLOVERRIDES="openal32=b;" wine UT3.exe &> unreal_tournament.txt
Chris, isn't this a prove of flaw in Wine's OpenAL?
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #46 from Wylda wylda@volny.cz 2010-03-20 19:51:38 --- Created an attachment (id=26939) --> (http://bugs.winehq.org/attachment.cgi?id=26939) Unreal tournament under Valgrind
Advantage of UT3 is, that it is able to run under valgrind. Attached is output of
WINEDEBUG=+dsalsa valgrind --trace-children=yes --suppressions=$HOME/valgrind-suppressions wine UT3.exe 2>&1 | tee out3.txt
Would it help to rerun with --error-limit=no or with other parametr?
Note: The "Unrecognised instruction" is different on each run...
fixme:d3d:WineD3D_ChoosePixelFormat Add OpenGL context recreation support to SetDepthStencilSurface trace:dsalsa:widDsCreate (0,0x7f02f2f4) trace:dsalsa:IDsCaptureDriverImpl_GetDriverDesc (0x7f020200,0x7f02f2f8) trace:dsalsa:IDsCaptureDriverImpl_Open Success trace:dsalsa:IDsCaptureDriverImpl_GetCaps (0x7f020200,0x7f02f524) trace:dsalsa:IDsCaptureDriverImpl_CreateCaptureBuffer (0x7f020200,0x7f055e90,0,0) trace:dsalsa:IDsCaptureDriverBufferImpl_SetFormat (0x7f0564a8, 0x7f055e90) trace:dsalsa:CreateMMAP mmap'd buffer is an ALSA type 14 buffer trace:dsalsa:CreateMMAP format=S16_LE frames=2730 channels=1 bits_per_sample=16 bits_per_frame=16 vex x86->IR: unhandled instruction bytes: 0x8F 0x1F 0xB9 0xB ==27570== valgrind: Unrecognised instruction at address 0xc4b4170. ==27570== Your program just tried to execute an instruction that Valgrind ==27570== did not recognise. There are two possible reasons for this. ==27570== 1. Your program has a bug and erroneously jumped to a non-code ==27570== location. If you are running Memcheck and you just saw a ==27570== warning about a bad jump, it's probably your program's fault. ==27570== 2. The instruction is legitimate but Valgrind doesn't handle it, ==27570== i.e. it's Valgrind's fault. If you think this is the case or ==27570== you are not sure, please let us know and we'll try to fix it. ==27570== Either way, Valgrind will now raise a SIGILL signal which will ==27570== probably kill your program. err:seh:segv_handler Got unexpected trap 0 fixme:dbghelp:validate_addr64 Unsupported address ffffffff81160000 fixme:dbghelp:validate_addr64 Unsupported address ffffffff81290000 fixme:faultrep:ReportFault 0x7f43cbec 0x0 stub AL lib: ALc.c:1822: alcCloseDevice(): deleting 32 Filter(s) wine: Unhandled page fault on read access to 0x00000000 at address 0xac9371 (thread 001c), starting debugger...
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #47 from Chris chris.kcat@gmail.com 2010-03-20 21:40:10 --- Wine's OpenAL is just a thunk that calls your system's OpenAL, like it does for OpenGL. Before that was introduced, it would use the native OpenAL32.dll, which uses DirectSound (which uses ALSA). Under Linux, Wine's OpenAL will normally route calls to OpenAL Soft, which can use ALSA directly (bypassing DirectSound) and uses it in a different fashion.. it can also use PulseAudio if that's running on the system.
As for the valgrind log, it looks like it's the same bug. ALSA is calling an invalid/garbage function pointer while setting up the device for "accelerated" DSound, and hits an illegal instruction (too bad valgrind doesn't give a backtrace for this). I can't see OpenAL Soft being directly responsible, though perhaps some unexpected interaction between it and winealsa, might be an indirect cause.
I notice with UT3 that it's crashing while opening a capture device, but still while setting up the device params. Unfortunately I can't think of anything more in regards to where the problem is, or for something to look into.
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #48 from Wylda wylda@volny.cz 2010-04-09 06:04:54 ---
Still present in wine-1.1.42-146-g1c02a90.
Testing switched from Mirrors Edge to Unreal Tournament 3 (does not use that nasty copy protection and also like things like valgrind --if anybody would care)
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #49 from winebugzilla.kyoo@xoxy.net 2010-04-18 13:28:41 --- Created an attachment (id=27441) --> (http://bugs.winehq.org/attachment.cgi?id=27441) console output when running Mirror's Edge with wine
http://bugs.winehq.org/show_bug.cgi?id=20799
winebugzilla.kyoo@xoxy.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winebugzilla.kyoo@xoxy.net
--- Comment #50 from winebugzilla.kyoo@xoxy.net 2010-04-18 13:33:08 --- Mirror's Edge freezes for me, too, when running it with wine. console output: http://bugs.winehq.org/attachment.cgi?id=27441
Gentoo Linux (amd64) wine-1.1.42 (32-bit) nvidia GeForce 8600 GT 512 MB video card on PCI-e, using proprietary drivers, version 195.36.15.
http://bugs.winehq.org/show_bug.cgi?id=20799
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wine-bugs@winehq.org Component|-unknown |openal32 Summary|Mirror's Edge freezes |Multiple games using OpenAL |during startup |freezes/crashes during the | |startup
http://bugs.winehq.org/show_bug.cgi?id=20799
GyB gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #51 from GyB gyebro69@gmail.com 2010-04-23 13:10:53 --- *** This bug has been confirmed by popular vote. ***
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #52 from Wylda wylda@volny.cz 2010-04-23 15:14:20 ---
Hi Chris, in other bug report Louis thinks there could be bug in linux OpenAL implementation. If you have time, could you check:
http://bugs.winehq.org/show_bug.cgi?id=22302#c23
Maybe same thing could help here?
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #53 from Wylda wylda@volny.cz 2010-05-07 19:20:37 ---
Hi Chris, i finally got closer to the crash and actually "fix" that crash. The crash in console output:
fixme:dbghelp:validate_addr64 Unsupported address ffffffffb7730000 fixme:dbghelp:validate_addr64 Unsupported address ffffffffb63c0000 fixme:dbghelp:validate_addr64 Unsupported address ffffffffb6320000 ...
comes from "DSDB_CreateMMAP(IDsDriverBufferImpl* pdbi)". There is a line:
snd_pcm_sw_params_set_silence_threshold(pcm, sw_params, boundary);
and when i comment that line out, crash is gone and game start ups normally :-) Unfortunately this fixes only Mirror's Edge.
Unreal Tournament still crashes, and the workaround "set openal32 to native" is still needed.
I wanted to look inside snd_pcm_sw_params_set_silence_threshold(), but unfortunately i did not find it in wine's sources, so i guess, that this function comes with ALSA or OpenAL?
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #54 from Chris chris.kcat@gmail.com 2010-05-07 19:57:11 --- snd_pcm_sw_params_set_silence_threshold is an ALSA function. There's nothing particularly special about it that I know of, though, so I can only imagine that the two games are overwriting heap memory a bit differently. You need to figure out what's causing the memory to be overwritten and why; the ALSA crashes are just a side-effect of the issue.
http://bugs.winehq.org/show_bug.cgi?id=20799
Raymond superquad.vortex2@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |superquad.vortex2@gmail.com
--- Comment #55 from Raymond superquad.vortex2@gmail.com 2010-05-07 22:47:44 --- (In reply to comment #37)
(In reply to comment #36)
Can't you simply deactivate the openal dll file in winecfg?
Hardware Acceleration: Full <--- *** FREEZES *** Hardware Acceleration: Emulation <--- **** WORKS ****
In Windows , Full hardware acceleration mean enable secondary buffer and vendor specific acclearion such as EAX
but EAX is not supported by openal in linux
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #56 from Wylda wylda@volny.cz 2010-05-08 02:31:17 ---
Thanks Chris & Raymond! As per Raymond, there isn't much to do for me and only proper way should be, that wine in case of OpenAL where game requests HW acceleration wine replays "sorry, i don't have one, but go with SW...(fallback to SW)"?? Am i correct?
Interesting to me (maybe obvious for you guys), that during the initialization the game goes twice through DirectSoundDevice_Create():
... DirectSoundDevice_Create() ... goes throught DSDB_CreateMMAP() perfectly ... OpenAL Init ... DirectSoundDevice_Create() ... crashes inside DSDB_CreateMMAP() :-( ...
Shouldn't die even in first case, because we don't have proper OpenAL HW acceleration in linux??
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #57 from Raymond superquad.vortex2@gmail.com 2010-05-08 08:27:55 --- (In reply to comment #46)
Created an attachment (id=26939)
--> (http://bugs.winehq.org/attachment.cgi?id=26939) [details]
Unreal tournament under Valgrind
Advantage of UT3 is, that it is able to run under valgrind. Attached is output of
WINEDEBUG=+dsalsa valgrind --trace-children=yes --suppressions=$HOME/valgrind-suppressions wine UT3.exe 2>&1 | tee out3.txt
Would it help to rerun with --error-limit=no or with other parametr?
Note: The "Unrecognised instruction" is different on each run...
fixme:d3d:WineD3D_ChoosePixelFormat Add OpenGL context recreation support to SetDepthStencilSurface trace:dsalsa:widDsCreate (0,0x7f02f2f4) trace:dsalsa:IDsCaptureDriverImpl_GetDriverDesc (0x7f020200,0x7f02f2f8) trace:dsalsa:IDsCaptureDriverImpl_Open Success trace:dsalsa:IDsCaptureDriverImpl_GetCaps (0x7f020200,0x7f02f524) trace:dsalsa:IDsCaptureDriverImpl_CreateCaptureBuffer (0x7f020200,0x7f055e90,0,0) trace:dsalsa:IDsCaptureDriverBufferImpl_SetFormat (0x7f0564a8, 0x7f055e90) trace:dsalsa:CreateMMAP mmap'd buffer is an ALSA type 14 buffer
type 14 seem to be "plug" plugin , so what is your "default" device
mmap_mode is a wrong name , it should be pcm_type
if (mmap_mode == SND_PCM_TYPE_HW) TRACE("mmap'd buffer is a direct hardware buffer.\n"); else if (mmap_mode == SND_PCM_TYPE_DMIX) TRACE("mmap'd buffer is an ALSA dmix buffer\n"); else TRACE("mmap'd buffer is an ALSA type %d buffer\n", mmap_mode);
enum _snd_pcm_type { /** Kernel level PCM */ SND_PCM_TYPE_HW = 0, /** Hooked PCM */ SND_PCM_TYPE_HOOKS, /** One or more linked PCM with exclusive access to selected channels */ SND_PCM_TYPE_MULTI, /** File writing plugin */ SND_PCM_TYPE_FILE, /** Null endpoint PCM */ SND_PCM_TYPE_NULL, /** Shared memory client PCM */ SND_PCM_TYPE_SHM, /** INET client PCM (not yet implemented) */ SND_PCM_TYPE_INET, /** Copying plugin */ SND_PCM_TYPE_COPY, /** Linear format conversion PCM */ SND_PCM_TYPE_LINEAR, /** A-Law format conversion PCM */ SND_PCM_TYPE_ALAW, /** Mu-Law format conversion PCM */ SND_PCM_TYPE_MULAW, /** IMA-ADPCM format conversion PCM */ SND_PCM_TYPE_ADPCM, /** Rate conversion PCM */ SND_PCM_TYPE_RATE, /** Attenuated static route PCM */ SND_PCM_TYPE_ROUTE, /** Format adjusted PCM */ SND_PCM_TYPE_PLUG,
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #58 from Raymond superquad.vortex2@gmail.com 2010-05-08 08:38:23 --- (In reply to comment #56)
Thanks Chris & Raymond! As per Raymond, there isn't much to do for me and only proper way should be, that wine in case of OpenAL where game requests HW acceleration wine replays "sorry, i don't have one, but go with SW...(fallback to SW)"?? Am i correct?
which enables "full" audio
acceleration when ALSA doesn't have mmap. Before then, a device without mmap automatically fell back to "Emulation" for audio acceleration.
Unfortunately it seem that none of wine developer have a sound card which support hardware acceleartion (e.g. Sound Blaster ! Live, ...
Standard Hardware acceleration : enable secondary buffer but disable any vendor specific acceleration such as EAX
alsa driver support mmap is not any hardware acceleration , hardware acceleration is the secondary hardware buffer
i.e. the sound card have to support 16 voices and hardware volume control for each voice
http://git.alsa-project.org/?p=alsa-tools.git;a=blob;f=hwmixvolume/README
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #59 from Chris chris.kcat@gmail.com 2010-05-08 10:08:11 --- Created an attachment (id=27810) --> (http://bugs.winehq.org/attachment.cgi?id=27810) Disable mmap for dsound acceleration
With DSound, there's 4 acceleration modes: Emulation - Uses winmm to play the primary buffer, secondary buffers are mixed in software, no hardware effects Basic - Uses a hardware voice for the primary buffer, secondary buffers are mixed in software, no hardware effects Standard - Uses hardware voices for the primary and secondary buffers, no hardware effects Full - Uses hardware voices for the primary and secondary buffers, uses hardware effects
All of Wine's current audio drivers only support Emulation, except for winealsa which can provide Basic. Setting Basic, Standard, or Full behaves just like Basic (or Emulation).
Out of curiousity, does the attached patch work when dsound acceleration is on?
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #60 from Raymond superquad.vortex2@gmail.com 2010-05-08 17:26:27 --- (In reply to comment #59)
Created an attachment (id=27810)
--> (http://bugs.winehq.org/attachment.cgi?id=27810) [details]
Disable mmap for dsound acceleration
With DSound, there's 4 acceleration modes: Emulation - Uses winmm to play the primary buffer, secondary buffers are mixed in software, no hardware effects Basic - Uses a hardware voice for the primary buffer, secondary buffers are mixed in software, no hardware effects Standard - Uses hardware voices for the primary and secondary buffers, no hardware effects Full - Uses hardware voices for the primary and secondary buffers, uses hardware effects
All of Wine's current audio drivers only support Emulation, except for winealsa which can provide Basic. Setting Basic, Standard, or Full behaves just like Basic (or Emulation).
Out of curiousity, does the attached patch work when dsound acceleration is on?
what is hardware effects ?
seem different from vendor-specific property-set extensions.
current implementation does not support hardware acceleration of secondary buffers since
err = snd_pcm_open(&pcm, WOutDev[This->drv->wDevID].pcmname, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK); if (err < 0) { if (errno != EBUSY || !This->pcm) { WARN("Cannot open sound device: %s\n", snd_strerror(err)); return DSERR_GENERIC; } snd_pcm_drop(This->pcm); snd_pcm_close(This->pcm); This->pcm = NULL; err = snd_pcm_open(&pcm, WOutDev[This->drv->wDevID].pcmname, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK); if (err < 0) { WARN("Cannot open sound device: %s\n", snd_strerror(err)); return DSERR_BUFFERLOST; } }
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #61 from Wylda wylda@volny.cz 2010-05-08 17:41:32 --- (In reply to comment #59)
Disable mmap for dsound acceleration
Out of curiousity, does the attached patch work when dsound acceleration is on?
@Chris: No, unfortunately. Both Mirrors Edge and Unreal Tournament 3 crash the same way when i apply this patch on top of wine-1.1.44-19-gd2a0188 and set "Hardware Acceleration: Full" (i hope this settings fulfill yours "dsound acceleration is on").
@Raymond:
Unfortunately it seem that none of wine developer have a sound card which support hardware acceleartion (e.g. Sound Blaster ! Live, ...
Does the following card has all the needed?
CREATIVE SOUND BLASTER X-Fi Xtreme Audio, PCIe x1
X-Fi functions: =============== X-Fi Crystalizer X-Fi CMSS-3D Virtual X-Fi CMSS-3D Headphone EAX 1.0, 2.0, Advanced HD 3.0, 4.0 DirectSound, 3D OpenAL
Playback: ========= 24 bits / 96 kHz, 7.1
Recording: ========== 24 bits / 96 kHz
If yes, i could buy one and send to any developer, who would seriously improved wine's audio acceleration.
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #62 from Raymond superquad.vortex2@gmail.com 2010-05-08 18:43:08 --- (In reply to comment #61)
Basic Hardware acceleration : Disables hardware acceleration of DirectSound secondary buffers.
@Raymond:
Unfortunately it seem that none of wine developer have a sound card which support hardware acceleartion (e.g. Sound Blaster ! Live, ...
Does the following card has all the needed?
No, most of the hardware acceleration sound cards support hardware wavetable synth
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #63 from Chris chris.kcat@gmail.com 2010-05-08 19:54:01 ---
No, unfortunately. Both Mirrors Edge and Unreal Tournament 3 crash the same way when i apply this patch on top of wine-1.1.44-19-gd2a0188 and set "Hardware Acceleration: Full" (i hope this settings fulfill yours "dsound acceleration is on").
Damn. :( Yeah, that setting is what I meant.
Unfortunately it seem that none of wine developer have a sound card which support hardware acceleartion (e.g. Sound Blaster ! Live, ...
Does the following card has all the needed?
CREATIVE SOUND BLASTER X-Fi Xtreme Audio, PCIe x1
That would support Full acceleration, yes (plenty of voices for secondary buffers, and has EAX for hardware effects). It wouldn't really help Wine, though. The current drivers are a dead-end, and I don't believe ALSA supports the controls necessary for handling the DSound API properly (it certainly doesn't expose any EAX controls).
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #64 from Raymond superquad.vortex2@gmail.com 2010-05-08 22:34:16 --- (In reply to comment #10)
Created an attachment (id=24960)
--> (http://bugs.winehq.org/attachment.cgi?id=24960) [details]
Avoid calling snd_pcm_sw_params with an uninitialized sw_params struct
can you explain why alsa need at leas 3 buffers since some of the sound card 's driver only support 2 periods per buffer
/* ALSA needs at least 3 buffers to work successfully */ This->mmap_commitahead = 3 * psize;
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #65 from Raymond superquad.vortex2@gmail.com 2010-05-08 22:51:52 --- (In reply to comment #63)
No, unfortunately. Both Mirrors Edge and Unreal Tournament 3 crash the same way when i apply this patch on top of wine-1.1.44-19-gd2a0188 and set "Hardware Acceleration: Full" (i hope this settings fulfill yours "dsound acceleration is on").
Damn. :( Yeah, that setting is what I meant.
Unfortunately it seem that none of wine developer have a sound card which support hardware acceleartion (e.g. Sound Blaster ! Live, ...
Does the following card has all the needed?
CREATIVE SOUND BLASTER X-Fi Xtreme Audio, PCIe x1
That would support Full acceleration, yes (plenty of voices for secondary buffers, and has EAX for hardware effects). It wouldn't really help Wine, though. The current drivers are a dead-end, and I don't believe ALSA supports the controls necessary for handling the DSound API properly (it certainly doesn't expose any EAX controls).
The hwmixvolume is only supported by emu10k1 driver and ymfpci
i.e. IDsDriverBufferImpl_SetVolumePan() for the secondary buffers using hardware mixing volume controls
The other hardware effects are vendor-specific property-set extensions.
The major problem of winealsa.drv is dscaputre.c and dsoutput.c just ignore all the err returned by alsa functions
snd_pcm_sw_params_current(pcm, sw_params); snd_pcm_sw_params_set_start_threshold(pcm, sw_params, 0); snd_pcm_sw_params_get_boundary(sw_params, &boundary); snd_pcm_sw_params_set_stop_threshold(pcm, sw_params, boundary); snd_pcm_sw_params_set_silence_threshold(pcm, sw_params, INT_MAX); snd_pcm_sw_params_set_silence_size(pcm, sw_params, 0); snd_pcm_sw_params_set_avail_min(pcm, sw_params, 0); err = snd_pcm_sw_params(pcm, sw_params);
(In reply to comment #63)
No, unfortunately. Both Mirrors Edge and Unreal Tournament 3 crash the same way when i apply this patch on top of wine-1.1.44-19-gd2a0188 and set "Hardware Acceleration: Full" (i hope this settings fulfill yours "dsound acceleration is on").
Damn. :( Yeah, that setting is what I meant.
Unfortunately it seem that none of wine developer have a sound card which support hardware acceleartion (e.g. Sound Blaster ! Live, ...
Does the following card has all the needed?
CREATIVE SOUND BLASTER X-Fi Xtreme Audio, PCIe x1
That would support Full acceleration, yes (plenty of voices for secondary buffers, and has EAX for hardware effects). It wouldn't really help Wine, though. The current drivers are a dead-end, and I don't believe ALSA supports the controls necessary for handling the DSound API properly (it certainly doesn't expose any EAX controls).
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #66 from Chris chris.kcat@gmail.com 2010-05-09 01:37:24 ---
can you explain why alsa need at leas 3 buffers
Can't answer that, unfortunately.
What if you try running the app using LD_PRELOAD, to force ALSA to load and stay loaded?
$ LD_PRELOAD=libasound.so.2 wine ...
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #67 from Wylda wylda@volny.cz 2010-05-09 02:17:55 ---
Are the omitted return values of Alsa's function because of speed/latency?
$ LD_PRELOAD=libasound.so.2 wine ...
Does not help, crashes the same way in Mirror's Edge and also in Unreal Tournament 3.
I also tried, if this is not caused by -O0 vs -O2 flags, but no change for both games.
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #68 from Raymond superquad.vortex2@gmail.com 2010-05-09 18:24:19 --- (In reply to comment #63) ive, ...
Does the following card has all the needed?
CREATIVE SOUND BLASTER X-Fi Xtreme Audio, PCIe x1
That would support Full acceleration, yes (plenty of voices for secondary buffers, and has EAX for hardware effects). It wouldn't really help Wine, though. The current drivers are a dead-end, and I don't believe ALSA supports the controls necessary for handling the DSound API properly (it certainly doesn't expose any EAX controls).
But wine does not support FULL hardware acceleration ( just emulation only) and Vista does not use dsound any more
is it correct for wine to use DSCAPBS_LOCHARDWARE ?
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #69 from Chris chris.kcat@gmail.com 2010-05-09 22:21:57 ---
But wine does not support FULL hardware acceleration ( just emulation only) and Vista does not use dsound any more
The winealsa driver supports Basic acceleration (primary buffer is hardware). I believe it's a quirk of DSound in real Windows to always say the primary buffer is in hardware, even under Emulation.
Under Vista/7, DSound is still available, but it doesn't support hardware acceleration without something like ALchemy and hardware OpenAL drivers.
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #70 from Raymond superquad.vortex2@gmail.com 2010-05-10 00:46:03 --- (In reply to comment #69)
But wine does not support FULL hardware acceleration ( just emulation only) and Vista does not use dsound any more
The winealsa driver supports Basic acceleration (primary buffer is hardware). I believe it's a quirk of DSound in real Windows to always say the primary buffer is in hardware, even under Emulation.
Under Vista/7, DSound is still available, but it doesn't support hardware acceleration without something like ALchemy and hardware OpenAL drivers.
Your definition is a little bit different
Emulation Forces emulation.
The Emulation setting above forces DirectSound into emulation mode. In this mode, DirectSound applications run as though no DirectSound driver is present. All mixing is done by DirectSound in user mode, and the resulting audio data is played back through the waveOut API
In linux openal is just software mixing of the 16 voices , so full hardware accleartion is impossible
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #71 from Chris chris.kcat@gmail.com 2010-05-10 02:03:08 ---
The Emulation setting above forces DirectSound into emulation mode. In this mode, DirectSound applications run as though no DirectSound driver is present. All mixing is done by DirectSound in user mode, and the resulting audio data is played back through the waveOut API
I don't see how that contradicts what I said. Under Emulation, the primary buffer is played out using winmm (aka the WaveIn/WaveOut API). Under Basic, the primary buffer is an ALSA PCM device. As far as winealsa is concerned, the PCM device it gets from ALSA represents hardware; it doesn't know/care if it goes to dmix or pulseaudio instead.
In linux openal is just software mixing of the 16 voices , so full hardware accleartion is impossible
In Linux, there is no hardware acceleration for OpenAL, though it can do up to 256 "voices". Under Vista/7, there are accelerated OpenAL drivers for some hardware, and there is a DSound->OpenAL wrapper so DSound can take advantage of hardware again (for some apps).
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #72 from Raymond superquad.vortex2@gmail.com 2010-05-10 19:58:56 --- (In reply to comment #71)
The Emulation setting above forces DirectSound into emulation mode. In this mode, DirectSound applications run as though no DirectSound driver is present. All mixing is done by DirectSound in user mode, and the resulting audio data is played back through the waveOut API
I don't see how that contradicts what I said. Under Emulation, the primary buffer is played out using winmm (aka the WaveIn/WaveOut API). Under Basic, the primary buffer is an ALSA PCM device. As far as winealsa is concerned, the PCM device it gets from ALSA represents hardware; it doesn't know/care if it goes to dmix or pulseaudio instead.
dmix and pulseaudio are also software mixing in user space.
In ALSA 's term , hardware accleration in wine mean the driver support multiple subdevices , snd_pcm_info_get_subdevice_count() >= 16
In linux openal is just software mixing of the 16 voices , so full hardware accleartion is impossible
In Linux, there is no hardware acceleration for OpenAL, though it can do up to 256 "voices".
But wine seem did not return error when the application specify DSBCAPS_LOCHARDWARE if wine did not support any kind of hardware acceleration
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #73 from Raymond superquad.vortex2@gmail.com 2010-05-10 20:22:38 --- (In reply to comment #59)
Created an attachment (id=27810)
--> (http://bugs.winehq.org/attachment.cgi?id=27810) [details]
Disable mmap for dsound acceleration
With DSound, there's 4 acceleration modes: Emulation - Uses winmm to play the primary buffer, secondary buffers are mixed in software, no hardware effects
Did wine implement IDsDriverBufferImpl_SetVolumePan() of secondary software buffer when mixing secondary buffer to primary buffer ?
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #74 from Wylda wylda@volny.cz 2010-05-11 01:03:17 --- (In reply to comment #72)
But wine seem did not return error when the application specify DSBCAPS_LOCHARDWARE if wine did not support any kind of hardware acceleration
What function should return the error and what is the value of the error? I could try to change the code, to confirm your theory.
(As i have nearly any programming knowledge, better variant is, that you attach a patch here directly, to avoid my programming mistakes)
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #75 from Raymond superquad.vortex2@gmail.com 2010-05-11 02:42:25 --- (In reply to comment #74)
(In reply to comment #72)
But wine seem did not return error when the application specify DSBCAPS_LOCHARDWARE if wine did not support any kind of hardware acceleration
What function should return the error and what is the value of the error? I could try to change the code, to confirm your theory.
(As i have nearly any programming knowledge, better variant is, that you attach a patch here directly, to avoid my programming mistakes)
DSBCAPS_LOCHARDWARE
Forces the buffer to use hardware mixing, even if DSBCAPS_STATIC is not specified. If the device does not support hardware mixing or if the required hardware memory is not available, the call to the IDirectSound::CreateSoundBuffer method will fail. The application must ensure that a mixing channel will be available for this buffer; this condition is not guaranteed
I am not sure which variable should be use
DWORD dwFreeHwMixingAllBuffers; DWORD dwFreeHwMixingStaticBuffers; DWORD dwFreeHwMixingStreamingBuffers;
i.e. if (( dwFreeHwMixing???Buffers < 1 ) && ( request is DSBCAPS_LOCHARDWARE ) return error in IDirectSound::CreateSoundBuffer
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #76 from Raymond superquad.vortex2@gmail.com 2010-05-11 21:51:19 --- (In reply to comment #74)
(In reply to comment #72)
But wine seem did not return error when the application specify DSBCAPS_LOCHARDWARE if wine did not support any kind of hardware acceleration
What function should return the error and what is the value of the error? I could try to change the code, to confirm your theory.
it is hard for you to change the code if you don't have and pci sound card with hardware accleration
goggle "Hardware Acceleration on ISA and PCI Cards" to find out the definition of hardware acclearation
But I doubt anyone has an ISA slot of the SB16 which wine try to emulate
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #77 from Chris chris.kcat@gmail.com 2010-06-03 00:55:35 --- I'd be interested if someone could test the latest Git/SVN version of OpenAL Soft. I tracked an error from other apps that resulted in odd crashes, to the constant unloading/reloading of PortAudio. So especially if you have that, it may be worth checking out now.
Instead of using the latest Git/SVN version, you can also try adding this to the [general] section of ~/.alsoftrc (create it if it doesn't exist) to disable PortAudio: drivers = pulse,alsa,oss
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #78 from Raymond superquad.vortex2@gmail.com 2010-06-04 03:33:32 --- (In reply to comment #77)
I'd be interested if someone could test the latest Git/SVN version of OpenAL Soft. I tracked an error from other apps that resulted in odd crashes, to the constant unloading/reloading of PortAudio. So especially if you have that, it may be worth checking out now.
Instead of using the latest Git/SVN version, you can also try adding this to the [general] section of ~/.alsoftrc (create it if it doesn't exist) to disable PortAudio: drivers = pulse,alsa,oss
which version of portaudio are you using ?
AFAIK , the old version of portaudio only support mmap and not support read/write so you cannot use pulseaudio as portaudio 's backend since alsa-pulse plugin does not support mmap
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #79 from Chris chris.kcat@gmail.com 2010-06-04 03:47:22 --- It's not actually using PortAudio that's the problem. The lib apparently doesn't like being unloaded/deinitialized and reloaded/reinitialized all the time, so even if the PortAudio backend is never used, the lib still gets loaded/initialized and unloaded/deinitialized when enumerating devices and eventually triggers the bug.
The drivers= line in the ~/.alsoftrc config file will prevent the PortAudio backend from being used at all, so it won't be probed and the lib won't ever be loaded or initialized.
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #80 from Raymond superquad.vortex2@gmail.com 2010-06-04 20:42:08 --- wine is emulating SB16 ( ISA sound card ) in winealsa.drv/waveinit.c
wwi.incaps.wMid = MM_CREATIVE; wwi.incaps.wPid = MM_CREATIVE_SBP16_WAVEOUT; wwi.incaps.vDriverVersion = 0x0100;
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #81 from Raymond superquad.vortex2@gmail.com 2010-06-05 02:20:18 --- (In reply to comment #79)
The drivers= line in the ~/.alsoftrc config file will prevent the PortAudio backend from being used at all, so it won't be probed and the lib won't ever be loaded or initialized.
driver = alsa,oss,pulse
but wine seem blacklist all alsa "hw" devices and oss device because they doesn't support floating point format , have to use "plughw" for the "render" and "capture" test but "capture" alway fail for oss driver because of invalid format
./wine dlls/mmdevapi/tests/mmdevapi_test.exe.so mmdevenum AL lib: alsa.c:925: set format = 2 mmdevenum.c:103: Device found: {0.0.0.00000000}.{141BC511-102F-421E-90D3-D80617C1BBC0} mmdevenum: 27 tests executed (0 marked as todo, 0 failures), 0 skipped.
what is this device "{0.0.0.00000000}.{141BC511-102F-421E-90D3-D80617C1BBC0}" ?
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #82 from Raymond superquad.vortex2@gmail.com 2010-06-07 00:33:12 --- (In reply to comment #69)
But wine does not support FULL hardware acceleration ( just emulation only) and Vista does not use dsound any more
The winealsa driver supports Basic acceleration (primary buffer is hardware). I believe it's a quirk of DSound in real Windows to always say the primary buffer is in hardware, even under Emulation.
Under Vista/7, DSound is still available, but it doesn't support hardware acceleration without something like ALchemy and hardware OpenAL drivers.
DSBCAPS Structure
dwPlayCpuOverhead The processing overhead as a percentage of main processor cycles needed to mix this sound buffer. For hardware buffers, this member will be zero because the mixing is performed by the sound device. For software buffers, this member depends on the buffer format and the speed of the system processor.
wine seem did not provide the correct value for dwPlayCpuOverhead
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #83 from Raymond superquad.vortex2@gmail.com 2010-06-09 00:13:41 --- (In reply to comment #66)
can you explain why alsa need at leas 3 buffers
Can't answer that, unfortunately.
err = snd_pcm_hw_params_get_period_size(hw_params, &psize, NULL);
psize is period size , so it is wrong to say "alsa need at least 3 buffers"
i.e. wine expect the driver support at least 3 periods
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #84 from Raymond superquad.vortex2@gmail.com 2010-06-11 18:44:52 --- (In reply to comment #66)
can you explain why alsa need at leas 3 buffers
Can't answer that, unfortunately.
What if you try running the app using LD_PRELOAD, to force ALSA to load and stay loaded?
$ LD_PRELOAD=libasound.so.2 wine ...
The major problem is dsoutput.c also ignore those fatal errors returned by alsa functions such as snd_pcm_hw_params similar to waveout.c in bug 22034
err = snd_pcm_hw_params(pcm, hw_params);
/* ALSA needs at least 3 buffers to work successfully */ This->mmap_commitahead = 3 * psize; while (This->mmap_commitahead <= 512) This->mmap_commitahead += psize;
http://bugs.winehq.org/show_bug.cgi?id=20799
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Multiple games using OpenAL |(not a Wine bug) Multiple |freezes/crashes during the |games using OpenAL |startup |freezes/crashes during the | |startup
--- Comment #85 from Wylda wylda@volny.cz 2010-06-12 10:38:29 ---
Instead of using the latest Git/SVN version, you can also try adding this to the [general] section of ~/.alsoftrc (create it if it doesn't exist) to disable PortAudio: drivers = pulse,alsa,oss
~/.alsoftrc made Mirrors Edge and even Unreal Tournament 3 running! I went bit further, because pulse in not popular in wine(i guess), so my ~/.alsoftrc consist of following two lines only:
[general] drivers = alsa
I hope that's OK - being more strict than author suggest ;)
Few points:
i] When pulse is used, i get in console:
socket(): Address family not supported by protocol
i track it down and it's printed when alcOpenDevice is used with pulse. But seeing this line in wine output made me think about some networking issue.
ii] Raymond seems to have right about not checking return values. I'm not a programmer to help with these. So Raymond, would you please consider sending patches to wine-devel?
iii] I would keep this bug open with subject stating "Not a wine bug". For the same reason as bug 20380 is being kept opened. Removing regression keyword...
http://bugs.winehq.org/show_bug.cgi?id=20799
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|regression |
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #86 from Wylda wylda@volny.cz 2010-06-12 10:45:37 ---
Chris & Raymond, thank you for your support!
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #87 from Chris chris.kcat@gmail.com 2010-06-12 16:39:00 ---
~/.alsoftrc made Mirrors Edge and even Unreal Tournament 3 running! I went bit further, because pulse in not popular in wine(i guess), so my ~/.alsoftrc consist of following two lines only:
[general] drivers = alsa
I hope that's OK - being more strict than author suggest ;)
That's fine. :) The next version of OpenAL Soft should fix this issue, BTW.
Few points:
i] When pulse is used, i get in console:
socket(): Address family not supported by protocol
i track it down and it's printed when alcOpenDevice is used with pulse. But seeing this line in wine output made me think about some networking issue.
It's probably PulseAudio (or some lower level interface) printing that out. FWIW, Wine output will tend to start with fixme: or err: (or warn: or trace:..), and OpenAL with start with AL lib:, and ALSA will start with ALSA lib:. Very few places in Wine will just blurt out a warning/error like that.
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #88 from Raymond superquad.vortex2@gmail.com 2010-06-12 22:20:33 --- (In reply to comment #85)
ii] Raymond seems to have right about not checking return values. I'm not a programmer to help with these. So Raymond, would you please consider sending patches to wine-devel?
Is 3 periods the requirement of using dmix ?
Need wine developer explain why "This->mmap_commitahead = 3 * psize;"
since some of the sound driver only support 2 periods per buffer ( e.g. cs46xx ,.. )
the buffer size of cs46xx is only twice the period size
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #89 from Raymond superquad.vortex2@gmail.com 2010-06-12 22:25:29 --- (In reply to comment #59)
Created an attachment (id=27810)
--> (http://bugs.winehq.org/attachment.cgi?id=27810) [details]
Disable mmap for dsound acceleration
With DSound, there's 4 acceleration modes: Emulation - Uses winmm to play the primary buffer, secondary buffers are mixed in software, no hardware effects Basic - Uses a hardware voice for the primary buffer, secondary buffers are mixed in software, no hardware effects Standard - Uses hardware voices for the primary and secondary buffers, no hardware effects Full - Uses hardware voices for the primary and secondary buffers, uses hardware effects
All of Wine's current audio drivers only support Emulation, except for winealsa which can provide Basic. Setting Basic, Standard, or Full behaves just like Basic (or Emulation).
Out of curiousity, does the attached patch work when dsound acceleration is on?
AFAIK , "Test sound" in dxdiag only play using software buffer with different rate and format in wine, still cannot play using hardware buffer in wine since dwFreeHwMixingStreamingBuffer is zero
http://bugs.winehq.org/show_bug.cgi?id=20799
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |Eldmannen+wine@gmail.com
--- Comment #90 from Wylda wylda@volny.cz 2010-06-20 07:44:21 --- *** Bug 22095 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #91 from Raymond superquad.vortex2@gmail.com 2010-06-24 00:22:22 --- (In reply to comment #63)
and I don't believe ALSA supports the controls necessary for handling the DSound API properly (it certainly doesn't expose any EAX controls).
If you look at the source code of trident driver, it seem has most of the feature of DSound, (e.g pan . reverb, chrous controls )
http://git.alsa-project.org/?p=alsa-kernel.git;a=blob;f=sound/pci/trident/tr...
I don't have this card, so does not know whether the features are necessary for handling DSound API, don't expect it can support EAX control since this is vendor specific
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #92 from Raymond superquad.vortex2@gmail.com 2010-07-28 03:21:49 --- (In reply to comment #79)
It's not actually using PortAudio that's the problem. The lib apparently doesn't like being unloaded/deinitialized and reloaded/reinitialized all the time, so even if the PortAudio backend is never used, the lib still gets loaded/initialized and unloaded/deinitialized when enumerating devices and eventually triggers the bug.
The drivers= line in the ~/.alsoftrc config file will prevent the PortAudio backend from being used at all, so it won't be probed and the lib won't ever be loaded or initialized.
The portaudio builddevicelist search all config file including .asoundrc to find all possible pcm device and it use snd_ctl_open() to find the device name
if you have bluetooth-alsa plugin , ctl_bluetooth.c call bt_audio_service_open
ctl.headset { type bluetooth }
bt_audio_service_open: connect() failed: Connection refused
http://bugs.winehq.org/show_bug.cgi?id=20799
--- Comment #93 from Raymond superquad.vortex2@gmail.com 2011-02-17 22:03:27 CST ---
(In reply to comment #54)
snd_pcm_sw_params_set_silence_threshold is an ALSA function. There's nothing particularly special about it that I know of, though, so I can only imagine that the two games are overwriting heap memory a bit differently. You need to figure out what's causing the memory to be overwritten and why; the ALSA crashes are just a side-effect of the issue.
The point is snd_pcm_sw_params_set_silence_threshold return error when the value is greater than buffer size, it is not correct to set silence threshold to boundary
BTW, why does winealsa expect it always have commitadhead to write to the sound card in CommitAll() since the application just issue getposition() to get the playback position ?
http://bugs.winehq.org/show_bug.cgi?id=20799
sacrediou sacrediou@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sacrediou@yahoo.fr
http://bugs.winehq.org/show_bug.cgi?id=20799
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #94 from joaopa jeremielapuree@yahoo.fr 2013-04-20 23:26:45 CDT --- This bug is a big mess. Is the originaly reported bug fixed?
http://bugs.winehq.org/show_bug.cgi?id=20799
winebugzilla.kyoo@xoxy.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|winebugzilla.kyoo@xoxy.net |
https://bugs.winehq.org/show_bug.cgi?id=20799
Jarkko K jarkko_korpi@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jarkko_korpi@hotmail.com
--- Comment #95 from Jarkko K jarkko_korpi@hotmail.com --- This game seem to be effected
Restaurant Empire crashes during introduction animation https://bugs.winehq.org/show_bug.cgi?id=30197
https://bugs.winehq.org/show_bug.cgi?id=20799
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #96 from Wylda wylda@volny.cz --- (In reply to joaopa from comment #94)
Is the originaly reported bug fixed?
Works perfectly in wine-1.7.27. Tested in mirror's edge.
https://bugs.winehq.org/show_bug.cgi?id=20799
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #97 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.28.
https://bugs.winehq.org/show_bug.cgi?id=20799
Louis Lenders xerox.xerox2000x@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winehq@pmc.com.pt
--- Comment #98 from Louis Lenders xerox.xerox2000x@gmail.com --- *** Bug 30197 has been marked as a duplicate of this bug. ***