http://bugs.winehq.org/show_bug.cgi?id=29056
Bug #: 29056 Summary: Program freezes after sndPlaySound Product: Wine Version: 1.3.32 Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winmm&mci AssignedTo: wine-bugs@winehq.org ReportedBy: rosslagerwall@gmail.com Classification: Unclassified
Created attachment 37441 --> http://bugs.winehq.org/attachment.cgi?id=37441 test program for issue
1cde966c35dcb0b5dc7bc5a6c42b788f6d8f561c introduces a regression for the test program attached.
Before this, Wine would repeatedly play the sound when the button is clicked. After this commit, the first click plays the sound correctly. The second click freezes the program.
Cheers
http://bugs.winehq.org/show_bug.cgi?id=29056
Ross Lagerwall rosslagerwall@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hoehle@users.sourceforge.ne | |t Regression SHA1| |1cde966c35dcb0b5dc7bc5a6c42 | |b788f6d8f561c
http://bugs.winehq.org/show_bug.cgi?id=29056
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Program freezes after |Test program freezes after |sndPlaySound |sndPlaySound
--- Comment #1 from Dmitry Timoshkov dmitry@baikal.ru 2011-11-11 01:08:54 CST --- Jörg Höhle hoehle@users.sourceforge.net Mon, 19 Sep 2011 12:30:58 +0000 (14:30 +0200)
winmm: Never write silence, mmdevapi must handle underruns.
http://bugs.winehq.org/show_bug.cgi?id=29056
Ross Lagerwall rosslagerwall@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |http://numberwise.com/files | |/Numberwise-1.13.exe
--- Comment #2 from Ross Lagerwall rosslagerwall@gmail.com 2011-11-11 02:07:44 CST --- Note that this error actually occurs in a real program: Numberwise - http://numberwise.com/files/Numberwise-1.13.exe
http://bugs.winehq.org/show_bug.cgi?id=29056
GyB gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gyebro69@gmail.com
--- Comment #3 from GyB gyebro69@gmail.com 2011-11-11 02:51:47 CST --- No freezing occurs here in the test program when Alsa is in use. When PulseAudio is running there is also no problem here. The only way to reproduce the hanging issues is to suspend PA prior to the test: pasuspender wine Project1.exe. Afterwards the test program indeed freezes. To recover from this is to restart the PA daemon. Tested with 1.3.32 and wine-1.3.32-122-g2e5f73e
Fedora 16 x86 Alsa 1.0.24 PulseAudio 0.9.23 Kernel 3.1.0-7.fc16.i686.PAE Audio device: nVidia Corporation MCP61 High Definition Audio (rev a2)
http://bugs.winehq.org/show_bug.cgi?id=29056
Henri Verbeet hverbeet@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression
http://bugs.winehq.org/show_bug.cgi?id=29056
--- Comment #4 from Jörg Höhle hoehle@users.sourceforge.net 2011-11-11 06:48:53 CST --- Is the sound to play a tiny one, shorter than ALSA's period size? If so, then it's my prediction from bug #27087, comment #17 come true.
The only way to reproduce the hanging issues is to suspend PA
Like in bug #27087, comment #12?
We need to make progress with bug #28723 in order to decide how to handle ALSA's period. Once that is done, we may pad small initial writes with silence to force ALSA to start (requires ALSA's period <= mmdevapi buffer size).
http://bugs.winehq.org/show_bug.cgi?id=29056
--- Comment #5 from GyB gyebro69@gmail.com 2011-11-11 07:27:36 CST --- (In reply to comment #4)
Is the sound to play a tiny one, shorter than ALSA's period size? If so, then it's my prediction from bug #27087, comment #17 come true.
The only way to reproduce the hanging issues is to suspend PA
Like in bug #27087, comment #12?
Yes, it seems to be the same issue: yesterday I tested the file UIButtonPress.wav (in bug #27087) with your wintest.exe mcishell, and it behaved in the same way: no freezing when Alsa is in use, no freezing when PA is running. It does freezes when PA is suspended.
http://bugs.winehq.org/show_bug.cgi?id=29056
--- Comment #6 from Ross Lagerwall rosslagerwall@gmail.com 2011-11-11 10:03:36 CST --- My system is: OpenSUSE 11.4 x86_64 (with 32bit libs) Alsa 1.0.24 Pulseaudio 0.9.22 Kernel 2.6.37.6-0.9-desktop Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 01)
Running with pasuspender results in no sound the first click and a freeze on the second click, even for versions *before* 1cde966c35. Running without pasuspender results in sound for the first click and a freeze on the second click for versions 1cde966c35 and after. It results in correct behavior for versions before 1cde966c35.
This seems to be regardless of the length of the sound.
http://bugs.winehq.org/show_bug.cgi?id=29056
--- Comment #7 from GyB gyebro69@gmail.com 2011-11-11 10:22:47 CST --- (In reply to comment #6)
Running with pasuspender results in no sound the first click and a freeze on the second click, even for versions *before* 1cde966c35. Running without pasuspender results in sound for the first click and a freeze on the second click for versions 1cde966c35 and after. It results in correct behavior for versions before 1cde966c35.
This seems to be regardless of the length of the sound.
After the first usage of pasuspender you need to reload the PA daemon, otherwise the freezing will occur, whether you use pasuspender in the next test or not. 'killall pulseaudio' then 'pulseaudio -D'. At least that's what I experienced on my system (I'm not familiar with PA, always using ALSA).
http://bugs.winehq.org/show_bug.cgi?id=29056
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
http://bugs.winehq.org/show_bug.cgi?id=29056
--- Comment #8 from Ross Lagerwall rosslagerwall@gmail.com 2011-11-12 08:23:57 CST --- I tested the issue on Mandriva 2011 64 bit and it does not seem to be exist so maybe it is something specific to the OpenSUSE setup.
http://bugs.winehq.org/show_bug.cgi?id=29056
Jörg Höhle hoehle@users.sourceforge.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |1.4.0
--- Comment #9 from Jörg Höhle hoehle@users.sourceforge.net 2011-12-12 06:52:56 CST --- Ross, please compare your Mandriva and OpenSuse setups. Please report PA and alsa_plugins versions. Use cat /proc/asound/card0/pcm0c/sub0/?w_params to see which parameters the ALSA back end (last before speaker) uses, and the Wine log files to see which parameters the front end (likely PulseAudio or dmix) uses. The front end matters actually.
I want to know whether this issue is solely about the ALSA bug that it won't start when fed less than alsa_period_size samples (comment #4) or whether something else is involved, e.g some strange pasuspender issue.
This seems to be regardless of the length of the sound.
In the case with pasuspender or without?
What I believe should be observed: - Without pasuspender: New PulseAudio (alsa plugins 1.0.24). Might work. - Without pasuspender: Old PulseAudio is running. One click (might start but not with short samples), then hangs (PA underrun bug). - With pasuspender: Dmix is running, no PA. No click, hangs (never starts) with short samples; long samples work.
http://bugs.winehq.org/show_bug.cgi?id=29056
--- Comment #10 from Ross Lagerwall rosslagerwall@gmail.com 2011-12-12 21:33:43 CST --- Hi,
I will test this when I have some time and report back the results.
Cheers Ross
http://bugs.winehq.org/show_bug.cgi?id=29056
Jörg Höhle hoehle@users.sourceforge.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |DUPLICATE
--- Comment #11 from Jörg Höhle hoehle@users.sourceforge.net 2012-01-18 00:35:50 CST --- (In reply to GyB's comment #7)
After the first usage of pasuspender you need to reload the PA daemon, otherwise the freezing will occur, whether you use pasuspender in the next test or not. 'killall pulseaudio' then 'pulseaudio -D'.
This is indeed bogus behaviour of pasuspender observable by me in Ubuntu Lucid. Any sound output to "default" is dead afterwards, incl. speaker-test (whereas speaker-test -c2 -Dhw:0 still works, the device is not locked). In the older Ubuntu Intrepid, pasuspender works as its manpage says and you need not restart PA.
(In reply to Ross' comment #8)
I tested the issue on Mandriva 2011 64 bit and it does not seem to be exist so maybe it is something specific to the OpenSUSE setup.
Please file a bug report against PA or your Linux distribution if that bug persists with the most recent PA/alsa_plugins.
Running without pasuspender results in sound for the first click and a freeze on the second click for versions 1cde966c35 and after.
In summary, scenarios involving pasuspender (as opposed to not using PA at all) are likely consequences of that bug and should be marked invalid here. Because it's not cluttered by pasuspender issues, let's make wine bug #29299 the one about the regression caused by commit 1cde966c35dcb0b5dc7bc5a6c42b788f6d8f561c winmm: Never write silence, mmdevapi must handle underruns. As a consequence: - ALSA may not start short samples < period size This seems to only affect period-oriented devices like ALSA+dmix or hw:0, whereas ALSA+PA starts with the first sample written. - and it does not play trailing samples.
*** This bug has been marked as a duplicate of bug 29299 ***
http://bugs.winehq.org/show_bug.cgi?id=29056
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #12 from Austin English austinenglish@gmail.com 2012-01-23 19:46:23 CST --- Closing DUPLICATE.
https://bugs.winehq.org/show_bug.cgi?id=29056
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Test program freezes after |Numberwise 1.13 freezes |sndPlaySound |after sndPlaySound since | |Wine 1.3.32 URL|http://numberwise.com/files |https://web.archive.org/web |/Numberwise-1.13.exe |/20210314105217/https://www | |.numberwise.com/files/Numbe | |rwise-1.13.exe Component|winmm&mci |winealsa.drv CC| |focht@gmx.net