[Bug 20056] New: The Westerner: crash follows bogus DSOUND:SetFormat call
http://bugs.winehq.org/show_bug.cgi?id=20056 Summary: The Westerner: crash follows bogus DSOUND:SetFormat call Product: Wine Version: 1.1.29 Platform: PC OS/Version: Mac OS X 10.5 Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-dsound AssignedTo: wine-bugs(a)winehq.org ReportedBy: hoehle(a)users.sourceforge.net When DSOUND_PrimarySetFormat is given a broken format, it will nevertheless HeapReAlloc() and thus forget the old format. The Westerner happens to call DSOUND_PrimarySetFormat with a completely bogus format. Why? I don't know. DSOUND_PrimarySetFormat (formattag=0x0001,chans=0, samplerate=0,bytespersec=0, blockalign=0,bitspersamp=0,cbSize=0)
From there, two execution traces are possible, each leading to a crash.
A) ReopenDevice fails as WAVE_Open refuses the bogus new format. The device is left in floating state, neither open nor closed, and with a bogus format description in device->pwfx. A subsequent DSOUND_PerformMix() will choke on the broken format. DSOUND_ReopenDevice waveOutOpen failed DSOUND_PrimarySetFormat DSOUND_ReopenDevice failed: 80070057 DSOUND_PerformMix (0x213620) DSOUND_PrimaryGetPosition pwplay=0, pwqueue=0 DSOUND_PrimaryGetPosition playpos = 0, writepos = 0 ( time=8688) DSOUND_PerformMix primary playpos=0, writepos=0, clrpos=0, mixpos=0, buflen=65536 wine: Unhandled division by zero -- likely BytesPerSec=0 B) One winmm:WAVE_Open initiated by DSOUND_PrimaryOpen succeeds. trace:winmm:WAVE_Open wFormatTag=1, nChannels=3, nSamplesPerSec=96000, nAvgBytesPerSec=576000, nBlockAlign=6, wBitsPerSample=16 The original format structure is still bogus (wBitsPerSample=0) and PrimaryOpen crashes in a division by zero in this case as well. This is the case I have to investigate further, as I thought my recent patches to wodOpen in wineoss.drv and winecoreaudio.drv for bug #12349 and bug #19901 would have taken care of it. Apparently there are several WAVE_FORMAT structures floating around that one does not know which one to correct. I also need to find out why the app keeps crashing now while I had it working in the past (IIRC I did not use the demo). -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=20056 --- Comment #1 from Jörg Höhle <hoehle(a)users.sourceforge.net> 2009-09-15 07:00:08 --- Created an attachment (id=23609) --> (http://bugs.winehq.org/attachment.cgi?id=23609) WAVE_Open called >10 times with varying parameters I would appreciate any hint as to how DSOUND_PrimaryOpen leads to a loop where some code -- where does it come from? -- tries and opens each audio driver in turn with varying format parameters 8/16 bits, 0 or 3 channels, 11025/22050/41000/48000/96000Hz somehow derived from the original parameters to SetFormat. The attached file shows the parameters that winmm:WAVE_Open logged. In between, error lines from gsm show that this driver (that I did not compile in) was accessed plenty of times as well (only 1 shown). Note that The Westerner needs a native amstream (and hence quartz, but not devenum), as well as l3codecx.ax (from DirectX9) to work. Could this loop come from there? Or is it the "mapper" in action? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=20056 Jörg Höhle <hoehle(a)users.sourceforge.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |DUPLICATE --- Comment #2 from Jörg Höhle <hoehle(a)users.sourceforge.net> 2009-09-15 11:13:56 --- This bug pinpoints the non-robust implementation of SetFormat as the cause of the earlier bug #19124. Nevertheless, I'm marking this more recent one as the duplicate. *** This bug has been marked as a duplicate of bug 19124 *** -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=20056 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #3 from Austin English <austinenglish(a)gmail.com> 2009-09-15 15:57:50 --- Closing. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=20056 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- OS/Version|Mac OS X 10.5 |Mac OS X -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=20056 Anastasius Focht <focht(a)gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- URL| |https://web.archive.org/web | |/20210226091558/http://dl.4 | |players.de/f1/pc/westerner/ | |demo_westerner_de.zip Keywords| |download CC| |focht(a)gmx.net -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (2)
-
wine-bugs@winehq.org -
WineHQ Bugzilla