Heap Error
And yes, casting an array to a different type is always a bad idea because then the receiving code will probably step through the array data with a different step size, mangling data and/or running off the end.
If CreateBuffer is running out of memory, maybe you should examine the parameters you're giving it in the debugger? Maybe you're telling it to create a buffer of a massive size due to a bug somewhere else.
After editing the CreateSkiMesh Function My load Time is down to 1.35 minutes where as before it was at 3.5 minutes is that even posible.
As for App Verifier I can't run it.
My app will almost load all Items and then it gets to some point and stops on the CreateEnumObject, But the debug window does not have a error message
only the hr is set to -2005531807 = BAD_FILE
Why does the debug not print me a message.???????
HRESULT hr = pDXFile->CreateEnumObject((LPVOID)Filename,
DXFILELOAD_FROMFILE,
&pDXEnum);
if(FAILED(hr))
{
pDXFile->Release();//drops out here WHY???????
return FALSE;
}
So I counted all my memory and a have
*******************************************************
Last Loaded Mesh Before BAD FILE
New Mesh File Name = Media\Meshes\R1FlameBot_Shield.X
Mesh Image Path = Media\
Number Of Mesh Objects = 1 Current Mesh = 0
Number Of Vertices = 1872
Number of Indices = 1872 Number Of Faces = 624
Vertex Memory Size = 59904
Index Memory Size = 7488
***Total Memory For Current Mesh = 67392 bytes
Running Total Of all Loaded Meshes In Mbytes = 7
Running Total Of all Loaded Meshes In Bytes = 7729828
I have 4 gb of ram
But this time the app verifers log has no errors SEE
<?xml version="1.0" encoding="UTF-8"?>
-<avrf:logfile xmlns:avrf="Application Verifier">
<avrf:logSession Version="2" PID="1084" TimeStarted="2014-10-24 : 13:23:57"/>
</avrf:logfile>
and I no Longer Get this before it breaks(Break point set in if(FAILED(hr)))
First-chance exception at 0x760dfd1e in RTSTowers.exe: Microsoft C++ exception: _com_error at memory location 0x001cd1d4..
First-chance exception at 0x760dfd1e in RTSTowers.exe: Microsoft C++ exception: _com_error at memory location 0x001cd4c0..
First-chance exception at 0x760dfd1e in RTSTowers.exe: Microsoft C++ exception: _com_error at memory location 0x001cd608..
First-chance exception at 0x760dfd1e in RTSTowers.exe: Microsoft C++ exception: _com_error at memory location 0x001cd720..
First-chance exception at 0x760dfd1e in RTSTowers.exe: Microsoft C++ exception: _com_error at memory location 0x001cd838..
First-chance exception at 0x760dfd1e in RTSTowers.exe: Microsoft C++ exception: _com_error at memory location 0x001cd73c..
First-chance exception at 0x760dfd1e in RTSTowers.exe: Microsoft C++ exception: _com_error at memory location 0x001cd1d4..
First-chance exception at 0x760dfd1e in RTSTowers.exe: Microsoft C++ exception: _com_error at memory location 0x001cd4c0..
First-chance exception at 0x760dfd1e in RTSTowers.exe: Microsoft C++ exception: _com_error at memory location 0x001cd608..
First-chance exception at 0x760dfd1e in RTSTowers.exe: Microsoft C++ exception: _com_error at memory location 0x001cd720..
First-chance exception at 0x760dfd1e in RTSTowers.exe: Microsoft C++ exception: _com_error at memory location 0x001cd838..
First-chance exception at 0x760dfd1e in RTSTowers.exe: Microsoft C++ exception: _com_error at memory location 0x001cd73c..
D3D10: ERROR: ID3D10Device::CreateBuffer: CreateBuffer returning E_OUTOFMEMORY, meaning memory was exhausted. [ STATE_CREATION ERROR #70: CREATEBUFFER
I think the error was in CreateSkinMesh. But as for why when the app verifier is running it Goes into foobar mode no idea.
A recap I get no errors untile EnumObjects returns BAD FILE and that error is only in the returned hr not didplayed in vc10 out put window.(The Space chimps Know Why I bet)