Re: Direct3D ExecutionEngineException
From: Kevin Spencer (kspencer_at_takempis.com)
Date: 08/31/04
- Previous message: Kevin Spencer: "Direct3D ExecutionEngineException"
- In reply to: Kevin Spencer: "Direct3D ExecutionEngineException"
- Next in thread: wacampbell: "Re: Direct3D ExecutionEngineException"
- Reply: wacampbell: "Re: Direct3D ExecutionEngineException"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 31 Aug 2004 11:42:19 -0400
Update: I managed to get the VertexBuffer and IndexBuffer built without
shutting down the app by reducing the index buffer array to the exact size
needed for this one test (2173788 Int32). Now, it builds both, gets to the
part where the form is going to display, calls Show() on the form, and the
app quits. The IDE doesn't give any indication of a problem, but shows the
app exited with code 0X0 (normal). It seemed like this might be still a
memory issue, so I tested it by setting the VertexBuffer to not initialize
(no array of vertices (3600X3600 in size) built). When I ran it, it
displayed the form before erroring out due to the missing VertexBuffer. This
seemed to confirm the memory issue, so I threw another gig of RAM onto my
machine, doubling the RAM to 2 gigs. Oddly, adding the building of the
VertexBuffer back in caused the app to shut down as before, and removing the
building of it allowed the app to run, same as before I doubled the RAM. In
fact, another odd thing. If I put a break point just before the Show()
method is called, and try to do a QuickWatch on the form, it also causes the
app to shut down. No Event Log messages, no error messages at all. Just
quits.
Any ideas?
-- Thanks, Kevin Spencer .Net Developer Microsoft MVP Big things are made up of lots of little things. "Kevin Spencer" <kspencer@takempis.com> wrote in message news:e6WycX1jEHA.3456@TK2MSFTNGP12.phx.gbl... > I'm working on a terrain-modelling engine that uses Digital Elevation Model > data to draw terrain. As the view of the terrain is dependent upon the > position of the viewer (represents an aircraft), my idea was to draw a > single triangle strip which spirals out from the point of view in > ever-widening rows of squares/triangles. > > Because the point of view may not be centered on the terrain being used at > all times, the number of indices in the IndexBuffer is not known until the > indices are created. So I wrote a function to create the indices in an array > larger than needed, and use that array to create the IndexBuffer indices > after I know the length, by copying the filled parts of the first array to > the indices used by the IndexBuffer. > > The problem is, Digital Elevation data is quite large, in this case > comprising a grid of 3600 X 3600 elevation points. I only need to create an > array of about 2MB to hold the index data (ever-widening squares/triangles). > However, between loading the Digital Elevation Model data into an object, > and creating the indices array, when I try to create the IndexBuffer, I get > an ExecutionEngineException. From what I can tell, the issue is one of > memory. I have 1 GB of RAM, and the app currently uses between 300-400 MB of > RAM. I have plenty of RAM left, but from what I've read, the exception > occurs because the .Net Platform wants to allocate a CONTIGUOUS block of > memory, and apparently can't do it. > > I've tested this on 2 machines with the same results. Interestingly, another > app I wrote that simply creates DEM Objects from Digital Elevation Model > files can load 20 DEM objects without a problem. This app gags on 9 (9 DEMs > are merged to create one). > > Any ideas on how to overcome this? > > -- > Thanks, > Kevin Spencer > .Net Developer > Microsoft MVP > Big things are made up > of lots of little things. > >
- Previous message: Kevin Spencer: "Direct3D ExecutionEngineException"
- In reply to: Kevin Spencer: "Direct3D ExecutionEngineException"
- Next in thread: wacampbell: "Re: Direct3D ExecutionEngineException"
- Reply: wacampbell: "Re: Direct3D ExecutionEngineException"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|