White Paper - Application Maintenance

December 1, 2003

When Good Apps Go Bad

by Larry Jordan

 
Your project is due in a couple of hours, you're almost ready to output and Final Cut Pro crashes.

First, don't start jumping in front of moving trucks. Second, read this article for some tips to get you back on the road to recovery. Third, if you follow the tips in this article, there are some preventative measures you can take that can help keep you out of trouble in the future.

Plus, near the end, are some suggestions on working with the latest version of OS X: 10.3 (Panther).

In the next few pages, you will learn

  • how to prevent file and directory problems
  • how to keep your hardware and software current
  • what to do when Final Cut Pro crashes
  • what to do when your Macintosh crashes
  • how OS X 10.3 is different from OS X 10.2.x
  • and, finally, some suggestions to keep your Mac happy and healthy.

PREVENTING PROBLEMS

Probably the most helpful task you can do is to rebuild permissions EVERY time you upgrade your operating system, upgrade an application, or every week as part of a regular maintenance schedule.

OS X consists of well over 110,000 files -- most of which are invisible. Permissions are used by Unix to determine who owns a file, who can write to it, who can read it, who can read or write to it, or who can't access any part of it.

In an operating system this complex, there are bound to be confusions as to which file belongs to whom. Rebuilding permissions solves this confusion before it turns into bizarre behavior on the part of of your favorite applications.

To Rebuild Permissions, launch Disk Utility (Applications->Utilities->Disk Utility), select your boot disk, click the First Aid tab, and click "Rebuild Permissions." Rebuilding does no harm and can often prevent or solve problems before things take a turn for the worse.

If you are editing a complex project, every day or two do a "Save as..." instead of just saving your project. A complex project with lots of clips, edits, effects, and transitions includes a huge quantity of numbers for FCP to track..

Doing a "Save As..." allows the application to make sure that all those numbers are correct and stored properly. In addition, doing a "Save as..." automatically gives you a back-up version of your project file, just in case something happens to the main project.

As a general rule, I do a "Save as..." every night as a back-up, just before quitting. I'll also do a "Save as..." just before starting final output to tape.

If you run lots of applications in the background while editing with Final Cut, such as PhotoShop, Peak, QuickTime and a half dozen helpful utilities, reset the Memory allocation inside Final Cut to between 85 - 90%. This memory allocation determines NOT how much memory FCP uses, but how much memory is available for all background applications.

(Also, if you use lots and lots of still images, bump the Still Image Cache to 20 - 25 %. Both of these settings are in the System Preferences -> Memory tab.)

However, don't touch either of these settings unless you have at least a full gigabyte of RAM in your system.

There is no inherent benefit to having more than 2 GB of RAM in your system for Final Cut. In fact, with OS 9, having more than a gigabyte of RAM often caused problems. While these have gone away with OS X, loading up on RAM won't improve your system performance. However, if you have less than one gigabyte add extra RAM to bring it up to a Gig. There is a significant benefit to running FCP with at least 1 GB of RAM.

(Also, if you are using a Cinewave system, excess RAM may cause a slowdown in system performance running version 4.0x software.)

Finally, if it takes your computer longer than, say, 30 seconds to shut down at night, you may have a corrupted disk directory. Keep reading to learn ways to fix this before things get worse.

KEEPING YOUR HARD DISK HAPPY

In the old days (say, oh, 18 months ago), standard wisdom was that you could get faster performance from your hard disk and applications by partitioning your hard disk into smaller sections.

With the release of OS X, along with upgraded applications and the advent of truly huge storage sizes, this mantra may no longer be accurate.

According to hard disk vendors that I spoke with recently, there is neither a performance benefit, nor a performance hit, to partitioning. In other words, it does not harm or help your system.

My suggestion is that if you already have partitions on your system, keep them. If you add new hard disks, don't create partitions. They add an extra layer of overhead your drive heads need to process that can slow down older systems.

If you have external hard disks, be sure you are running the latest version of drivers for your hard disk and, if you have one, your SCSI card. This becomes especially important given the recent crisis of older drivers jeopardizing data on external FireWire drives connected to systems that were upgraded to OS X 10.3. (The current version of OS X is 10.3.1.)

For instance, drivers needed to be updated when OS X 10.2 was released. They needed to be updated again, in many cases, when 10.2.4 came out. Again, with 10.2.6. Again, with 10.2.8 (G5). And, finally, again with 10.3.

The same is also true with SCSI cards and with many RAID systems. Fortunately, updates are less necessary for internal hard disks because, since these are often from Apple, they are updated automatically when you update your operating system.

You can often learn what drivers your SCSI and hard disk drives are using by checking the settings listed in "About Your Mac" and clicking on "More Info," then clicking on the "Devices and Volumes" tab.

But, it doesn't hurt to take a few minutes to visit your hard drive manufacturer's site to make sure that in your wild enthusiasm to keep your computer current with the latest operating system, you haven't left your hard disks and, potentially, your data, behind.

