Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

AI War: Fleet Command

x4000

Novice
Joined
Jun 1, 2009
Messages
34
Okay, we're getting better -- at least it is not complaining about SlimDX missing, anymore. However, the error that you are posting is basically an issue with the music playback. For some reason, your machine is either unable to decode ogg files properly, or is having some sort of glitch in the DirectSound system. Given the error, this seems to be some sort of internal DirectSound error, but I can't be sure.

You might try disabling the music in the settings window, and then you should be able to play at least without getting the below error. If you get similar errors when it tries to play sound effects, then we'll know it has nothing to do with the ogg decoding (at that point it might either be the ogg decoding, or the size of the DirectSound buffer causing a problem on your machine).

Looking at your system specs, you've got a really nice machine and should be able to run this game just fine. Others with similar hardware, and many others on the same 64bit OS version, have not had a problem; maybe something is messed up with your DirectSound install from DirectX9.0c, but I don't see anything like that in there. Or it's possible that a recent MS patch on your OS might have messed something up, it's hard to say. I presume that with 4GB of RAM, you are not running too close to the edge of available RAM while running the game (it only needs around 300-500MB of RAM, depending on your settings).

My advice would be to play without music for now (you can certainly play your own music in your player of choice), and let's see what happens. If that still fails, please try also disabling the sound in the game and then see what happens. The results of those attempts will help narrow things down for me, and if one works then you can at least try out the demo.

Thanks!

EDIT: Just to warn you, it's quite late in my timezone and I am signing off for the night. I'll get back to you first thing in the morning if the suggested solutions don't work. Thanks for your patience with this..
 

TheWesDude

Arcane
Patron
Joined
Oct 27, 2008
Messages
3,720
Location
Norfolk VA
ok, turning off music but leaving sound on works



EDIT:

it may very well be a direct x issue as MS has been updating "9.0c" for years without actually changing the version number which causes lots of problems when trying to "update" directx as it wont replace updated files properly and usually you have to manually unpack the individual file causing problems and install it yourself. only problem is i am not getting a specific file error, just a directsound error so i dont know what file is causing the problem in directx
 

x4000

Novice
Joined
Jun 1, 2009
Messages
34
TheWesDude said:
ok, turning off music but leaving sound on works



EDIT:

it may very well be a direct x issue as MS has been updating "9.0c" for years without actually changing the version number which causes lots of problems when trying to "update" directx as it wont replace updated files properly and usually you have to manually unpack the individual file causing problems and install it yourself. only problem is i am not getting a specific file error, just a directsound error so i dont know what file is causing the problem in directx

Okay, well I'm glad that it works without music, at least. From the error I am seeing, it really does seem like some sort of internal memory allocation error in DirectSound. Very strange. The version of SlimDX that I'm using corresponds to the March 2009 update to DirectX 9.0c (as you say, they update that at least 3x per year or so). You might try updating your DirectSound and core DirectX dlls to match that version. I'll do more research on that specific error and see if I can turn up any incompatibilities that might point you in the right direction with that.
 

TheWesDude

Arcane
Patron
Joined
Oct 27, 2008
Messages
3,720
Location
Norfolk VA
ok, i just tried doing the redistributable for 9.0c, didnt do anything

tried the online update, downloaded a few files, still crashing on an error.

one thing i did notice:

Code:
6/9/2009 11:00:02 AM
-----------------------------------Application_ThreadException-----------------------------------SlimDX.DirectSound.DirectSoundException: E_OUTOFMEMORY: Ran out of memory (-2147024882)
   at SlimDX.Result.Throw[T](Object dataKey, Object dataValue)
   at SlimDX.Result.Record[T](Int32 hr, Boolean failed, Object dataKey, Object dataValue)
   at SlimDX.DirectSound.SoundBuffer.Play(Int32 priority, PlayFlags flags)
   at AIWar.GameMusic.PlayInternal() in C:\vcprojs\AIWar\DX\GameMusic.cs:line 155
   at AIWar.GameMusic.UnPause() in C:\vcprojs\AIWar\DX\GameMusic.cs:line 179
   at AIWar.GameForm.RunNextCycle(Boolean DoRendering, Boolean DoScrollingAndInput) in C:\vcprojs\AIWar\GameFormParts\GameLoop.cs:line 425
   at AIWar.GameForm.gameLoop() in C:\vcprojs\AIWar\GameFormParts\GameLoop.cs:line 219
   at AIWar.GameForm.GameForm_Load(Object sender, EventArgs e) in C:\vcprojs\AIWar\GameFormParts\Startup.cs:line 259
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

