http://bugs.winehq.org/show_bug.cgi?id=9612
Summary: Silent Hunter III: Crashes on loading a savegame at sea Product: Wine Version: CVS/GIT Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-directx-dsound AssignedTo: wine-bugs@winehq.org ReportedBy: knan-wine@anduin.net
On loading a career-mode savegame at sea that has worked in earlier wine versions, I get a Unhandled exception: page fault on write access to 0x00000000 in 32-bit code (0x601d3e77).
The traceback refers to memset IDirectSoundBufferImpl_Duplicate DirectSoundDevice_DuplicateSoundBuffer IDirectSound8_IDirectSound8_DuplicateSoundBuffer
Will attach a +dsound trace. Changing from alsa to oss and playing around with sound settings in winecfg doesn't cure the crash.
http://bugs.winehq.org/show_bug.cgi?id=9612
knan-wine@anduin.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression
http://bugs.winehq.org/show_bug.cgi?id=9612
--- Comment #1 from knan-wine@anduin.net 2007-09-08 10:38:26 --- Created an attachment (id=8002) --> (http://bugs.winehq.org/attachment.cgi?id=8002) +dsound trace, rzipped
http://bugs.winehq.org/show_bug.cgi?id=9612
--- Comment #2 from Austin English austinenglish@gmail.com 2007-09-08 21:04:54 --- Please run a regression test:
http://wiki.winehq.org/RegressionTesting
http://bugs.winehq.org/show_bug.cgi?id=9612
--- Comment #3 from Lei Zhang thestig@google.com 2007-09-10 12:22:05 --- what was the last version that worked?
http://bugs.winehq.org/show_bug.cgi?id=9612
--- Comment #4 from knan-wine@anduin.net 2007-09-10 14:02:23 --- At commit 2908dab7840d045efb0e959cdc393f3a808fa6d2 (lmuse.h: Add structures needed by NetUseAdd().), between 0.9.42 and 0.9.43, it definitely works, have just retested.
At commit 282696b4f62b7d36d243692065f1db0a901ed829 (wined3d: Supply texture coords even if no texture is bound and pshaders are used.), after 0.9.44, it's broken.
So breakage is somewhere in between. I'll do a regression test.
http://bugs.winehq.org/show_bug.cgi?id=9612
--- Comment #5 from knan-wine@anduin.net 2007-09-10 15:24:59 --- Regression test points to:
commit 3aeedea0b646a0b6a783a67069bedf00ce0131c8 Author: Maarten Lankhorst m.b.lankhorst@gmail.com Date: Sun Jul 29 23:47:01 2007 +0200
dsound: Move resampling away from mixer thread.
http://bugs.winehq.org/show_bug.cgi?id=9612
knan-wine@anduin.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |M.B.Lankhorst@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=9612
--- Comment #6 from Maarten Lankhorst M.B.Lankhorst@gmail.com 2007-09-10 15:54:46 --- I can't open rzip files, and please do a +dsound,+tid since otherwise a trace is hard to read.
http://bugs.winehq.org/show_bug.cgi?id=9612
knan-wine@anduin.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #8002 is|0 |1 obsolete| |
--- Comment #7 from knan-wine@anduin.net 2007-09-10 16:37:54 --- Created an attachment (id=8017) --> (http://bugs.winehq.org/attachment.cgi?id=8017) +dsound,+tid trace, bzip2, part 1/3
http://bugs.winehq.org/show_bug.cgi?id=9612
--- Comment #8 from knan-wine@anduin.net 2007-09-10 16:39:22 --- Created an attachment (id=8018) --> (http://bugs.winehq.org/attachment.cgi?id=8018) +dsound,+tid trace, bzip2, part 2/3
http://bugs.winehq.org/show_bug.cgi?id=9612
--- Comment #9 from knan-wine@anduin.net 2007-09-10 16:40:23 --- Created an attachment (id=8019) --> (http://bugs.winehq.org/attachment.cgi?id=8019) +dsound,+tid trace, bzip2, part 3/3
http://bugs.winehq.org/show_bug.cgi?id=9612
--- Comment #10 from Maarten Lankhorst M.B.Lankhorst@gmail.com 2007-09-20 16:43:42 --- I roughly see where it crashes, but am not 100%
Near line 1330 in wine/dlls/dsound/buffer.c there is something like:
dsb->tmp_buffer = NULL; DSOUND_RecalcFormat(dsb); DSOUND_MixToTemporary(dsb, 0, dsb->buflen);
can you change it to:
FIXME("Before RecalcForamt\n"); dsb->tmp_buffer = NULL; FIXME("Before RecalcForamt\n"); DSOUND_RecalcFormat(dsb); FIXME("Between stuff\n"); DSOUND_MixToTemporary(dsb, 0, dsb->buflen); FIXME("After MixToTemp\n");
and then run without debug options and see wether it says 'Before' 'Between' or 'After' fixme last?
http://bugs.winehq.org/show_bug.cgi?id=9612
--- Comment #11 from knan-wine@anduin.net 2007-09-21 12:31:09 --- Last line is:
fixme:dsound:IDirectSoundBufferImpl_Duplicate Before RecalcFormat #2
... so the dsb->tmp_buffer = NULL; assignment goes fine, then it continues and crashes in RecalcFormat.
http://bugs.winehq.org/show_bug.cgi?id=9612
--- Comment #12 from knan-wine@anduin.net 2008-01-12 12:27:50 --- Retested. Still there in 0.9.53. Crashes in the exact same spot.
http://bugs.winehq.org/show_bug.cgi?id=9612
--- Comment #13 from Maarten Lankhorst maarten@codeweavers.com 2008-01-14 04:32:25 --- Can you try adding the same FIXME's to DSOUND_RecalcFormat in mixer.c ? I need to know on which line it crashes.
http://bugs.winehq.org/show_bug.cgi?id=9612
--- Comment #14 from knan-wine@anduin.net 2008-01-14 13:19:56 --- Last line:
fixme:dsound:DSOUND_RecalcFormat Before FillMemory, dsb->tmp_buffer=(nil), dsb->tmp_buffer_len=642344, dsb->device->pwfx->wBitsPerSample=16
Hmm. Running out of memory, then, perhaps? Why now, and not before the fingered commit?
Memory: 2GB, +6GB swap, running on plain 32-bit x86.
http://bugs.winehq.org/show_bug.cgi?id=9612
--- Comment #15 from knan-wine@anduin.net 2008-01-14 13:29:37 --- Created an attachment (id=10249) --> (http://bugs.winehq.org/attachment.cgi?id=10249) more complete trace of last recalcformat call
http://bugs.winehq.org/show_bug.cgi?id=9612
--- Comment #16 from Maarten Lankhorst maarten@codeweavers.com 2008-01-14 13:38:42 --- I'm guessing it runs out of memory because of wine's virtual memory issues, try running 'top' and check the values for 'virt' while running application.
http://bugs.winehq.org/show_bug.cgi?id=9612
--- Comment #17 from knan-wine@anduin.net 2008-01-14 14:56:13 --- That's the end result, but not the bug, I believe.
At launch, it hovers at 2639m VIRT, 524m resident.
While loading, just before the crash, I caught 3068m VIRT, 1.7G resident
For comparison, with 0.9.42, where the loading succeeds:
At launch, it hovers at 2643m VIRT, 430m resident.
At the end of loading, and during the game, it tops out at 2784m VIRT, 1G resident.
... memory waste introduced somewhere. A missing/misplaced HeapFree in the rewritten sound code? The game does allocate a huge amount of buffers in the half-to-two-megabyte range.
http://bugs.winehq.org/show_bug.cgi?id=9612
Cadarin Durango cadarin@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #18 from Cadarin Durango cadarin@gmx.net 2008-02-20 10:03:14 --- *** This bug has been confirmed by popular vote. ***
http://bugs.winehq.org/show_bug.cgi?id=9612
--- Comment #19 from Austin English austinenglish@gmail.com 2008-06-05 10:53:32 --- Is this still an issue in 1.0-rc3 or newer wine?
http://bugs.winehq.org/show_bug.cgi?id=9612
--- Comment #20 from knan-wine@anduin.net 2008-06-05 13:00:12 --- The crash has moved a bit, but there's still a running-out-of-address-space OOM crash, yes.
Inside RtlSizeHeap today. Something ends up passing a null pointer as the third argument to RtlSizeHeap, and RtlSizeHeap crashes. That's probably another minor bug in itself, RtlSizeHeap is documented in the comments as returning -1 in that case.
Tested with today's git, post-rc3.
http://bugs.winehq.org/show_bug.cgi?id=9612
--- Comment #21 from Maarten Lankhorst m.b.lankhorst@gmail.com 2008-06-05 15:03:54 --- Can you change a setting in the registry?
Make sure that this key exists: HKEY_CURRENT_USER\Software\Wine\DirectSound In that key, create a string MaxShadowSize with value 0
Does it fix the problem?
http://bugs.winehq.org/show_bug.cgi?id=9612
--- Comment #22 from knan-wine@anduin.net 2008-06-07 06:54:44 --- MaxShadowSize 0 fixes the OOM problem for me, thanks! We're back down to 1.0G resident and 2722m virtsize. So that config key was added in 0.9.58, if I'm reading the code right?
(Now I have another crash regression to track down instead, in d3d somewhere - will file another bug for that.)
http://bugs.winehq.org/show_bug.cgi?id=9612
--- Comment #23 from Maarten Lankhorst m.b.lankhorst@gmail.com 2008-06-07 15:58:18 --- I will have to look more at it, wine still allows arbitrary buffer sizes, so it can add up quickly. Probably some extra logic will be needed.
http://bugs.winehq.org/show_bug.cgi?id=9612
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |atari@gabo.pl
--- Comment #24 from Vitaliy Margolen vitaliy@kievinfo.com 2008-06-12 23:38:54 --- *** Bug 10731 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=9612
knan-wine@anduin.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Silent Hunter III: Crashes |Silent Hunter III: Crashes |on loading a savegame at sea|on loading a savegame at sea | |(dsound causing out of | |memory condition)
http://bugs.winehq.org/show_bug.cgi?id=9612
--- Comment #25 from Austin English austinenglish@gmail.com 2008-12-29 10:51:46 --- Is this still an issue in current (1.1.11 or newer) wine?
http://bugs.winehq.org/show_bug.cgi?id=9612
knan-wine@anduin.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|CVS/GIT |0.9.43.
--- Comment #26 from knan-wine@anduin.net 2008-12-31 14:21:26 --- Will recheck in a few days. Fixed reported version to 0.9.43 instead of GIT.
http://bugs.winehq.org/show_bug.cgi?id=9612
--- Comment #27 from knan-wine@anduin.net 2009-01-03 10:31:41 --- Retested with 1.1.12. The DirectSound\MaxShadowSize=0 workaround is still needed.
http://bugs.winehq.org/show_bug.cgi?id=9612
--- Comment #28 from Austin English austinenglish@gmail.com 2009-07-08 15:01:01 --- Is this still an issue in current (1.1.25 or newer) wine?
http://bugs.winehq.org/show_bug.cgi?id=9612
--- Comment #29 from knan-wine@anduin.net 2009-07-08 17:45:37 --- Yes. Retested in post-1.1.25 git.
http://bugs.winehq.org/show_bug.cgi?id=9612
--- Comment #30 from Maarten Lankhorst m.b.lankhorst@gmail.com 2010-04-24 19:18:41 --- can you run with valgrind --trace-children=yes --leak-check=full --track-origins=yes ? Maybe it's just an exposed memory leak..
http://bugs.winehq.org/show_bug.cgi?id=9612
Scott Ritchie scott@open-vote.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |scott@open-vote.org
--- Comment #31 from Scott Ritchie scott@open-vote.org 2010-08-31 15:32:57 CDT --- There is a similar issue with the Victoria 2 demo: http://bugs.winehq.org/show_bug.cgi?id=24217
I'll try running that with Valgrind and report results
http://bugs.winehq.org/show_bug.cgi?id=9612
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |adys.wh@gmail.com
--- Comment #32 from Jerome Leclanche adys.wh@gmail.com 2011-02-19 13:45:54 CST --- Status in wine-1.3.14? Also worth trying the resampler from bug 14717.
http://bugs.winehq.org/show_bug.cgi?id=9612
GyB gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gyebro69@gmail.com
--- Comment #33 from GyB gyebro69@gmail.com 2011-02-20 03:29:22 CST --- (In reply to comment #32)
Status in wine-1.3.14? Also worth trying the resampler from bug 14717.
Europa Universalis:Rome still requires the 'MaxShadowSize=0' registry workaround with Wine-1.3.14, otherwise the game crashes while loading sounds.
After applying the resampler patchset on Wine-1.3.14 the game no longer needs the workaround: it starts up correctly without setting the MaxShadowSize to 0.
http://bugs.winehq.org/show_bug.cgi?id=9612
Jörg Höhle hoehle@users.sourceforge.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |16513
http://bugs.winehq.org/show_bug.cgi?id=9612
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |3aeedea0b646a0b6a783a67069b | |edf00ce0131c8
http://bugs.winehq.org/show_bug.cgi?id=9612
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1|3aeedea0b646a0b6a783a67069b |36e90546298e8c096926330dd75 |edf00ce0131c8 |f4e373a415171
--- Comment #34 from Alexandre Julliard julliard@winehq.org 2011-08-26 07:41:41 CDT --- Fixed sha1.
http://bugs.winehq.org/show_bug.cgi?id=9612
Andrew Eikum aeikum@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |aeikum@codeweavers.com
--- Comment #35 from Andrew Eikum aeikum@codeweavers.com 2011-11-01 10:28:19 CDT --- For folks who were having trouble with this bug, I would appreciate some testing of the new patchset posted in Bug 14717, comment 187. The MaxShadowSize registry entry is removed by that patch, so you don't need to worry about its value when testing.
http://bugs.winehq.org/show_bug.cgi?id=9612
Alexander E. Patrakov patrakov@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |patrakov@gmail.com
--- Comment #36 from Alexander E. Patrakov patrakov@gmail.com 2011-12-11 12:12:45 CST --- I must add that I will also appreciate testing whether the very first patch in the series in Bug 14717 comment 243 ("always resample in mixer") is enough.
http://bugs.winehq.org/show_bug.cgi?id=9612
--- Comment #37 from Alexander E. Patrakov patrakov@gmail.com 2011-12-30 00:08:15 CST --- That patch got merged as commit 663bc476029a3f867c698677f888d778246f4718: now wine always behaves as if MaxShadowSize = -1. Could you please retest whether the bug still exists in the latest git, or, when it comes out, wine-1.3.36?
http://bugs.winehq.org/show_bug.cgi?id=9612
Julian Rüger jr98@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jr98@gmx.net
--- Comment #38 from Julian Rüger jr98@gmx.net 2012-05-12 02:43:47 CDT --- Now that the resampler patchset is commited, and it was reported earlier that it solved the issue, this bug should be fixed.
Sadly, I don't have that game, could someone that does please retest, just to make sure?
http://bugs.winehq.org/show_bug.cgi?id=9612
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #39 from joaopa jeremielapuree@yahoo.fr 2012-12-04 13:19:45 CST --- patch comitted. No answer from the reporter since 1 year. This bug can be closed as FIXED
http://bugs.winehq.org/show_bug.cgi?id=9612
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |663bc476029a3f867c698677f88 | |8d778246f4718 Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #40 from Jerome Leclanche adys.wh@gmail.com 2012-12-04 18:46:08 CST --- Assuming fixed
http://bugs.winehq.org/show_bug.cgi?id=9612
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #41 from Alexandre Julliard julliard@winehq.org 2012-12-07 13:36:24 CST --- Closing bugs fixed in 1.5.19.