Game Development Community

1.7.3 Error Reading PNG file

by Isaac Barbosa · in Torque Game Builder · 08/08/2008 (9:10 am) · 16 replies

This has suddenly happen and I don't know what to do:

I open an scene as usually then I create an scene object, then I try to save the scene and I get this error:

path on window ...\...\source\dgl\bitmapPng.cc:

Error Reading PNG file
IDAT: CRC error

And then TGB crashes.

What can I do? is this an identified engine bug?

Thanks!

Isaac

#1
08/08/2008 (10:35 am)
Try using OptiPNG to clean out your PNG file's headers. Sometimes things get munged in there. Some programs ignore the headers. Others do not.
#2
08/08/2008 (11:27 am)
@David,

Thanks for the suggestion. How can I do that? Where are the PNG headers?

Thanks
#4
08/08/2008 (11:38 am)
@David,

Thanks for the link. I've downloaded the util. I don't know how to use it right now but I will try. Are you sure that this problem is due to a png? Everything was working ok before that error (I mean I don't move anything on the data folder adding more images than previously used).
#5
08/08/2008 (11:46 am)
I've seen it fix a ton of PNG problems in different programs.
#6
08/08/2008 (11:50 am)
But I can't understand why is this problem appearing on my TGB copy since I don't move anything on my pngs. And I can't open optiPNG under VISTA.

I've tried a torque reinstalling and the problem persists. Sorry for the ignorance on this matter, but I don't know what to do next :(
#7
08/08/2008 (11:54 am)
OptiPNG is a command line program. I've used it on Vista and XP with no issues. If you don't feel comfortable with the command line, you can drag your PNG's onto the EXE in the folder. Make sure to put them back where they belong, though.

It might not be the issue, but 99.9% of all of the PNG errors that I've seen that weren't related to bad paths (referring to where the PNG file was not) or transparency (known Photoshop issues), were due to munged headers.
#8
08/08/2008 (11:59 am)
Now I understand less since this Fatal Error is happening when I try to save an empty level in a new project ????

Lost here.

Thanks for the help
#9
08/08/2008 (12:06 pm)
@David,

it doesn't works :(

When using OptiPNG I see IDAT too big as recurrent output. So I guess evrything still as before.

Thanks again
#10
08/08/2008 (12:14 pm)
Send me the PNG and I'll see if I can use it.
#11
08/08/2008 (2:30 pm)
@David,

Done, I sent one of the project PNG's.

The weird thing is that this is happening with 1.7.3 and 1.7.4 and even with new empty projects. Now I can't save anything.

:(

Any help is welcome

Isaac
#12
08/08/2008 (3:05 pm)
:(

This problem is now on other finished projects as well :(

What can I do? format my hard drive and reinstall TGB again?

Thanks
#13
08/08/2008 (4:15 pm)
I have deleted prpgram files/garage games folder and then installed a new TGB 1.7.3 installation:

after load my project and try to save, the problem persists and now I got this error in a window:

Error

There has been an error.
Error running c:\program files\garagegames\torquegamebuilder-1.7.3/tgb/Torquegamebuilder.exe : child killed: segmentation violation
The application will exit now

Somebody knows what is happening here? Thanks
#14
08/08/2008 (4:28 pm)
Have you gotten rid of the stuff in Application Data? That could be causing you some problems if a config file got munger.
#15
08/08/2008 (4:29 pm)
FIXED:

I don't know what happen but now everything is working ok.

I do:

double ckick on any imagemap on the editor, then click ok to accept.

then I saved the level using save as instead of click on the save editor button, level was saved ok, after that, save button is working ok and the crash bug has hopefully gone :)

Cool, this go the same way it comes. :)

Thanks David
#16
06/06/2009 (9:00 am)
For posterity, I've also gotten this problem over the years, but when it happens to me it's always related to saving levels with text objects in them. Works for me if I comment out line 121 and 122 in tgb/tools/levelEditor/scripts/levelManagement.ed.cs:
// write the font cache
// rdbhack: this is a hack because its going to force the tool to write
//   both the tools font cache, and the fonts used for the game when
//   really all we need to do is write out the fonts the game needs
populateAllFontCacheRange(32, 255);
writeFontCache();

This probably has some side effects, but is not that important for my game, especially compared to losing everything when I try to save :)