Quasar Posted March 1, 2008 If you have a multicore processor, the Windows versions of SDL-based DOOM ports may suffer random sound-related crashes. To fix this, you need to check out the instructions on this page: http://articles.techrepublic.com.com/5100-10878_11-6168870.html This will enable you to set the processor affinity for the port in question, allowing it to behave like it is executing on a single-core processor. This appears to eliminate SDL_mixer's unexplained problems with running on a separate core. Addendum: For port authors, it may be prudent to look up information on the SetProcessAffinityMask Windows API function: http://msdn2.microsoft.com/en-us/library/ms686223(VS.85).aspx 0 Quote Share this post Link to post
fraggle Posted March 1, 2008 PrBoom-plus and Chocolate Doom already have a fix for this that entryway developed :-) 0 Quote Share this post Link to post
Quasar Posted March 1, 2008 fraggle said:PrBoom-plus and Chocolate Doom already have a fix for this that entryway developed :-) Care to share the details? ;) 0 Quote Share this post Link to post
fraggle Posted March 1, 2008 Quasar said:Care to share the details? ;) This is the commit to the Chocolate Doom svn. 0 Quote Share this post Link to post
entryway Posted March 1, 2008 http://www.doomworld.com/vb/showthread.php?s=&postid=692425#post692425 http://pastebin.com/m69510e52 0 Quote Share this post Link to post
Quasar Posted May 21, 2008 Not yet, it'll be in the next official release though. 0 Quote Share this post Link to post
entryway Posted May 22, 2008 Quasar said:Not yet, it'll be in the next official release though. You should fix such things more quickly IMHO (immediately?), because it is impossible to use your port on all up to date (most?) systems. 3.33.33.1 would be cool in the same day you got to know it. Look at this and replace "prboom" with "Eternity" http://www.doomworld.com/vb/showthread.php?s=&postid=699166#post699166 0 Quote Share this post Link to post
Quasar Posted May 22, 2008 I should ;) One question I have is still outstanding, however. It is possible for Windows machines to have access denied to particular users to run processes on a given CPU. If this is the case, then the system processor affinity mask may not be "1" or "2" or any other particular value. While it is unlikely that this would affect the vast majority of DOOM source port users, I'd like to know why the approach of just using "1" as the process's affinity mask is valid when MSDN docs demand that you make certain the mask you set is a subset of the system mask. :) I can imagine that the consequences of setting the affinity mask to an invalid value would be an application stall or crash, or at the least, failure to actually do anything at all. 0 Quote Share this post Link to post
entryway Posted May 22, 2008 I do not use 1 as constant, I use process_affinity_mask variable from cfg and you can set it to any value. 1 is by default and it means the first processor. Is it possible when the first processor is not allowed, but some other is allowed? I assumed there is no such possibility. In any case if SetProcessAffinityMask failed you can see it in stdout.txt: M_LoadDefaults: Load system defaults. default file: D:\games\Doom2/glboom-plus.cfg found D:\games\Doom2/prboom-plus.wad I_SetAffinityMask: failed to set process affinity mask (errorcode: 87)With wrong process_affinity_mask GetLastError() will return 87 - "The parameter is incorrect" 0 Quote Share this post Link to post
fraggle Posted December 18, 2009 I'm bumping an old thread here, but hopefully with good reason. There seems to have been a lot of development activity on SDL_mixer in recent months - Mac OS X native MIDI playback has now been fixed, for example. Looking through the logs, I stumbled across this. Is this possibly related to the SDL multicore lockups? Perhaps someone with a multicore system could try disabling the affinity workaround and running the game with a recent version of SDL_mixer to see if it makes any difference? (I ask because I don't currently have access to a multicore system) 0 Quote Share this post Link to post
entryway Posted December 18, 2009 fraggle said:Perhaps someone with a multicore system could try disabling the affinity workaround and running the game with a recent version of SDL_mixer I tried it 2 months ago (with a few timedemos of cybersky max run) and did not get that crash, but I know it is not easy to get it intentionally 0 Quote Share this post Link to post
fraggle Posted December 19, 2009 I think my testing process was something like: start a level, set IDDQD, get some monsters to start attacking me (so that sounds are constantly generated; the more monsters the better) and leave the game running for several hours. 0 Quote Share this post Link to post
entryway Posted December 19, 2009 SDL_mixer related crash did not occur with -nomusic. At least with prboom-plus. 0 Quote Share this post Link to post
Quasar Posted December 19, 2009 Eternity doesn't use any of the functions mentioned in that bug tracker and yet is still subject to the multicore crash bugs. The only parts of SDL_mixer that EE uses are the postmix callback and the music playing. 0 Quote Share this post Link to post
Quasar Posted January 8, 2010 http://bugzilla.libsdl.org/show_bug.cgi?id=629 Recently updated after I caught the crash on my Windows 7 quad core box. Yes, it's still there. Yes, it's still random. Yes, it's definitely to do with MIDI. However what is not explained is how this could possibly affect Linux, because the crash occurred in the winmm subsystem, which makes me look in the general direction of SDL_mixer's MCI callback in the win32 native midi module. 0 Quote Share this post Link to post
DaniJ Posted May 9, 2010 Apologies for the necro bump but I'd like an update from the other port authors as to how they're getting on with this problem. I'm currently looking at doing something about this in Doomsday but I'd really prefer not to limit everything to a single core. 0 Quote Share this post Link to post
Quasar Posted May 9, 2010 DaniJ said:Apologies for the necro bump but I'd like an update from the other port authors as to how they're getting on with this problem. I'm currently looking at doing something about this in Doomsday but I'd really prefer not to limit everything to a single core. No change in the situation as far as I know. It's as crappy as it ever was. 0 Quote Share this post Link to post
DaniJ Posted May 10, 2010 Bummer. Ok, I'll need to do some reorganising of our plugin loading in that case as we shouldn't restrict if the user is using say DirectSound. 0 Quote Share this post Link to post
RestlessRodent Posted May 11, 2010 I just dumped SDL_Mixer completely and implemented Win32 MIDI and Linux OSS MIDI Support, it's limited but it saves time from fixing something you might not have control over. 0 Quote Share this post Link to post
Graf Zahl Posted May 11, 2010 GhostlyDeath said:Win32 MIDI This doesn't work well on most modern systems. If you want to remove something that's broken do not replace it with something else that's also broken. 0 Quote Share this post Link to post
RestlessRodent Posted May 11, 2010 Graf Zahl said:This doesn't work well on most modern systems. If you want to remove something that's broken do not replace it with something else that's also broken. The midiOut* functions worked perfectly fine for me, at least on Vista. 0 Quote Share this post Link to post
Graf Zahl Posted May 11, 2010 What sound card do you have? On my onboard chip the volume is so low that it's totally unusable and Microsoft in their infinite wisdom have removed the volume control so there's nothing I can do. Any program that uses system MIDI for music is worthless for me. 0 Quote Share this post Link to post
RestlessRodent Posted May 12, 2010 Graf Zahl said:What sound card do you have? On my onboard chip the volume is so low that it's totally unusable and Microsoft in their infinite wisdom have removed the volume control so there's nothing I can do. Any program that uses system MIDI for music is worthless for me. Was some onboard AC97 Nvidia. afaik. 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.