http://bugs.winehq.org/show_bug.cgi?id=29359
Bug #: 29359 Summary: wine git. DSOUND_BufPtrDiff: Assertion `ptr1 < buflen' failed. Product: Wine Version: unspecified Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-dsound AssignedTo: wine-bugs@winehq.org ReportedBy: lucianolorenti@gmail.com Classification: Unclassified
When i run the launcher of pes 2012 it's raised this error.
xe: ../../../wine-git/dlls/dsound/mixer.c:330: DSOUND_BufPtrDiff: Assertion `ptr1 < buflen' failed.
This game used to work a few months ago. Then stopped working raising an different error wich I am reporting unrelated, I think, to this error. The another error was "Unable to initialize rld.dll(E300)". But with some patch founded in this site I could pass that error and the assertion `ptr1 < buflen' also was raised.
http://bugs.winehq.org/show_bug.cgi?id=29359
Luciano Lorenti lucianolorenti@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Platform|x86 |x86-64
http://bugs.winehq.org/show_bug.cgi?id=29359
--- Comment #1 from Luciano Lorenti lucianolorenti@gmail.com 2011-12-16 17:05:51 CST --- Using wine's git version 20111216 on a Archlinux X86_64
http://bugs.winehq.org/show_bug.cgi?id=29359
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression Version|unspecified |1.3.35 Summary|wine git. |DSOUND_BufPtrDiff: |DSOUND_BufPtrDiff: |Assertion `ptr1 < buflen' |Assertion `ptr1 < buflen' |failed. |failed. |
--- Comment #2 from Dmitry Timoshkov dmitry@baikal.ru 2011-12-17 04:31:04 CST --- Please post the results of your regression testing: http://wiki.winehq.org/RegressionTesting
http://bugs.winehq.org/show_bug.cgi?id=29359
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mmdiego@mr.com.ar
--- Comment #3 from Dmitry Timoshkov dmitry@baikal.ru 2011-12-17 04:33:35 CST --- *** Bug 29360 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=29359
--- Comment #4 from Luciano Lorenti lucianolorenti@gmail.com 2011-12-17 14:59:47 CST --- f0a3a09d0e4d67818290c17f23d48529b2784c74 is the first bad commit commit f0a3a09d0e4d67818290c17f23d48529b2784c74 Author: Michael Stefaniuc mstefani@redhat.de Date: Fri Oct 7 13:28:54 2011 +0200
dsound: COM cleanup for the IDirectSoundCapture iface.
:040000 040000 e3a4ef1b076dfb71c8f583f474ea454012e0c3df 67430037bddec876aef72f78b458a1e494e3d2e3 M dlls
http://bugs.winehq.org/show_bug.cgi?id=29359
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mstefani@redhat.de, | |wylda@volny.cz Regression SHA1| |f0a3a09d0e4d67818290c17f23d | |48529b2784c74
http://bugs.winehq.org/show_bug.cgi?id=29359
--- Comment #5 from Luciano Lorenti lucianolorenti@gmail.com 2011-12-17 15:21:55 CST --- But I revert that patch and is not working. I'm going to check the test once. Just in case
http://bugs.winehq.org/show_bug.cgi?id=29359
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1|f0a3a09d0e4d67818290c17f23d | |48529b2784c74 |
--- Comment #6 from Dmitry Timoshkov dmitry@baikal.ru 2011-12-18 01:25:41 CST --- (In reply to comment #5)
But I revert that patch and is not working. I'm going to check the test once. Just in case
Then the regression test has been performed incorrectly, please try again.
http://bugs.winehq.org/show_bug.cgi?id=29359
--- Comment #7 from Luciano Lorenti lucianolorenti@gmail.com 2011-12-18 13:23:23 CST --- b0652dd8bdb144645be4a6bf77cbb68a8ade49d9 is the first bad commit commit b0652dd8bdb144645be4a6bf77cbb68a8ade49d9 Author: Andrew Eikum aeikum@codeweavers.com Date: Mon Oct 10 15:56:55 2011 -0500
winealsa.drv: Don't try to control ALSA's behavior.
Now, winealsa maintains its own buffer, which is written to ALSA on the period cycle requested by the application. We also let ALSA start when it has enough data and stop when it runs out, recovering from the expected underruns. This seems to be more like how ALSA expects to be used.
:040000 040000 874ae9456f596d46ee3911eabcbc6f291afe48cb 62ca893abef4dd0459b201d4c45d0c7b0c87a989 M dlls
http://bugs.winehq.org/show_bug.cgi?id=29359
--- Comment #8 from Luciano Lorenti lucianolorenti@gmail.com 2011-12-18 13:33:35 CST --- b0652dd8bdb144645be4a6bf77cbb68a8ade49d9 is the first bad commit commit b0652dd8bdb144645be4a6bf77cbb68a8ade49d9 Author: Andrew Eikum aeikum@codeweavers.com Date: Mon Oct 10 15:56:55 2011 -0500
winealsa.drv: Don't try to control ALSA's behavior.
Now, winealsa maintains its own buffer, which is written to ALSA on the period cycle requested by the application. We also let ALSA start when it has enough data and stop when it runs out, recovering from the expected underruns. This seems to be more like how ALSA expects to be used.
:040000 040000 874ae9456f596d46ee3911eabcbc6f291afe48cb 62ca893abef4dd0459b201d4c45d0c7b0c87a989 M dlls
http://bugs.winehq.org/show_bug.cgi?id=29359
--- Comment #9 from Luciano Lorenti lucianolorenti@gmail.com 2011-12-18 13:36:21 CST --- I rollbacked the mmdevdrv.c to the wine-1.3.30 version and now is working
http://bugs.winehq.org/show_bug.cgi?id=29359
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |b0652dd8bdb144645be4a6bf77c | |bb68a8ade49d9
http://bugs.winehq.org/show_bug.cgi?id=29359
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |aeikum@codeweavers.com
http://bugs.winehq.org/show_bug.cgi?id=29359
--- Comment #10 from Diego Martin mmdiego@mr.com.ar 2011-12-20 17:26:19 CST --- (In reply to comment #9)
I rollbacked the mmdevdrv.c to the wine-1.3.30 version and now is working
Hi. I've tried reverting the commit you've mentioned above, but compilation is broken after that. How did you do to rollback mmdevdrv.c to version 1.3.30?
http://bugs.winehq.org/show_bug.cgi?id=29359
--- Comment #11 from Andrew Eikum aeikum@codeweavers.com 2011-12-27 08:09:24 CST --- This is caused by bad buffer wrap-around logic. This little diff should fix it. We're working on other changes to dsound, so I'll see what happens with those changes before pushing this one out.
diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c index e61c93d..62c1b9e 100644 --- a/dlls/dsound/mixer.c +++ b/dlls/dsound/mixer.c @@ -573,8 +573,7 @@ static DWORD DSOUND_MixInBuffer(IDirectSoundBufferImpl *dsb, DWORD writepos, DWO
/* increase mix position */ dsb->primary_mixpos += len; - if (dsb->primary_mixpos >= dsb->device->buflen) - dsb->primary_mixpos -= dsb->device->buflen; + dsb->primary_mixpos %= dsb->device->buflen; return len; }
http://bugs.winehq.org/show_bug.cgi?id=29359
--- Comment #12 from Diego Martin mmdiego@mr.com.ar 2012-01-03 15:54:52 CST --- Bug still present in wine version 1.3.36. With the fix mentioned above, the game starts, but the sound is really bad.
http://bugs.winehq.org/show_bug.cgi?id=29359
--- Comment #13 from Diego Martin mmdiego@mr.com.ar 2012-02-11 17:25:41 CST --- (In reply to comment #11)
This is caused by bad buffer wrap-around logic. This little diff should fix it. We're working on other changes to dsound, so I'll see what happens with those changes before pushing this one out.
diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c index e61c93d..62c1b9e 100644 --- a/dlls/dsound/mixer.c +++ b/dlls/dsound/mixer.c @@ -573,8 +573,7 @@ static DWORD DSOUND_MixInBuffer(IDirectSoundBufferImpl *dsb, DWORD writepos, DWO
/* increase mix position */ dsb->primary_mixpos += len;
if (dsb->primary_mixpos >= dsb->device->buflen)
dsb->primary_mixpos -= dsb->device->buflen;
dsb->primary_mixpos %= dsb->device->buflen; return len;
}
It will be great if this bug is repaired before final release of version 1.4 The bug is affecting the whole app which was correctly running some releases ago.
http://bugs.winehq.org/show_bug.cgi?id=29359
GyB gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fael_mc@msn.com
--- Comment #14 from GyB gyebro69@gmail.com 2012-02-12 21:30:07 CST --- *** Bug 29866 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=29359
--- Comment #15 from Andrew Eikum aeikum@codeweavers.com 2012-02-13 15:43:33 CST --- This is a problem of our buffer size calculations in dsound, like described in Bug 14717, comment 260. PES uses 8 channel audio, causing large frame sizes (nBlockAlign = 16). In DSOUND_fraglen, we calculate the fragment length to be 512 * 16 = 8192. We prebuffer 10 fragments (= 81920 bytes) into mmdevapi, but the buffer size is defined to be 65536. So, we don't have enough buffer space to even hold our 10 prebuffered fragments.
Since we're in code freeze, I'm probably not going to submit a patch for this (fixing dsound isn't trivial). You can work around the problem by opening regedit and setting:
[HKCU\Software\Wine\DirectSound] HelBuflen=131072 (Decimal)
http://bugs.winehq.org/show_bug.cgi?id=29359
--- Comment #16 from Fael Mc fael_mc@msn.com 2012-02-13 18:59:43 CST --- sorry for bad english, I am Brazilian, google translator tou also trying to run the PES in the wine, you just need to hit this detail of the sound.
Thanks Andrew Eikum this configuration you started regedit worked for me, the game is sound, but only GFX sounds, and sounds of the crowd, is no narration and no music, and sound is not to be, with great quality, I did several tests, I tried change the value of HelBuflen to 100002 and to 481072 but did not change anything in sound, tried to sound like emulation, and also nothing has changed.
Could you give a hint how to solve this problem, a patch or a setting to have the PES with music and narration.
thank you
http://bugs.winehq.org/show_bug.cgi?id=29359
--- Comment #17 from Andrew Eikum aeikum@codeweavers.com 2012-02-14 10:28:31 CST --- Fael: It looks like the problem is related to dsound's multi channel support. The game uses 8-channel audio, and Wine's dsound doesn't support that yet.
If you are comfortable building Wine yourself, I found that the latest patchset from Bug 14717 (attachment 38385) actually improves the audio quite a bit. Apply that patchset and rebuild Wine and see if it's improved. You will still need to set the registry entry with that patchset.
http://bugs.winehq.org/show_bug.cgi?id=29359
--- Comment #18 from Fael Mc fael_mc@msn.com 2012-02-14 13:37:26 CST --- Thanks again Andrew Eikum
I'll compile the wine with the patch, and post the results here.
http://bugs.winehq.org/show_bug.cgi?id=29359
--- Comment #19 from Fael Mc fael_mc@msn.com 2012-02-14 17:20:43 CST --- Created attachment 38881 --> http://bugs.winehq.org/attachment.cgi?id=38881 Log, problems with the patch
Log, tried to compile wine with patch
http://bugs.winehq.org/show_bug.cgi?id=29359
--- Comment #20 from Fael Mc fael_mc@msn.com 2012-02-14 17:23:51 CST --- The patch appears to be excellent but I could not compile it, the log is above.
how to compile wine with the patch?
thank you
http://bugs.winehq.org/show_bug.cgi?id=29359
--- Comment #21 from Andrew Eikum aeikum@codeweavers.com 2012-02-15 08:29:22 CST --- Fael: Alexander attached a new version to that bug that should fix those problems. Try the new patchset instead.
http://bugs.winehq.org/show_bug.cgi?id=29359
--- Comment #22 from Fael Mc fael_mc@msn.com 2012-02-15 13:47:34 CST --- Thanks Andrew the new patch works, wine compiled without problems the sound is much better, with narration and music for me the game is 100%
thank you very much
http://bugs.winehq.org/show_bug.cgi?id=29359
--- Comment #23 from Diego Martin mmdiego@mr.com.ar 2012-02-15 16:25:57 CST --- Yeah!!!! I love that patch! Finally PES can be playable with all sounds!!!! I hope this patch to be applied as soon as possible to wine. Thanks all very much!
http://bugs.winehq.org/show_bug.cgi?id=29359
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |adys.wh@gmail.com Ever Confirmed|0 |1
--- Comment #24 from Jerome Leclanche adys.wh@gmail.com 2012-02-24 06:12:48 CST --- Confirming
http://bugs.winehq.org/show_bug.cgi?id=29359
--- Comment #25 from Andrew Eikum aeikum@codeweavers.com 2012-05-16 14:29:48 CDT --- All of those patches are now in Wine. Please retest this bug with today's wine-git or the next release (wine-1.5.5) to confirm that it's fixed.
http://bugs.winehq.org/show_bug.cgi?id=29359
Andrew Eikum aeikum@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |8327e6f4234bcc073c6d2979286 | |341ff6103b220 Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #26 from Andrew Eikum aeikum@codeweavers.com 2012-05-29 08:13:10 CDT --- This doesn't occur for me in the demo any more.
http://bugs.winehq.org/show_bug.cgi?id=29359
--- Comment #27 from Luciano Lorenti lucianolorenti@gmail.com 2012-05-29 09:05:27 CDT --- I've just tried the wine-git and it's working great. But I can't graduate the volume in the game
http://bugs.winehq.org/show_bug.cgi?id=29359
--- Comment #28 from Andrew Eikum aeikum@codeweavers.com 2012-05-29 09:09:51 CDT --- Okay. Can you open a new bug report and CC me on the new bug? If possible, please gather a log with the channels from http://wiki.winehq.org/Sound.
http://bugs.winehq.org/show_bug.cgi?id=29359
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #29 from Alexandre Julliard julliard@winehq.org 2012-06-08 15:28:36 CDT --- Closing bugs fixed in 1.5.6.
http://bugs.winehq.org/show_bug.cgi?id=29359
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |midian@netikka.fi
--- Comment #30 from Bruno Jesus 00cpxxx@gmail.com 2012-10-12 08:58:14 CDT --- *** Bug 19776 has been marked as a duplicate of this bug. ***