i installed the game on d:\ai war\

and it is giving an error about:
C:\vcprojs\AIWar\GameFormParts\Startup.cs

i do not have a vcprojs directory on C drive.

Code:
C:\>dir *.* /a DHSRA
 Volume in drive C has no label.
 Volume Serial Number is BCBB-69B1

 Directory of C:\

09/18/2008  11:12 AM                 0 AUTOEXEC.BAT
09/18/2008  06:23 AM               225 boot.ini
09/18/2008  11:12 AM                 0 CONFIG.SYS
05/30/2009  06:16 PM               221 debug.txt
11/03/2008  08:30 PM    <DIR>          Documents and Settings
09/18/2008  07:09 AM    <DIR>          fcad7fdbb0edc3a0bea4d6ae6b
09/18/2008  11:12 AM                 0 IO.SYS
10/02/2008  08:35 PM    <DIR>          Logs
09/18/2008  11:12 AM                 0 MSDOS.SYS
03/25/2005  08:00 AM            47,772 NTDETECT.COM
09/18/2008  11:27 AM           297,072 ntldr
06/08/2009  10:06 PM    <DIR>          NVIDIA
06/08/2009  10:41 PM     4,290,772,992 pagefile.sys
06/02/2009  03:53 PM    <DIR>          Program Files
06/08/2009  10:38 PM    <DIR>          Program Files (x86)
09/18/2008  09:07 PM    <DIR>          ProgramData
09/20/2008  04:41 PM    <DIR>          RECYCLER
09/17/2008  11:44 PM               563 RHDSetup.log
09/18/2008  11:18 AM    <DIR>          System Volume Information
05/30/2009  04:25 PM    <DIR>          temp
06/08/2009  10:48 PM    <DIR>          WINDOWS
04/07/2009  08:25 AM                 3 _Defrag.log

 Directory of C:\

              11 File(s)  4,291,118,848 bytes
              11 Dir(s)  11,772,571,648 bytes free

C:\>
 

x4000

Novice
Joined
Jun 1, 2009
Messages
34
Thanks for posting the update -- don't worry about the filename there, that's from the symbol files for debugging, it is referring to the file location on the original machine of compilation, not your machine. That's a great catch, but it's not a problem. I'll keep looking and see what I can dig up on that error. So far not much that is very specific to this case...

EDIT: This is a very strange issue, it looks to be at the DirectX level rather than the SlimDX level at this point. I don't know why, but for some reason it is trying and failing to allocate some memory. The line of code that it is doing this on is very strange (buffer.Play), because as far as my code is concerned all of the buffers, etc, have already been initialized and now it is just time to run the playback. DirectX or SlimDX must be doing some sort of new allocation at playtime, but I don't have a way to delve into that level.

I can bring this up with the SlimDX folks, but before I do I just want to check and see what version of the .NET framework you have. Do you have .NET 3.5 SP1 installed, or just vanilla .NET 3.5?
 

TheWesDude

Arcane
Patron
Joined
Oct 27, 2008
Messages
3,720
Location
Norfolk VA
here is everything installed on my computer. its actually a CSV format so to make it easier to read you can save it as XXXX.csv and open it in excel.

Code:
removed
 

x4000

Novice
Joined
Jun 1, 2009
Messages
34
Thanks for that -- everything looks a-ok. It should be working, but clearly it is not. I'll ask over with the SlimDX folks and see what they have to say about it, if they have any ideas.

