Wednesday, 30 January 2013

How To: Maya freezes at 98% - Fixes

I had a major issue with Maya last week where it would try to load my scene file but freeze at 98% and never actually open. My scene file was referencing multiple other files, 2 characters and 1 set. I save iteratively, as I know that is good practice, so I checked the previous saved file and I had the same issue there too. In fact the previous 10 saves were all like this and after lots of investigation I found the files to be corrupt. I did a lot of Google-ing and noticed lots of people had had the same issue but struggled to find any resolutions, however I did manage to recover my whole file and all animation in the end but it took me a whole day to figure it all out so thought I would share my findings and how to fix the issue to help someone else who may run into this.

What actually happened to cause the issue in the first place?
Well I have come to the conclusion, after doing some testing, that if you select some geometry or control curves on your rig, and delete them accidentally, rather than deleting a key (which is what happened to me), your rig gets all messed up, and becomes stretched all over the place as you can see from the images below:
Original:

Broken:

At the time I did an undo within Maya and carried on animating happily unaware that in the background the .ma file was now broken and has lots of junk in it that will prevent Maya from loading the file again. So I only discovered this once I'd closed the program down and loaded up maya and my file again later in the week.

How do we fix this?
At this point it important to point out that you should always always save your files as .ma rather than .mb. The reason for this is the .ma file will give you a textural view of the file, basically all MEL script that is the makeup of the file, which will allow you to edit it whereas the .mb file is a binary file, so unless you are good at understanding lots of 0's and 1's you will struggle to restore your file.
1. If like me you had multiple references in your file, you will notice it will stop at 98% on one of the referenced file. The file causing me issues was one of my character files. I found that if you rename this file, for now, and then try and reopen your scene again, Maya should say that it could not find that file any longer and do you want to skip or find it? I chose skip and my scene loaded, so I managed to recover at least 50% of my animation at this point, i.e. the animation that was on the other referenced character. So I had started to make progress. Give this a go to see if this at least works for you.
2. As I mentioned above the file is corrupted. I checked back through all my previous saved versions until I got to a version that would actually load. I then download a diff tool so I could compare the files. There are lots of good products out there, WinDiff, Beyond Compare, ExamDiff etc. but I chose ExamDiff as it was free. There were obvious differences in the files where I had change control curves in the graph editor / setting new poses but then I noticed a lot of other rubbish in the file, compared to the one that would load. Some snapshots of the comparison are below:
Note. The file on the left is the file that would load and file on the right had the issue.
This is a normal comparison and things in yellow are what has actually changed between saves as you update your poses for example.

As you can see from this section of the file in the image below, the one on right now has a load of extra stuff added to it, which was from when I accidentally deleted part of the rig and tried to undo it in Maya. Anything like this needs removing!

I just located and manually removed all places in the file that looked like the above, saved the file back as a different version and voilĂ  the scene reopened and I got all my animation back.

Update:
Now, the eagle eyed amongst you might have noticed that your file size almost doubled when the rig originally exploded which was due to the rig adding all those extra lines of information to your file. So even after applying this fix (which may reduce the size slightly), saving the scene in Maya causes it to double in size again, which is not ideal but at least this time it still remains loadable. So how do we get the file back down to its original size? The best thing to do is to select all controllers of each rig and copy/paste them into a new scene. The new scene should contain references to all the assets you need, and pasting the keys would transfer all animation, and thus returning the file back to its original size. I'd like to thanks Raymond and John Nguyen for providing this update to this post :)
I truly hope this helps someone out who runs into the same issue as I did so they can get it resolved quickly and get back to animating. If this does not work for you however, please check out an alternative solution posted by my friends and fellow AM students, Beau and Cameron Pratt, their post can be found here. Happy Animating Everyone!

14 comments:

  1. Hey! Thanks so much for posting this. I'm currently an AM student and ran into this same problem with a project I started this past weekend. AM Tech Support offered a few suggestions that didn't really work. They did provide me with a link to the Pratt Bros page. I tried their method, but my rig ended up busting all over the place. Couldn't even tell it was something intended to be humanoid. I found out, using your method, that it was a very large chunk of junk code. 19,838 consecutive lines, to be exact. I'm not sure how I did that. I deleted all that, saved and now I'm back in business! You saved me quite a few hours from not having to re-animate everything I did so far. Thanks a bunch!

    ReplyDelete
    Replies
    1. Hey Daniel, no problem at all, I'm glad it sorted you out as I remember how annoying and frustrating the feeling of losing your work can be. Please feel free to pass a link to this post onto AM support if you feel it can help others. Good luck with all the studies.

      Delete
  2. Hey Drew thanks so much for writing this down. You've just saved me my 10 hours of work!

    ReplyDelete
    Replies
    1. Awesome, so glad it worked for you Raymond. Happy Animating.

      Delete
  3. Hey Drew, just wanted to give you a small update on this topic which might be interesting for you (and your readers). When the above situation happened to me, applying the fixes you described did get me to load the scene again. But, what I noticed was that ever since the model exploded, the file size had almost doubled. Even after applying your fix (which reduced the file size again), saving the scene caused it to be again twice the size but remained loadable. My original scene was like 17Mb and after the corruption it was almost 30Mb. I got a good tip from my mentor John Nguyen (this guy is really awesome) to select all controllers of each rig and copy/paste them into a new scene. The new scene should contain references to all the assets you need, and pasting the keys would transfer all animation. I did this and my file was back to 19Mb. Hope this will help and thanks again!

    ReplyDelete
    Replies
    1. Hi Raymond! I had a quick question for you. I haven't done the steps Drew said to do because I'm sooo bad with computers and I don't think I'm doing it right. If I don't follow his steps, will I able to fix my problem by copy and pasting my animation into a new file (with new characters rigs?)

      Delete
    2. Thanks for the feedback Raymond, I will make sure I update my post with your notes as I think it would be helpful for others.

      BabyBellPepper, Yes that should work providing you can open the file to begin with, if you can't open the file to be able to copy the animation keys, then you will need to follow the steps I posted first.

      Hope that helps.

      Drew

      Delete
  4. hello!..
    thank you so much for this, seems very useful. only one problem: what do i do if my file is .mb and not .ma? :(

    ReplyDelete
    Replies
    1. Hi Anat, glad you found this useful. As I said in the post the .mb file is a binary file (so just 1's and 0's) which makes this process harder. I did find a conversion script on Creative Crash which is free that might help you. Heres the link:

      http://www.creativecrash.com/maya/script/maya-version-conversion

      Hope this helps and let me know how you go :)

      Delete
    2. thanks, Drew!
      unfortunately, i can't get the script to work. :( it doesn't list any mb files for me, even if i check in the "auto convert binary to ASCII files" box. in fact, as soon as i check it, the script editor shows me an error: "error: unsupported operand type(s) for +=: 'NoneType' and 'NoneType'
      thanks anyway....

      Delete
  5. Now I don't have any good working file to compare with... What should I do?

    ReplyDelete
    Replies
    1. Hi Taher, try following the post on Beau and Cameron Pratt's site that I link to at the bottom of my post as see if that works for you.

      Delete
  6. Thanks for posting this!! I'm just wondering how to delete these lines manually? Is it from examdiff program or from maya?

    ReplyDelete
    Replies
    1. Hi Ariana. Thank you for your comment. You should be able to open your .ma file in any text based editor, i.e. Notepad, Wordpad, Notepad++. Personally I would go with Notepad++ as its free to download and you get line numbers to match up to your results from the diff tooling.

      Hope this helps.

      Delete