Game Development Community

T3D1.1 Beta3 - Saving a level with a 4096 terrain causes a crash - CONFIRMED

by David Jauregui · in Torque 3D Professional · 10/30/2010 (8:57 pm) · 7 replies

Open your game, load up the tools. File -> Create Blank Terrain, use any name, choose any material (tried grass, dirt, rock, dried grass so far) and choose a resolution of 4096. Choose flat or noise it doesn't matter. It will take a moment to create it and then it will place above/below the ground plane.
At this point you can adjust it or just save it..(Save as or Save Level) but the moment you save it, it crashes T3D. You can re-launch the game and load it up and it DOES exist/gets saved.
I have let it sit for as long as 30 minutes, but it doesn't matter how long you wait it just sits waiting for you to choose to end the task or debug.
Expected: It shouldn't crash when I save.
Windows 7 Ultimate, 6GB RAM.

#1
10/31/2010 (11:56 pm)
Logged as TQA-1191 for the QA team to verify.
#2
11/01/2010 (2:34 am)
http://www.torquepowered.com/community/forums/viewthread/121479
#3
11/08/2010 (8:34 pm)
Bug confirmed.
#4
12/21/2010 (12:28 am)
This is fixed.

Go to Engine\source\platformWin32\winVolume.cpp and replace Win32File::calculateChecksum() with this one...

U32 Win32File::calculateChecksum()
{
   if (!open( Read ))
      return 0;
 
   U64 fileSize = getSize();
   U32 bufSize = 1024 * 1024 * 4; // 4MB
   FrameTemp<U8> buf( bufSize );
   U32 crc = CRC::INITIAL_CRC_VALUE;
 
   while ( fileSize > 0 )
   {      
      U32 bytesRead = getMin( fileSize, bufSize );
      if ( read( buf, bytesRead ) != bytesRead )
      {
         close();
         return 0;
      }
 
      fileSize -= bytesRead;
      crc = CRC::calculateCRC(buf, bytesRead, crc);
   }   
 
   close();
 
   return crc;
}
#5
12/21/2010 (2:25 am)
Groovy! Thanks Tom.
#6
12/21/2010 (3:41 am)
You, sir, are made of awesome sauce!
#7
12/21/2010 (5:54 am)
thanks tom!