EDIT: I've posted over at the Gamedev.net DX forums, which the SlimDX folks use as their primary haunt. You can check it out here, if you want: http://www.gamedev.net/community/forums/topic.asp?topic_id=537547. I'll let you know as soon as I hear something.
 

x4000

Novice
Joined
Jun 1, 2009
Messages
34
Yep, so far -- it can take a bit of time, but anything with SlimDX in the title tends to get the attention of their devs as soon as they have time.
 

x4000

Novice
Joined
Jun 1, 2009
Messages
34
Well, that guy is one of the devs on SlimDX. He and I talked a little bit further by email as well, but basically it sounds like this is a bad driver or some sort of internal DirectSound issue. Basically, the error that you are getting should not be possible to get from the method that is throwing it, which is really peculiar. I had thought that he was going to get back to me with it, but evidently he's not around over the weekend or something. The whole thing is quite curious in that regard.

One thing you might try, is downloading the latest prerelease version of AI War: http://arcengames.com/forums/index.php/topic,102.0.html

If you install that and then try the music I am sure it will still fail, but I'd like to see the error message from that just to make sure that everything was kosher with the error message that you were getting before (which seemed a bit inexplicable to me and the SlimDX dev). Beyond that, I have one thing that I might be able to try (a toggle for software instead of hardware mixing, to bypass any driver issues), and otherwise it's down to contacting Microsoft to see what the deal is. I'll work on the software mixing toggle today, and will post when I have a prerelease that includes that.

Thanks for your patience with this! This is really an odd one.
 

TheWesDude

Arcane
Patron
Joined
Oct 27, 2008
Messages
3,720
Location
Norfolk VA
ok, copied I over and replaced

then copied J over and replaced

Code:
6/15/2009 10:14:18 PM
-----------------------------------Application_ThreadException-----------------------------------SlimDX.DirectSound.DirectSoundException: E_OUTOFMEMORY: Ran out of memory (-2147024882)
   at SlimDX.Result.Throw[T](Object dataKey, Object dataValue)
   at SlimDX.Result.Record[T](Int32 hr, Boolean failed, Object dataKey, Object dataValue)
   at SlimDX.DirectSound.SoundBuffer.Play(Int32 priority, PlayFlags flags)
   at AIWar.GameMusic.PlayInternal() in C:\vcprojs\AIWar\DX\GameMusic.cs:line 160
   at AIWar.GameMusic.UnPause() in C:\vcprojs\AIWar\DX\GameMusic.cs:line 184
   at AIWar.GameForm.RunNextCycle(Boolean DoRendering, Boolean DoScrollingAndInput) in C:\vcprojs\AIWar\GameFormParts\GameLoop.cs:line 434
   at AIWar.GameForm.gameLoop() in C:\vcprojs\AIWar\GameFormParts\GameLoop.cs:line 219
   at AIWar.GameForm.GameForm_Load(Object sender, EventArgs e) in C:\vcprojs\AIWar\GameFormParts\Startup.cs:line 271
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

i enabled music in settings, and then set the option for the force software mixxing
 

x4000

Novice
Joined
Jun 1, 2009
Messages
34
Hi there,

That's pretty baffling, the line numbers are the same and everything, so it's not a driver problem, and the problem is apparently not in SlimDX, and it's definitely below the level of my game (though it's always possible that something I'm doing is triggering this, naturally), so this looks like it is going to need to be escalated to Microsoft. I'll email the SlimDX dev once more and talk to him to see if he has any final ideas (the MS guys are slow, and sometimes it costs money), so we'll see what happens. So strange that no one else has had this issue, either...

Thanks for your patience on this, it normally does not take nearly this long to fix bugs. If the problem is in my code, I try to have a fix same-day, but this one involves so many other parties that it's really causing some headaches...
 

TheWesDude

Arcane
Patron
Joined
Oct 27, 2008
Messages
3,720
Location
Norfolk VA
well as i said earlier, the problem most likely is a directsound issue, but MS does not change the version of directx9c when they put out updates, so when you try to install the redistributable, it fails because u have the most current version, and if you try to do the online version, it may update some files, but it wont do a full individual file version check.

