Constant OutOfMemoryExceptions with default code

Dec 21, 2012 at 6:20 AM

I downloaded the engine and I have not done anything to it. I finally got it to build, but now I keep getting this exception, no matter what I do:

OutOfMemoryException was unhandeled.

Insufficient memory to continue the execution of the program.

I cannot get this to stop. This is happening in GraphicsSystem.cs, and the code it is throwing the exception in is:

// Create new floating point render target
shadowRenderTarget = new RenderTarget2D(this.graphics.GraphicsDevice, shadowMapWidthHeight, shadowMapWidthHeight, true, shadowMapFormat, DepthFormat.Depth24);
Any idea how I can fix this?

Coordinator
Dec 21, 2012 at 3:41 PM
Wow that's a strange one, the only thing I can think of is that you have a very limited amount of VRAM (memory for your video card), which would be very uncommon as the engine works with as little as 128MB of VRAM as far as I know. You could disable shadowing altogether and that might solve this, or if you want shadowing still you could try decreasing the side of the shadow map itself. If you look in the settings.xml file in the demo project you should see settings to disable shadowing, or you'll see 'GraphicsDetail', which if you lower the detail amount it should lower the quality of the shadows and free up some memory. Finally, if those steps don't work, right click on the demo project (or whatever project you're running), and go to the project settings (and then Graphics Settings, I think), and you'll see the option to use 'Reach' or 'HiDef', 'HiDef' is the default and is more expensive, so you might try building using 'Reach' settings instead.

Hope that helps.

- Nic

On Fri, Dec 21, 2012 at 12:20 AM, cakeisajoke <notifications@codeplex.com> wrote:

From: cakeisajoke

I downloaded the engine and I have not done anything to it. I finally got it to build, but now I keep getting this exception, no matter what I do:

OutOfMemoryException was unhandeled.

Insufficient memory to continue the execution of the program.

I cannot get this to stop. This is happening in GraphicsSystem.cs, and the code it is throwing the exception in is:

// Create new floating point render target
shadowRenderTarget = new RenderTarget2D(this.graphics.GraphicsDevice, shadowMapWidthHeight, shadowMapWidthHeight, true, shadowMapFormat, DepthFormat.Depth24);
Any idea how I can fix this?

Read the full discussion online.

To add a post to this discussion, reply to this email (QuickStartEngine@discussions.codeplex.com)

To start a new discussion for this project, email QuickStartEngine@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com