As an important note, if you are using a FireWire 800 drive it is imperative that you upgrade your Firewire drivers to version 1.05 BEFORE upgrading to OS X 10.3. See your hard drive vendor's web site for more information on how to upgrade drivers.

And, as long as I'm on the path of hard disk and SCSI drivers, these driver updates also include your capture card. If you are using Firewire, no problem, those drivers are updated automatically with each operating system. However, Cinewave, AJA, Black Magic and Digital VooDoo owners need to make sure that their cards are current and up-to-date. And it is better to check this BEFORE upgrading , than after.

You'll also need to upgrade your capture card drivers when you move to a G-5. Again, check vendor web sites for more current information.

WHAT TO DO WHEN FCP CRASHES

If you get the dreaded "Application has suddenly quit." message, first, stop swearing. Second, and more importantly, BEFORE you restart FCP, trash your Final Cut Preferences.

Preference files store lots of stuff, including current window settings, lists of recent projects, favorite transitions and motions, and man of the details that FCP needs in order to boot.

Once you crash, those preference files are left in a "precarious" state. Meaning that FCP may launch, but, internally, it's feeling a little insecure. And a little insecurity with FCP can cause a lot of insecurity in the rest of us as we watch our project blow up in our faces.

To trash your Final Cut Preferences go to:
Your Hard Disk -> Users->Your User Name->Library->Preferences folder.

Inside the Preferences folder, look for:

com.apple.FinalCutPro.plist

and trash it.

Then, look farther down the Preferences file for the Final Cut Pro folder. Inside it look for two files:

Final Cut Pro 4 Preference file
Final Cut Pro v POA Cache

and trash both of them. (No, I don't know what POA stands for, either.)

Then, empty your trash.

Once these three preference files have been trashed, go to Disk Utility (which I've now moved out into my Dock for convenience) and run Rebuild Permissions. Again. If it shows that it made lots of repairs, run it again. If your files were in especially bad shape, running it a second time has been known to fix problems that were missed during the first pass.

Then, restart Final Cut. While you will have lost some of your preference settings by trashing preference files, such as favorite motions, effects and transitions, you will find that FCP itself operations a lot more securely.

If, after all your ministrations, FCP crashes again, well, read the next section.

WHAT TO DO WHEN YOUR MAC CRASHES

I've read a lot about how stable the Unix operating system is. But that comes as small comfort when it's my Mac that's crashed. So, if your Mac crashes, especially if you are running Final Cut, and you are running OS X 10.2.x here's what to do. (If you are running OS X 10.3, we'll get to that in a page or two.)

1) Stop screaming at your computer. It can't hear you.

2) If you are running OS X 10.2.x hold down the Command and "S" keys immediately upon hearing the chime when you restart your Mac. (There's a special note for OS X 10.3 users at the end of this section. There are different instructions for you.)

3) Immediately after the gray screen with the Apple logo appears, you can let go of the keys.

4) In a few seconds, you screen will fill with what looks like Windows on bad drugs. Wait for all the text to stop scrolling past.

5) You will probably, but not always, see a line that starts with "sh-" and ends with a pound sign, "#". When it appears, type: "fsck -y" -- all lower case, without the quote marks and with a space between the k and the hyphen. Then, press Return.

6) After a bit, while more lines scroll past on the screen, one of two messages will appear:

  • "Your disk appears to be OK."
  • "Your disk has been repaired."

7) If your disk is OK, skip to step 9.

8) If your disk has been repaired, rerun FSCK again, by typing: "fsck -y" again -- without quote marks, all lower case, with a space between the "k" and hyphen.

9) After running FSCK, type "reboot -n" (all lower case) and press Return.

10) Your Mac will now reboot.

What you've done is run a Unix disk utility that helps repair disk directory errors. While OS X runs disk utilities during the boot up process (which is why the gray Apple screen stays up so long), running FSCK as a separate utility can help detect and repair problems -- especially after a crash.

If, after running FSCK a few times and having it find errors that it can't seem to fix, it may be time to run a more powerful utility -- Disk Warrior X. Disk Warrior is an amazingly powerful tool to repair broken disk directories. I recommend it highly to anyone using OS 10.2.x -- use it regularly to stay out of trouble.

After you've run FSCK, rebuild your preferences using Disk Utility. It might also be a good idea to trash your FCP Preferences, again.

WHAT TO DO IF YOU GET "THE SPINNING BEACH BALL OF DEATH"

The Spinning Beach Ball means that the operating system has preempted the application. In other words, FCP is on hold until the operating system is done doing whatever it needs to do.

Generally, you'll get your computer back after a short period of time.

If you've waited a couple of minutes and things don't seem to be changing, you may need to force quit Final Cut in order to get the computer to stop focusing on it's own problems and start focusing on what's really important -- you.

