Anim8or Community

General Category => General Anim8or Forum => Topic started by: AnimalCrosser5 on December 22, 2009, 04:35:10 pm

Title: Need help fixing a broken file
Post by: AnimalCrosser5 on December 22, 2009, 04:35:10 pm
I saved this last night, but now it's broken. This has also happened with other files, too. I was wondering if someone could help debug it, or gived me the resources to fix it myself. I'd like to know what to do in the future if this happens again.
Title: Re: Need help fixing a broken file
Post by: lynn22 on December 22, 2009, 05:02:34 pm
Here's your file back. Two/three very small meshes had to be deleted to make it work again,  I don't know which ones but you'll soon see, at least it's opening again  ;)
Title: Re: Need help fixing a broken file
Post by: AnimalCrosser5 on December 22, 2009, 05:12:08 pm
Thanks a lot. How do you debug the files?
Title: Re: Need help fixing a broken file
Post by: lynn22 on December 22, 2009, 05:52:39 pm
You open the *.an8 file in a simple text editor and check the faces section of each mesh for lines that look like this :

 faces {
      4 4 0 -1 ( (0 -3) (2 -3) (3 -3) (1 -3) )
      4 4 0 -1 ( (0 -3) (2 -3) (3 -3) (1 -3) )
    }

the -3 numbers between brackets should not be there

The correct faces section of a good mesh looks like this :

faces {
      3 1 0 -1 ( (1) (0) (2) )
      3 1 0 -1 ( (2) (0) (3) )
    }

BTW  I have never tried removing the -3s from the respective lines,  I'm going to try that now and see if the corresponding mesh can be preserved.

Title: Re: Need help fixing a broken file
Post by: lynn22 on December 22, 2009, 06:07:05 pm
Actually, I just tried a couple of things and removing the minus " - " from the -3 makes the whole file readable again without the loss of any meshes, so here's your complete file again.
Title: Re: Need help fixing a broken file
Post by: ENSONIQ5 on December 22, 2009, 07:21:00 pm
Nice work Lynn22!
Title: Re: Need help fixing a broken file
Post by: AnimalCrosser5 on December 22, 2009, 08:43:50 pm
That's awesome. I don't know what I do that makes the file break, but I did it again. I'll try debugging them myself in the future. Thanks a lot for your help. Does anyone have any clue why the files are breaking so often?
Title: Re: Need help fixing a broken file
Post by: lynn22 on December 23, 2009, 03:08:31 am
Thanks ENSONIQ5

AnimalCrosser5 you're welcome :)

I don't know either what makes a file break but I did notice that if it breaks once it has a tendancy to break again therefore I tend to work with 2 files of the same project; 1 - filename.an8 and 2 - filename_bu.an8 and save alternately.
Title: Re: Need help fixing a broken file
Post by: ADSohr on December 23, 2009, 12:56:28 pm
i have a very similer problem, but i checked for the "-" signs that you specified but did not find any under "faces". it's a huge file though.

are there any tutorials on this subject? especially since it seems common
Title: Re: Need help fixing a broken file
Post by: lynn22 on December 23, 2009, 01:45:58 pm
ADSohr if you have a huge broken file, did you try using the search function of your text editor to find each occurrence of " faces { " (without the quotes) ?

It is easy enough to overlook one mesh and it might just be the one with the minus in it ;)