Crash on loading unidentified image in TorqueX Builder 2D
by Nicholas Fuller · in Torque X 2D · 10/12/2009 (1:53 pm) · 4 replies
I accidentally loaded an image that contained no data whatsoever (eg via the new bitmap image functions in explorer)
Builder2D crashed without warning
Builder2D crashed without warning
#2
John K.
www.envygames.com
10/13/2009 (2:54 am)
I'm assuming it's a .jpg or .png file with zero byte size. The crash is understandable, but the builder should be able to handle it more gracefully.John K.
www.envygames.com
#3
But if I try to add a 0 byte .png file in the builder nothing shows up and the game runs fine.
If I include either the .jpg or the .png in VS there will be a compiler error when trying to run:
Error 1 Can not read the texture file. The file is corrupted or invalid. Error code: D3DERR_INVALIDCALL. C:\Users\Randy\Documents\Visual Studio 2008\Projects\Dots 1.3.2\Dots 1.0\Game\data\images\u.jpg Game
10/13/2009 (3:08 am)
If I add in a 0 byte .jpg file it shows up in the builder as 1 white pixel. If I don't include it in my project file in VS then it will suddenly close when running. I believe this is what Nicholas was talking about.But if I try to add a 0 byte .png file in the builder nothing shows up and the game runs fine.
If I include either the .jpg or the .png in VS there will be a compiler error when trying to run:
Error 1 Can not read the texture file. The file is corrupted or invalid. Error code: D3DERR_INVALIDCALL. C:\Users\Randy\Documents\Visual Studio 2008\Projects\Dots 1.3.2\Dots 1.0\Game\data\images\u.jpg Game
#4
10/13/2009 (8:48 am)
Ah, just tried it again, It doesn't happen if you make the image beforehand, but if you try to do a New->New Bitmap Image while in the Open File.. Dialog for Create New Material then it crashes
Torque Owner Randy Lutcavich
Does this happen every time you load that image?
Is it as soon as you load it?