Fix & Avoid CUI Crashes with Lion OS X 10.7.3 Update

| Ted Landau's User Friendly View

Almost immediately after Apple released the Mac OS X 10.7.3 Update last week, users began reporting a serious and anxiety-provoking consequence of the install: Every (or almost every) application on a Lion drive would crash upon launch, rendering the computer virtually useless. The bug was not limited to any particular Mac model. Restarting the computer either normally or via a Safe Boot had no effect; the crashes remained.

Before you break out in a cold sweat as you contemplate updating your Mac (assuming you have not already done so), here’s the good news: Most initial updates went smoothly. Even so, Apple has implemented a change that should prevent further instances of the bug. Finally, should you find yourself among the unlucky minority, there is a relatively simple fix for the crashes.

CUI error

The specifics of the 10.7.3 Update crashes were unusual, bordering on the bizarre. As described in a thread in Apple Support Communities: After the “unexpectedly quit” dialog appears, buttons and scrollbars don’t have their usual appearance but a “CUI CUI CUI ????” background graphic instead.

CUI?

The CUI error graphic in a dialog

Very odd. I can’t recall any prior report of this CUI error. What exactly is CUI anyway? I’m not sure. A CUI folder exists in the Ruby framework, located in the /System/Library folder. Examining the folder yielded no clues as to the source of the CUI error. A Google search offered little more: a few posts cited CUI as a “Ruby interpreter” that was apparently involved in problems with MySQL on Windows PCs.

Back on the Mac, Console logs occasionally included “CUIElement::LoadFromArtFile” error messages. I was able to find references to this error as far back as 2009 in a case of iPhoto crashing. But again, this shed no further light on the nature of the error.

Ultimately, I gave up trying to understand the problem and turned my attention to the much more practical matter of fixing it.

The fix is in

It looked like everyone who initially had this symptom had used Software Update to install 10.7.3. The basic fix, which seemed to work for almost everyone, was to reinstall Mac OS X 10.7.3 Update by downloading and running the 10.7.3 Client Combo Update. Apparently, the Software Update delta package was not overwriting certain folders that the combo update did overwrite; this difference accounted for the error.

This was all fine except for one crucial detail: If every app of your drive is crashing on launch, how can you acquire and run the Combo Update? There are multiple answers to this key question, depending upon: your technical skill (some solutions require using Terminal), the extent of the CUI error (in some cases, crashes did not occur when obtaining the combo update), and whether you have a second bootable drive available. The above-cited Apple thread offers posts with details on all of the various options. The ones on page 24 are an especially good summary of your choices.

The simplest solution, if it works, is to restart your Mac from the Recovery HD partition (installed as part of OS X Lion) and select to Reinstall Mac OS X. To do so, hold down Command-R at startup and select “Reinstall Mac OS X” from the options that appear. This install duplicates the benefits of the Combo Updater. There is no need to erase the drive or restore from a backup.

Apple is aware of the CUI bug. Their current work-around has been to remove the delta update from Software Update and replace it with the combo update instead.

Software Update currently offers Mac OS X Update 10.7.3 Combined 

This means that, if you have not yet selected to install 10.7.3, Software Update should now be safe to use. If the idea still makes you nervous, you can download the combo updater instead.

Avoid future OS X Update problems

With every OS X update, there is a chance that a problem like the CUI error will occur. You can’t prevent bugs that originate from Apple. Regardless, you can drastically reduce the odds of becoming a victim of such bugs. At the very least, you can minimize the hassle of recovering from such problems. Just follow these five (5) rules:

1. Wait. Don’t be an early adopter. Everyone who delayed updating until today is almost certain to have bypassed the CUI bug. In general, wait a few days after any OS X update is released. Check websites for reported problems. Install the update only after online reports give a green light. 

If you have more than one Mac, update first on the less critical one. If and only if that is successful, move on to the more critical machine.

2. Use the combo updater. Use the combo updater to install a new release, especially if you’re going to ignore rule #1. As in the case of the CUI error, the combo updater can avoid problems that could otherwise occur with the Software Update method.

3. Have an alternative bootable drive. If you didn’t manage to avoid an update problem, you want to be ready to fix it. Most update problems are not as serious as the CUI error; you will still be able to access your drive and perform such actions as reinstalling the update. However, for those times when a bug hoses your drive to the extent that a normal startup is no longer possible, you’ll want to be able to boot from another drive. This makes it possible to perform any recommended fixes.

The alternate drive can be a bootable flash drive, an external hard drive, or another Mac (which you can connect to the problem Mac via Target Disk Mode). Even a bootable Install DVD (if your Mac came with one) can do the job. Just make sure you have something ready to go before disaster strikes.

Lion’s Recovery HD partition should be sufficient as an alternate drive option in most cases. But I wouldn’t want to depend upon it as the only option. For starters, there’s a chance that your drive is so hosed that even the Recovery partition no longer works.

4. Have a backup of your data. No matter what problems befall your drive, total panic is avoidable if you have a backup of your critical data. For example, use Time Machine or create a mirrored bootable backup via software such as SuperDuper. Whatever you do, do something.

5. Run Disk Utility’s First Aid. The logic here is that you may have a currently non-symptomatic problem with your drive. Installing an Update could convert this into a much more serious symptomatic problem. To hopefully avoid this, run both Repair Disk and Repair Disk Permissions prior to installing the update.

I consider this last rule optional (especially the permissions fix). I never do this myself and have so far never suffered any consequences. But it can’t hurt.

Follow these rules and you can update without fear.

Comments

furbies

I’ve not trusted the Delta updates for some years now.

Unless the OS is at x.0.0, I always go for the Combo updater.

iJack

I use Software Update only as a notifier of an available update.  I always download updates from Apple, and I keep all of the last two versions of each, and on both the internal and an external drive.

The OS Combo updates are especially important to me, as I use them from time to time as my last-ditch repair tool, when all of my other utilities fail me.  It almost always works, and usually returns some lost speed to my Mac.

furbies

I use Software Update only as a notifier of an available update.? I always download updates from Apple, and I keep all of the last two versions of each, and on both the internal and an external drive.

Thats similar to the procedure I follow.
It’s saved my bacon more than once.

And it saves on having to locate & re-download an update if I ever decide to rebuild a Mac….

iJack

And it saves on having to locate & re-download an update if I ever decide to rebuild a Mac?.

Exactly so.

Log-in to comment