strangest thing

Community Forums/General Help/strangest thing

Doggie(Posted 2010) [#1]
I was working on my sprite program. I loaded and ran it then clicked to open a picture file and got "Blitz array out of bounds error"(in BlitzUI.bb"
I have been running this program for the last month. I hadn't changed anything at all from the last time I saved and created the most recent executable that runs fine without this error. I tried a previous save version of the program, several of them, they all give me this same error. However, and this is what is strange, I copy the program and all needed include files to an empty directory and it runs and works just fine. How could this be? I thought maybe it was just too many pic files in the current dir so i deleted over a hundred of them but the error persists in the original directory. What on earth could make this happen?


nawi(Posted 2010) [#2]
First of all, you should probably post in a better forum, General help usually refers to non-Blitz help. Also, have you tried debug mode? It might show you which array is out of bounds.


xlsior(Posted 2010) [#3]
Did you explicitly verify that the image loaded succesfully, or did you just 'assume' it went OK and then try to access it?

Wrong filename, path, unsupported image type, image too large, corrupted image file, unsupported image (sub)format, unsupported bitdepth etc. can all lead to errors loading and handling images...


Doggie(Posted 2010) [#4]
No, that's just it. It crashes as soon as I click on the button to load a file. It's actually the code that places the caption at the top of the file loader form. How this code could be affected by the directory it resides in is beyond me. The exact same files run in another directory just not in the one I had been using while developing. So it couldn't be a corrupt file.


Matty(Posted 2010) [#5]
Do any of your pictures or folders have a period (.) symbol in them , in addition to the usual file extension. IE my.picture.bmp for instance.


Doggie(Posted 2010) [#6]
well there was, I deleted a folder ".bbstuff" but that didn't make the difference. Finally I cleaned out about 2,000(no kidding) excess bmp files and now it works. I guess trying to read that many files and index them was what did it. It hadn't been a problem till I guess there was just one too many useless pictures. Thanks for your input.
WHy would having an extra period symbol cause a problem?


Matty(Posted 2010) [#7]
Re:period symbol - not sure about images, but try it with a .x or .b3d file - call it myobject.withanextraperiod.b3d for example and blitz doens't always know which file format the object is in if there is an extra period..I'm not sure though if it's a problem with images or just 3d objects (and maybe sounds as well?).


Kryzon(Posted 2010) [#8]
I'm just speculating, but the parser may think that anything to the right of the first period that come up is the file extension.


Matty(Posted 2010) [#9]
I'd agree with that Kryzon - it took me a while to work out why objects I saved in my XSI5.0 folder were crashing on load ... move them to another folder and it was no longer a problem.


_PJ_(Posted 2010) [#10]
I'm just speculating, but the parser may think that anything to the right of the first period that come up is the file extension

Yep.
It's handy there's different FileType() returns for folders and files, since folders can have "." and then be confused with files as haviing an extension.