i had a problem similar to this with a game i bought not too long ago. tried to install redistributable, wouldnt. tried to do online-update, updated a few files and that was it. but the problem was it was not installing xxxx40.dll so i had to dload the redistributable, and then manually extract that file and put it where it was supposed to go to work right.

im guessing we are having a similar issue. if we knew what directx file slimdx was trying to use, i could replace the file individually from a recent dload of the directx redistributeable and see if that fixxes the issue.

of course it could also be a hardware issue but thats pretty unlikely as the onboard sound im using is on a lot of computers.
 

x4000

Novice
Joined
Jun 1, 2009
Messages
34
You might try updating dsound.dll of something like that from a recent release. But I don't know what other dependencies that has underneath it. From the SlimDX dev:

"I asked an MVP friend to post to the MVP newsgroup, which is usually the fastest way to get directly to the DX team. Still waiting on a response there. Other than that, I’m at a loss except that it might be some bizarre corner case with your music streaming logic…but I’m not sure what that could be."

So we'll see what they say, hopefully they can shed more light on what this might be. From your latest post I now understand a bit better what you mean about the versioning (I had a slightly different interpretation before), so I'll pass that along tot he SlimDX dev and see if that helps any. Thanks!
 

TheWesDude

Arcane
Patron
Joined
Oct 27, 2008
Messages
3,720
Location
Norfolk VA
in the redistributable i dloaded a few days ago the dsound.dll info:

created 7/9/2004, 497 kb, version 4.9.0.904

in my directx info it says mine is:
2/17/2007, 651 kb, 5.03.3790.3959

not sure that replacing that file with the one in the redistributable is a good option

what directx sound file is throwing that error to slimdx and whats the info on your .dll?
 

x4000

Novice
Joined
Jun 1, 2009
Messages
34
I would imagine that dsound.dll is what is throwing the exception to SlimDX, but given that I'm not the author of SlimDX or associated with them at all, I can't say for certain.

However, the version of dsound.dll that I have is from 8/4/2004, version 5.3.2600.2180, 359 KB. Hope that helps...
 

TheWesDude

Arcane
Patron
Joined
Oct 27, 2008
Messages
3,720
Location
Norfolk VA
well, whenever i try to extract and use a dsound.dll file after renaming my old one and putting it in windows\system32 directx is replacing that file with my copy

so i would have to find a way to stop directx from replacing older files i put in there to test if older files work.
 

x4000

Novice
Joined
Jun 1, 2009
Messages
34
That's really strange. I'm not an expert on debugging directx installations, so I can't help too much there, unfortunately...
 

x4000

Novice
Joined
Jun 1, 2009
Messages
34
Okay -- latest update from the SlimDX dev:

"I decided to open up my search a bit and found this page:
http://www.codeproject.com/KB/audio-vid ... play=Print