To force quit an application, type Command-Option-Escape (or go to the Blue Apple menu and select "Force Quit.")

If Final Cut Pro is listed in red text, it means that it's crashed and your only option is to select it and click "Force Quit." If it isn't in red text, it probably isn't crashed, and that if you wait longer it will probably come back. But, if you're impatient, you might as well click Force Quit anyway.

Sometimes, you'll need to Force Quit twice in order to get an application to fully quit.

If you force quit Final Cut, just restart it. However, if you force quit the Finder, I've found it better to restart the computer.

CRASH LOG TIP (OS X 10.2.x only)

Sometimes you can get a better picture of what's causing your computer to crash by turning on crash logs and letting your Mac tell you when things are about to, um, go west.

To set up a crash log:

  • Open Applications->Utilities->Console
  • Don't type anything
  • Open Console preferences
  • Click the Crash tab
  • Turn on both check boxes

In some cases, the Console will send you a message just before you crash, giving you time to save your work. Not always, though.

THOUGHTS ON OS X 10.3 (Panther)

Panther is a different animal (pun intended) from Jaguar and implements a variety of changes in how disk directories are kept.

One of the biggest is File Journaling. Ed Note: -Read Larry's article "File Journaling Explained-

In an effort to improve recovery from a crash, when disk directories may have become corrupted, the operating system writes a transaction file to the disk every time it writes a file; either new or with changes.

Consequently, after a crash, the operating system looks to see if this journal file exists and, if it does, it rebuilds the directories based on updated information from the journal.

This is, essentially, excellent news. It means that for normal data use, crashes no longer destroy the directories the way the could in OS X 10.2.x. Journaling is excellent for servers as well, because it more completely protects your data in the event of a server crash.

However, the problem is that a journaled disk is slower than a non-journaled disk, which has significant implications for us media types. Furthermore, when journaling is turned on, the FSCK trick we learned earlier doesn't work.

Journaling is turned on by default under OS X 10.3, so don't expect FSCK to work on your 10.3 boot disk.

So, here's the scoop. To give yourself maximum performance with maximum protection, leaving journaling turned on for your boot disk and never worry about running FSCK again.

Journaling is controlled using Disk Utility. To turn Journaling on (the default) or off (better for media drives) without reformatting, select your drive and go to File->Disable Journaling (or ->Enable Journaling) in Disk Utility. Or, when you reformat, simply select whether you want Journaling on or off before reformatting.

"SAFE BOOT" -- Another way to fix problems

A new feature in OS X 10.2 and 10.3 is Safe Boot. According to Apple:

"A Safe Boot is a special way to start Mac OS X 10.2 or later when troubleshooting. Safe Mode is the state Mac OS X is in after a Safe Boot. Starting up into Safe Mode does three things to simplify the startup and operation of your computer:

* It forces a directory check of the startup (boot) volume.
* It loads only required kernel extensions (some of the items in /System/Library/Extensions).
* It runs only Apple-installed startup items (some of the items in /Library/Startup Items and /System/Library/Startup items - and different than login items).

Taken together, these changes can work around issues caused by software or directory damage on the startup volume."

Of the greatest interest to me is that it forces a directory check (i.e. FSCK) of the startup volume, without needing to mess with Unix code in single user mode.

However, launching into Safe Boot can take awhile, because while that spinning gear is spinning, the OS is verifying and, if necessary, fixing your boot volume. This can take several minutes on a large, reasonably full hard drive.

Starting up in Safe Boot is easy -- just restart your computer and hold down the Shift key when you here the chime. Keep holding down the Shift key until the Safe Mode screen appears.



FINAL THOUGHTS

In closing, here are four thoughts that can help keep you out of trouble:

1) Rebuild Permissions often.

2) If your Mac takes longer than 30 seconds to shut down, you may have potential disk directory problems that need to be addressed immediately before it leads to more crashes.

3) Don't rush to upgrade FCP or the OS -- if your system is working now, leave it alone. Your goal is to edit, not spend your life chasing problems.

4) OS X 10.3 has significantly changed how the file system works. Be sure to check with your hard disk and interface card vendors to see if any updates are necessary.

The Mac isn't an unstable platform. Given a little preventative maintenance, you can be up far more than you are down. So, rebuild your permissions and keep on editing.

copyright©Larry Jordan 2003

Larry Jordan is an Apple-Certified Trainer in Digital Media with over 25 years experience as an on-location and studio director and editor with network, local market and corporate credits. Based in Los Angeles, he's a member of both the Directors Guild and Producers Guild. Mr. Jordan has also been recognized as one of the Top 100 Corporate Producers in America. He's been using Macintosh computers since January 24, 1984, and Final Cut since version 1.0.

This article first appeared on lafcpug and is reprinted here with permission.
All screen captures and textual references are the property and trademark of their creators/owners/publishers.

[Top]