Re: Direct3D ExecutionEngineException

From: Kevin Spencer (kspencer_at_takempis.com)
Date: 08/31/04

  • Next message: Jason: "Re: ambient light"
    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.
    >
    >
    

  • Next message: Jason: "Re: ambient light"

    Relevant Pages

    • Re: Migrating VC++ 6.0 apps to .NET
      ... You need to pin the arrays and then passed the pinnen version. ... TBLexp automatically creates interfaces ... > this case we won't be able easily migrate our old app to .NET platform. ... > Can anyone provide good examples how to convert array array of managed ...
      (microsoft.public.dotnet.languages.vc)
    • Problem with Array from C# to COM
      ... app is an Application-Object of the Library. ... The array id has two ... Dim app, broadcast, id ... Set app = CreateObject ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: Can I use an array with an IN clause?
      ... I tried passing an array of integers as the parameter, ... I can solve the problem by generating a query of the form "WHERE ID IN ... because the number of integers varies. ... Without knowing more about your app it is a bit hard to say what you ...
      (comp.lang.java.databases)
    • Re: Passing Array with CreateThread?
      ... is the entirety of my main program, so if the app is running, the main ... passing an entire array that way for some reason .. ... As I said, it works fine if you just call it as a sub, so its obviously ... Public Sub TestThread ...
      (microsoft.public.vb.general.discussion)