Thanks a lot Michael. I ran into ths same issue after Lion upgrade and was pulling out hairs to solve this problem. The corrupted iphoto library in /Users/<john-doe>/Pictures/iPhoto Library was the main reason the preference was stuck. I moved the iphoto library temporarily and got the system preferences working.
Console Errors for the corrupted iphoto DB
Jul 24 09:42:44 PulPulPulMacBook System Preferences[12015]: kCGErrorIllegalArgument: CGSDeviceCreate: Invalid window
Jul 24 09:42:44 PulPulPulMacBook System Preferences[12015]: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
Jul 24 09:42:44 PulPulPulMacBook System Preferences[12015]: Failed to create window context device
Jul 24 09:42:44 PulPulPulMacBook System Preferences[12015]: CGWindowContextCreate: failed to create window context delegate.
Jul 24 09:42:44 PulPulPulMacBook [0x0-0x146146].com.apple.systempreferences[12015]: Jul 24 09:42:44 SudhishMacBook.local System Preferences[12015] <Error>: Failed to create window context device
Jul 24 09:42:44 PulPulPulMacBook [0x0-0x146146].com.apple.systempreferences[12015]: Jul 24 09:42:44 SudhishMacBook.local System Preferences[12015] <Error>: CGWindowContextCreate: failed to create window context delegate.
Jul 24 09:42:44 PulPulPulMacBook System Preferences[12015]: _initWithWindowNumber: error creating graphics ctxt object for ctxt:0x16323, window:0x0
Jul 24 09:42:44 PulPulPulMacBook System Preferences[12015]: CGPixelAccessLock failed!
Jul 24 09:42:45 PulPulPulMacBook System Preferences[12015]: Can't open search index until its validated…