Game Development Community

Invalid File Handle - Inspector

by Jeremiah Fulbright · in Torque Game Engine Advanced · 08/13/2006 (12:57 am) · 3 replies

One of our level guys came to me asking about an error he was seeing which was:

Warning: (..\engine\core\fileStream.cpp @ 80) FileStream::getStreamSize: the stream isn't open
Fatal: (..\engine\platformWin32\winFileio.cpp @ 260) File::getSize: invalid file handle

This is only happening when he opens the Mission Editor and selects a Atlas2 Instance.. On legacy atlas, it doesn't seem to do it, nor legacy TGE Terrains. I tested it within the normal TSE codebase and it wasn't doing it, but I did comparing amongst various files and saw no differences or changes.

It is only tied to the Atlas text control which seems to try and update and some reason open that file every time or something... but not sure what it is trying to do

I am looking back thru changes, but don't know how long it has been happening or if it might even be a script issue

#1
08/13/2006 (1:47 am)
It seems this has been happening for awhile, but wasn't ever really noticed till recently. We have some custom code in expandScriptfilename which does some searching for the filename thru ResManager which is the peice of code causing the issue...

It doesn't make sense that it isn't able to be opened thru a normal file process, unless there is something odd with Atlas 2 files. In any case, just going to check for atlasFile and return what it needs to properly.

In any case, just checking for .atlas and not trying to load it and instead just passing the filename will fix it, but seems odd that it won't open it via a FileStream. I can't change the file via Editor now, with my workaround in place, which isn't a major ordeal since its easier to just put it in via Text Editor....

edit:

Okay, It looks like it is because of the extension being .atlas (possibly too long?).. I renamed the same file to .atl and pointed to it and it loaded perfectly fine. Its not a major ordeal for this part of the code, but might be something to look into fixing or working around elsewhere
#2
08/13/2006 (8:39 pm)
Note, this doesn't affect trunk, although it does use Standard calls within FileStream
#3
08/13/2006 (8:48 pm)
Thanks for the post and followups, Jeremiah... and I'm glad this doesn't seem to be affecting trunk. (Phew, less work for me! :P)