Under "Errors":
I mentioned above that you can get an OutOfMemoryException if you try
to load too large a sound file into a static SecondaryBuffer, or if it
just fits and then, naturally, you try to play it. (It's not too clear
just why playing the buffer takes significantly more memory than
loading it, but I've seen that cause the exception.

I am thinking that, for whatever reason, your non-streamed music
buffers are just too big for DSound to handle on this particular
machine. That same page has an overview of how to implement streamed
music, which is what you might have to do here."

I think he's probably right with this, since you are having no trouble playing regular sound files through the game, and yet the music gives this specific error. I am basically decompressing and preloading the entire music file into DirectSound before it plays at present, and on your machine alone it is apparently causing some issues. I've wanted to move to a streaming solution all along, since that will also create faster load times for savegames, etc, but I had some technical hurdles in the past. I'm going to work on that again, and this time I think I have the resources I need to get that working properly. When I have a prerelease version with streaming music instead of preloaded music, I'll let you know -- presumably that wil fix your issue, since the sound is after all working for you.

Thanks again for your patience; I don't know what the real root cause is here (something with your DirectSound, I still suspect), but at least AI War will hopefully soon no longer trigger that issue with its music playback.
 

x4000

Novice
Joined
Jun 1, 2009
Messages
34
Okay... whew. It's been a long day. Recoding the entire music system for a better streaming approach was no simple thing, but there are a lot of benefits for it aside from the fact that it will hopefully fix your issue. Here's the prerelease that contains the file (please make sure you have updated to the official release of 1.006 before applying this new prerelease): http://arcengames.com/forums/index.php/topic,122.0.html

Fingers crossed! This loads way less memory into the directsound engine than before (about 250kb instead of 50-70MB), so this should not be any more likely to trigger it than the sound effects are (and those have already been working for you, so here's hoping this does as well). Let me know how it does for you, if you get a chance!
 

TheWesDude

Arcane
Patron
Joined
Oct 27, 2008
Messages
3,720
Location
Norfolk VA
actually now that i think about it, it may be my hardware

my primary speakers are the microsoft USB sound system 80 which stopped being made in 1999... you may be creating a buffer too big for the drivers to handle.

when i unplugged it before and tried i never restarted my computer to remove it from my device list so it may have been imposing the limit from that.

but then my question is why have other games even new ones like oblivion and sacred 2 and others not run into this problem...

one solution may be to create a memory buffer that the game creates, and then streams that into the slimdx to feed into directsound...

may be easier on the coding side for you than entirely re-writing how the music and stuff is handled.
 

x4000

Novice
Joined
Jun 1, 2009
Messages
34
No, sorry -- see above, I've already got that all recoded and worked out. ;)

The reason you haven't run into this with oblivion and other games is because they were already using a streaming solution, most likely. At the time I was originally coding the music handling for AI War, there wasn't a good way to handle this sort of streaming in SlimDX. So basically I had devised my own in-memory streaming solution to get stuff off the disk efficiently, but then I had to give it to DirectSound all in one batch, which is what caused the problems for your computer, evidently. Anyway, it's all worked out now, SlimDX was updated in March with the added method I needed (little did I know until today), and I've adapted a solution from MDX since there were not any SlimDX examples existing. Should be good to go!
 

TheWesDude

Arcane
Patron
Joined
Oct 27, 2008
Messages
3,720
Location
Norfolk VA
ok, this is wierd

even did a search in the directory for ai war and no joy

Code:
6/18/2009 7:19:21 AM
-----------------------------------Application_ThreadException-----------------------------------System.IO.FileNotFoundException: D:\AI War\Images\MiniMapBlipMetal.jpg
   at AIWar.GameImage.LoadTexture(Boolean IsFirstLoad) in C:\vcprojs\AIWar\Framework\GameImage.cs:line 42
   at AIWar.GameImage.GetTextureD3D() in C:\vcprojs\AIWar\Framework\GameImage.cs:line 61
   at AIWar.Direct3DRenderer.DrawImage(GameImage Img, Int32 X, Int32 Y, Boolean UseViewportOffset, Color DiffuseColor, Single Rotation) in C:\vcprojs\AIWar\Framework\Direct3DRenderer.cs:line 83
   at AIWar.MiniMap.Render(Direct3DRenderer R) in C:\vcprojs\AIWar\Framework\MiniMap.cs:line 313
   at AIWar.GameForm.DrawDirect3D() in C:\vcprojs\AIWar\GameFormParts\GamePanel.cs:line 1462
   at AIWar.GameForm.RunNextCycle(Boolean DoRendering, Boolean DoScrollingAndInput) in C:\vcprojs\AIWar\GameFormParts\GameLoop.cs:line 970
   at AIWar.GameForm.gameLoop() in C:\vcprojs\AIWar\GameFormParts\GameLoop.cs:line 227
   at AIWar.GameForm.GameForm_Load(Object sender, EventArgs e) in C:\vcprojs\AIWar\GameFormParts\Startup.cs:line 272
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom