Model Loading Problems
When trying to test Nehe''s model loading tutorial in VC++.net I get a runtime error saying "Invalid Allocation Size: 4294967295 bytes." This is a really big number and I have no idea why it would be trying to allocate that much. Any help would be greatly appreciated.
-Mark
that number looks suspiciously like maxint-1
is it possible that the
long fileSize = inputFile.tellg();
is returning -1, i.e. there is no spoon, sorry, file?
So I''m guessing somewhere a:
x = new Something [-1];
is happening.
lonesock
Piranha are people too.
is it possible that the
long fileSize = inputFile.tellg();
is returning -1, i.e. there is no spoon, sorry, file?
So I''m guessing somewhere a:
x = new Something [-1];
is happening.
lonesock
Piranha are people too.
I might be wrong on this, but that high of a number could be because its a signed value being flipped. Check if your possably trying to allocate a negative number.
ok i figured out for some reason
inputFile.seekg( 0, std::ios::end );
long fileSize = inputFile.tellg();
is making fileSize a negative number. Im having trouble finding out exactly which negative number but i believe it''s -1. I know the file im reading from exists, so im not sure why it''s returning a negative number. Again, any incite would be very helpful
-Mark
inputFile.seekg( 0, std::ios::end );
long fileSize = inputFile.tellg();
is making fileSize a negative number. Im having trouble finding out exactly which negative number but i believe it''s -1. I know the file im reading from exists, so im not sure why it''s returning a negative number. Again, any incite would be very helpful
-Mark
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement