Skip to main content
GameDev.net gamedev.net
🔒 Locked

D3DERR_OUTOFVIDEOMEMORY

Started by Blackkata Feb 27, 2005 at 1:42 PM 2 replies 8.8k views
Original Post
Blackkata
Blackkata
Hello, Im using managed directX (C#) to make a simple top down airplane shooter, everything was working fine until I added something (im not sure what it was exactly) and now Im getting an exception whenever I try to run the program on the line device = new Device(Manager.Adapters.Default.Adapter, DeviceType.Hardware, this, CreateFlags.SoftwareVertexProcessing, par); It gives me an applicated failed exception and has the name D3DERR_OUTOFVIDEOMEMORY. I googled for a few hours and found some results but none that made any sense. in most cases it was caused by a memory leak but Im in C# so shouldnt the garabage collector take care of all of that? I tried setting the debug output for DX to full but I get nothing. Someone suggested that Im loading to many textures or something but theres only 1 texture in the entire game thats 179 kb. Does anyone know what might be causing this error? Thanks. [edit] I also forgot to mention as expected when I restart the problem is fixed for a while until I run the app a few times. Once I get the error no d3d applications will run at all. I do have an integrated graphics card but I also have a gig of RAM.
circlesoft
circlesoft
Quote:
Original post by Blackkata
I do have an integrated graphics card but I also have a gig of RAM.

In this case, it doesn't matter how much RAM you have - it matters how much video memory you have. Usually, integrated graphics cards have a *very* low amount of video memory (I used to have one that only had 2mb [wink]).

To find out how much video memory you have, do one of the following:

(1) Start 'DxDiag' (easiest way to get to it is to simply enter it into the Run window). Go to the 'Display 1' tab, and you will see your Approx. Total Memory in the Device section.

(2) Go to the Control Panel, and start the Display applet. Go to the Settings tab and click the Advanced button. Then go to the Adapter tab. There, you can find it listed as Memory Size.

This is using XP, so it may be different for other versions of Windows.

If you raw amount of video memory is really low, loading a few textures could use up all of it. Remember that 179kb is the *compressed* file size - the true, uncompressed size of it when loaded is probably much higher.

Are you sure that your application is shutting down correctly? It definetly sounds like some interfaces in video memory aren't being released. This shouldn't really be a problem with MDX, since C# takes care of memory management for you. However, try disposing all D3D interfaces manually before the app exits.
Blackkata
Blackkata
Thanks for the reply.

earlier today I went into controll pannel and noticed it said that managed directX wasnt installed even though I was using it. So I reinstalled it and now it works fine as far as I can tell, one of the more strange bugs Ive come across. As far as I can assume it was probably trying to use the non managed DX, but wasnt able to dispose of them when it ran.
circlesoft
circlesoft
That's very unusual, I haven't heard anything like that before. No wonder why it wasn't working right [lol]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.