Home » Learning Curve » Developers Workshop » One Year with Lion
One Year with Lion (2)Year Two might be better.
CUPERTINO (Rixstep) — Apple's OS X 10.7 Lion was introduced one year ago next week. It's been a bumpy ride. Lion's successor is due out within days. Let's hope for something a bit better.
'10.8?'
With all the woes befalling 10.7 Vista, the prudent move was to calmly wait for the successor. Tragedies like Microsoft's and now Apple's seem to have become a staple of the industry. Once Apple announced 10.8 for release a mere year after 10.7 (remember when Avie T told everyone OS X releases wouldn't happen as often anymore?) it became obvious the move was indeed prudent.
But a quick look at the wasteland of the king of the jungle won't hurt. Not much anyway. Or that at any rate was the idea.
'Scroll Bar Arrows'
Once the gesturing works the right way, there's no turning back. A flick of the wrist gets you anywhere you want to go. Making it all the more difficult to use fossilised machines from other platforms.
But the new scrolling and scroll bars have a disadvantage: they make precision scrolling a makeshift operation. How do you scroll one line at a time? Accurately? Precisely? The scroll bar arrows are gone and visually they have no given place in the new setup. Quite a few third party engineers hit the roof. The lack of scroll bar arrows does slow them down. And an option to let them return would have been polite. But it wouldn't have been 'Apple'.
'Preview'
There's probably no handier system app in OS X than Preview. Preview makes most of Adobe obsolete. It trims, it resizes, it crops - excellently. Better and better all the time. At least up until 10.7. When things really take a wrong turn into outer space.
Apple have announced they'll be reverting some of the 'features' of Preview and similar apps for 10.8, but the world will have to wait and see.
Of particular concern to the engineers in Cupertino seems to have been the risk third party technologies - in particular those stellar specimens from Adobe - might somehow compromise the Rock Solid Foundation™. And the apprehension is justified: if there's one company who seem bent on staying out of date - and dangerously so - it's Warnock's empire.
What to do? Don't risk a system attack through a seemingly innocuous PDF - sandbox the app! But hold on a minute - even though OxCharlie already sends his greets and approval. What does this sandboxing entail?
Apple tried closing off ~/Library so you wouldn't easily get a peek inside but what essentially happens is this: the complete runtime environment of the sandboxed app is duplicated, and the app is only capable of modifying this copy. What you get is roughly this.
total 40
drwx------ 4 rixstep staff 136 Jul 12 05:56 .
drwx------ 4 rixstep staff 136 Jul 12 07:32 ..
-rwxr--r-- 1 rixstep staff 19256 Jul 12 05:56 Container.plist
drwx------ 10 rixstep staff 340 Jul 12 05:55 Data
com.apple.Preview/Data:
total 48
drwx------ 10 rixstep staff 340 Jul 12 05:55 .
drwx------ 4 rixstep staff 136 Jul 12 05:56 ..
lrwxr-xr-x 1 rixstep staff 31 Jul 12 05:55 .CFUserTextEncoding -> ../../../../.CFUserTextEncoding
lrwxr-xr-x 1 rixstep staff 19 Jul 12 05:55 Desktop -> ../../../../Desktop
drwx------ 2 rixstep staff 68 Jul 12 05:55 Documents
lrwxr-xr-x 1 rixstep staff 21 Jul 12 05:55 Downloads -> ../../../../Downloads
drwx------ 27 rixstep staff 918 Jul 12 05:56 Library
lrwxr-xr-x 1 rixstep staff 18 Jul 12 05:55 Movies -> ../../../../Movies
lrwxr-xr-x 1 rixstep staff 17 Jul 12 05:55 Music -> ../../../../Music
lrwxr-xr-x 1 rixstep staff 20 Jul 12 05:55 Pictures -> ../../../../Pictures
com.apple.Preview/Data/Documents:
total 0
drwx------ 2 rixstep staff 68 Jul 12 05:55 .
drwx------ 10 rixstep staff 340 Jul 12 05:55 ..
com.apple.Preview/Data/Library:
total 144
drwx------ 27 rixstep staff 918 Jul 12 05:56 .
drwx------ 10 rixstep staff 340 Jul 12 05:55 ..
drwx------ 3 rixstep staff 102 Jul 12 05:55 Application Scripts
drwx------ 4 rixstep staff 136 Jul 12 05:55 Application Support
lrwxr-xr-x 1 rixstep staff 17 Jul 12 05:55 Audio -> ../../../../Audio
drwx------@ 2 rixstep staff 68 Jul 12 05:56 Autosave Information
drwx------ 3 rixstep staff 102 Jul 12 05:56 Caches
lrwxr-xr-x 1 rixstep staff 21 Jul 12 05:55 Calendars -> ../../../../Calendars
lrwxr-xr-x 1 rixstep staff 24 Jul 12 05:55 ColorPickers -> ../../../../ColorPickers
lrwxr-xr-x 1 rixstep staff 21 Jul 12 05:55 ColorSync -> ../../../../ColorSync
lrwxr-xr-x 1 rixstep staff 18 Jul 12 05:55 Colors -> ../../../../Colors
lrwxr-xr-x 1 rixstep staff 22 Jul 12 05:55 Components -> ../../../../Components
lrwxr-xr-x 1 rixstep staff 24 Jul 12 05:55 Compositions -> ../../../../Compositions
lrwxr-xr-x 1 rixstep staff 21 Jul 12 05:55 Favorites -> ../../../../Favorites
lrwxr-xr-x 1 rixstep staff 27 Jul 12 05:55 FontCollections -> ../../../../FontCollections
lrwxr-xr-x 1 rixstep staff 17 Jul 12 05:55 Fonts -> ../../../../Fonts
lrwxr-xr-x 1 rixstep staff 25 Jul 12 05:55 Input Methods -> ../../../../Input Methods
lrwxr-xr-x 1 rixstep staff 23 Jul 12 05:55 KeyBindings -> ../../../../KeyBindings
lrwxr-xr-x 1 rixstep staff 28 Jul 12 05:55 Keyboard Layouts -> ../../../../Keyboard Layouts
lrwxr-xr-x 1 rixstep staff 21 Jul 12 05:55 Keychains -> ../../../../Keychains
drwx------ 2 rixstep staff 68 Jul 12 05:55 Logs
lrwxr-xr-x 1 rixstep staff 16 Jul 12 05:55 Mail -> ../../../../Mail
drwx------ 28 rixstep staff 952 Jul 12 05:58 Preferences
lrwxr-xr-x 1 rixstep staff 21 Jul 12 05:55 QuickLook -> ../../../../QuickLook
drwx------ 2 rixstep staff 68 Jul 12 05:58 Saved Application State
lrwxr-xr-x 1 rixstep staff 18 Jul 12 05:55 Sounds -> ../../../../Sounds
lrwxr-xr-x 1 rixstep staff 20 Jul 12 05:55 Spelling -> ../../../../Spelling
com.apple.Preview/Data/Library/Application Scripts:
total 8
drwx------ 3 rixstep staff 102 Jul 12 05:55 .
drwx------ 27 rixstep staff 918 Jul 12 05:56 ..
lrwxr-xr-x 1 rixstep staff 52 Jul 12 05:55 com.apple.Preview -> ../../../../../Application Scripts/com.apple.Preview
com.apple.Preview/Data/Library/Application Support:
total 16
drwx------ 4 rixstep staff 136 Jul 12 05:55 .
drwx------ 27 rixstep staff 918 Jul 12 05:56 ..
lrwxr-xr-x 1 rixstep staff 46 Jul 12 05:55 AddressBook -> ../../../../../Application Support/AddressBook
lrwxr-xr-x 1 rixstep staff 41 Jul 12 05:55 iCloud -> ../../../../../Application Support/iCloud
com.apple.Preview/Data/Library/Autosave Information:
total 0
drwx------@ 2 rixstep staff 68 Jul 12 05:56 .
drwx------ 27 rixstep staff 918 Jul 12 05:56 ..
com.apple.Preview/Data/Library/Caches:
total 0
drwx------ 3 rixstep staff 102 Jul 12 05:56 .
drwx------ 27 rixstep staff 918 Jul 12 05:56 ..
drwxr-xr-x@ 3 rixstep staff 102 Jul 12 05:56 com.apple.Preview
com.apple.Preview/Data/Library/Caches/com.apple.Preview:
total 0
drwxr-xr-x@ 3 rixstep staff 102 Jul 12 05:56 .
drwx------ 3 rixstep staff 102 Jul 12 05:56 ..
drwxr-xr-x@ 4 rixstep staff 136 Jul 12 05:56 com.apple.opencl
com.apple.Preview/Data/Library/Caches/com.apple.Preview/com.apple.opencl:
total 136
drwxr-xr-x@ 4 rixstep staff 136 Jul 12 05:56 .
drwxr-xr-x@ 3 rixstep staff 102 Jul 12 05:56 ..
-rw-r--r--@ 1 rixstep staff 65536 Jul 12 05:57 com.apple.ocl.64.data
-rw-r--r--@ 1 rixstep staff 920 Jul 12 05:57 com.apple.ocl.64.maps
com.apple.Preview/Data/Library/Logs:
total 0
drwx------ 2 rixstep staff 68 Jul 12 05:55 .
drwx------ 27 rixstep staff 918 Jul 12 05:56 ..
com.apple.Preview/Data/Library/Preferences:
total 192
drwx------ 28 rixstep staff 952 Jul 12 05:58 .
drwx------ 27 rixstep staff 918 Jul 12 05:56 ..
lrwxr-xr-x 1 rixstep staff 51 Jul 12 05:55 .GlobalPreferences.plist -> ../../../../../Preferences/.GlobalPreferences.plist
lrwxr-xr-x 1 rixstep staff 54 Jul 12 05:55 com.apple.AddressBook.plist -> ../../../../../Preferences/com.apple.AddressBook.plist
lrwxr-xr-x 1 rixstep staff 57 Jul 12 05:55 com.apple.LaunchServices.plist -> ../../../../../Preferences/com.apple.LaunchServices.plist
lrwxr-xr-x 1 rixstep staff 60 Jul 12 05:55 com.apple.MultitouchSupport.plist -> ../../../../../Preferences/com.apple.MultitouchSupport.plist
lrwxr-xr-x 1 rixstep staff 67 Jul 12 05:55 com.apple.Preview.LSSharedFileList.plist -> ../../../../../Preferences/com.apple.Preview.LSSharedFileList.plist
-rw-------@ 1 rixstep staff 93 Jul 12 05:58 com.apple.Preview.bookmarks.plist
-rwxr-xr-x@ 1 rixstep staff 0 Jul 12 05:58 com.apple.Preview.bookmarks.plist.lockfile
-rw-------@ 1 rixstep staff 155 Jul 12 05:57 com.apple.Preview.plist
-rwxr-xr-x@ 1 rixstep staff 0 Jul 12 05:57 com.apple.Preview.plist.lockfile
lrwxr-xr-x 1 rixstep staff 64 Jul 12 05:55 com.apple.ServicesMenu.Services.plist -> ../../../../../Preferences/com.apple.ServicesMenu.Services.plist
lrwxr-xr-x 1 rixstep staff 80 Jul 12 05:55 com.apple.driver.AppleBluetoothMultitouch.mouse.plist -> ../../../../../Preferences/com.apple.driver.AppleBluetoothMultitouch.mouse.plist
lrwxr-xr-x 1 rixstep staff 83 Jul 12 05:55 com.apple.driver.AppleBluetoothMultitouch.trackpad.plist -> ../../../../../Preferences/com.apple.driver.AppleBluetoothMultitouch.trackpad.plist
lrwxr-xr-x 1 rixstep staff 63 Jul 12 05:55 com.apple.driver.AppleHIDMouse.plist -> ../../../../../Preferences/com.apple.driver.AppleHIDMouse.plist
lrwxr-xr-x 1 rixstep staff 54 Jul 12 05:55 com.apple.iWork.Pages.plist -> ../../../../../Preferences/com.apple.iWork.Pages.plist
lrwxr-xr-x 1 rixstep staff 57 Jul 12 05:55 com.apple.inputmethodkit.plist -> ../../../../../Preferences/com.apple.inputmethodkit.plist
lrwxr-xr-x 1 rixstep staff 49 Jul 12 05:55 com.apple.opengl.plist -> ../../../../../Preferences/com.apple.opengl.plist
lrwxr-xr-x 1 rixstep staff 51 Jul 12 05:55 com.apple.security.plist -> ../../../../../Preferences/com.apple.security.plist
lrwxr-xr-x 1 rixstep staff 58 Jul 12 05:55 com.apple.security_common.plist -> ../../../../../Preferences/com.apple.security_common.plist
lrwxr-xr-x 1 rixstep staff 73 Jul 12 05:55 com.apple.speech.synthesis.general.prefs.plist -> ../../../../../Preferences/com.apple.speech.synthesis.general.prefs.plist
lrwxr-xr-x 1 rixstep staff 61 Jul 12 05:55 com.apple.speech.voice.prefs.plist -> ../../../../../Preferences/com.apple.speech.voice.prefs.plist
lrwxr-xr-x 1 rixstep staff 58 Jul 12 05:55 com.apple.symbolichotkeys.plist -> ../../../../../Preferences/com.apple.symbolichotkeys.plist
lrwxr-xr-x 1 rixstep staff 54 Jul 12 05:55 com.apple.systemsound.plist -> ../../../../../Preferences/com.apple.systemsound.plist
lrwxr-xr-x 1 rixstep staff 58 Jul 12 05:55 com.apple.universalaccess.plist -> ../../../../../Preferences/com.apple.universalaccess.plist
lrwxr-xr-x 1 rixstep staff 50 Jul 12 05:55 com.nvidia.OpenGL.plist -> ../../../../../Preferences/com.nvidia.OpenGL.plist
lrwxr-xr-x 1 rixstep staff 55 Jul 12 05:55 org.cups.PrintingPrefs.plist -> ../../../../../Preferences/org.cups.PrintingPrefs.plist
lrwxr-xr-x 1 rixstep staff 36 Jul 12 05:55 pbs.plist -> ../../../../../Preferences/pbs.plist
com.apple.Preview/Data/Library/Saved Application State:
total 0
drwx------ 2 rixstep staff 68 Jul 12 05:58 .
drwx------ 27 rixstep staff 918 Jul 12 05:56 ..
Note that there are a lot of unwieldy symlinks in there. That's where the app is actually allowed to venture outside its 'walled garden'.
But what happens if you don't want this walled garden? What happens if you say 'hey this is Unix, and I am not stupid, and no corrupt PDF is going to own me anyway' - what happens then?
You can try but you won't get far. Preview has its XPCServices module and it expects its sandbox to be up and running before it completes its own initialisation.
And if the sandbox isn't ready?
This thing happens over and over again. It can happen if you completely close off the Containers directory, or it can happen simply because the XPCServices were too sluggish to get it ready in time. Either way, the Apple's engineers weren't ready for it.

Process: Preview [19215]
Path: /Applications/Preview.app/Contents/MacOS/Preview
Identifier: com.apple.Preview
Version: 5.5.2 (719.25)
Build Info: Preview-719025000000000~8
Code Type: X86-64 (Native)
Parent Process: launchd [124]
Date/Time: 2012-07-11 14:01:56.236 +0200
OS Version: Mac OS X 10.7.4 (11E53)
Report Version: 9
Interval Since Last Report: 143136 sec
Crashes Since Last Report: -4
Per-App Interval Since Last Report: 36498 sec
Per-App Crashes Since Last Report: 1
Anonymous UUID: D54EF5D4-4959-49A8-A77E-194579D275F6
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Application Specific Information:
dyld: launch, running initializers
/usr/lib/libSystem.B.dylib
xpchelper reply message validation: sandbox creation failed: 1002
Container object initialization failed: The operation couldn't be completed. (Cocoa error 13.)
Application Specific Signatures:
sandbox creation failed: 1002
Process: Preview [27289]
Path: /Applications/Preview.app/Contents/MacOS/Preview
Identifier: Preview
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: launchd [124]
Date/Time: 2012-07-11 15:35:29.148 +0200
OS Version: Mac OS X 10.7.4 (11E53)
Report Version: 9
Interval Since Last Report: 148755 sec
Crashes Since Last Report: -1
Per-App Crashes Since Last Report: 1
Anonymous UUID: D54EF5D4-4959-49A8-A77E-194579D275F6
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Application Specific Information:
dyld: launch, running initializers
/usr/lib/libSystem.B.dylib
xpchelper reply message validation: sandbox creation failed: 1002
Container object initialization failed: The operation couldn't be completed. (Cocoa error 13.)
Application Specific Signatures:
sandbox creation failed: 1002
Process: Preview [3305]
Path: /Applications/Preview.app/Contents/MacOS/Preview
Identifier: com.apple.Preview
Version: 5.5.2 (719.25)
Build Info: Preview-719025000000000~8
Code Type: X86-64 (Native)
Parent Process: launchd [129]
Date/Time: 2012-07-11 15:56:28.647 +0200
OS Version: Mac OS X 10.7.4 (11E53)
Report Version: 9
Interval Since Last Report: 149487 sec
Per-App Interval Since Last Report: 36522 sec
Per-App Crashes Since Last Report: 2
Anonymous UUID: D54EF5D4-4959-49A8-A77E-194579D275F6
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Application Specific Information:
dyld: launch, running initializers
/usr/lib/libSystem.B.dylib
xpchelper reply message validation: sandbox creation failed: 1002
Container object initialization failed: The operation couldn't be completed. (Cocoa error 13.)
Application Specific Signatures:
sandbox creation failed: 1002
Process: Preview [3343]
Path: /Applications/Preview.app/Contents/MacOS/Preview
Identifier: com.apple.Preview
Version: 5.5.2 (719.25)
Build Info: Preview-719025000000000~8
Code Type: X86-64 (Native)
Parent Process: launchd [129]
Date/Time: 2012-07-11 15:59:26.884 +0200
OS Version: Mac OS X 10.7.4 (11E53)
Report Version: 9
Interval Since Last Report: 149660 sec
Crashes Since Last Report: 1
Per-App Interval Since Last Report: 36570 sec
Per-App Crashes Since Last Report: 3
Anonymous UUID: D54EF5D4-4959-49A8-A77E-194579D275F6
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Application Specific Information:
dyld: launch, running initializers
/usr/lib/libSystem.B.dylib
xpchelper reply message validation: sandbox creation failed: 1002
Container object initialization failed: The operation couldn't be completed. (Cocoa error 13.)
Application Specific Signatures:
sandbox creation failed: 1002
Process: Preview [3437]
Path: /Applications/Preview.app/Contents/MacOS/Preview
Identifier: com.apple.Preview
Version: 5.5.2 (719.25)
Build Info: Preview-719025000000000~8
Code Type: X86-64 (Native)
Parent Process: launchd [119]
Date/Time: 2012-07-12 05:29:32.102 +0200
OS Version: Mac OS X 10.7.4 (11E53)
Report Version: 9
Interval Since Last Report: 159822 sec
Crashes Since Last Report: -7
Per-App Interval Since Last Report: 36577 sec
Per-App Crashes Since Last Report: 1
Anonymous UUID: D54EF5D4-4959-49A8-A77E-194579D275F6
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Application Specific Information:
dyld: launch, running initializers
/usr/lib/libSystem.B.dylib
xpchelper reply message validation: sandbox creation failed: 1002
Container object initialization failed: The operation couldn't be completed. (Cocoa error 13.)
Application Specific Signatures:
sandbox creation failed: 1002
Process: Preview [5097]
Path: /Applications/Preview.app/Contents/MacOS/Preview
Identifier: com.apple.Preview
Version: 5.5.2 (719.25)
Build Info: Preview-719025000000000~8
Code Type: X86-64 (Native)
Parent Process: launchd [119]
Date/Time: 2012-07-12 05:55:53.501 +0200
OS Version: Mac OS X 10.7.4 (11E53)
Report Version: 9
Interval Since Last Report: 161404 sec
Crashes Since Last Report: -7
Per-App Interval Since Last Report: 36586 sec
Per-App Crashes Since Last Report: 1
Anonymous UUID: D54EF5D4-4959-49A8-A77E-194579D275F6
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Application Specific Information:
dyld: launch, running initializers
/usr/lib/libSystem.B.dylib
xpchelper reply message validation: sandbox creation failed: 1002
Container object initialization failed: The operation couldn't be completed. (Cocoa error 13.)
Application Specific Signatures:
sandbox creation failed: 1002
Process: Preview [5241]
Path: /Applications/Preview.app/Contents/MacOS/Preview
Identifier: com.apple.Preview
Version: 5.5.2 (719.25)
Build Info: Preview-719025000000000~8
Code Type: X86-64 (Native)
Parent Process: launchd [119]
Date/Time: 2012-07-12 07:44:10.345 +0200
OS Version: Mac OS X 10.7.4 (11E53)
Report Version: 9
Interval Since Last Report: 167898 sec
Crashes Since Last Report: -6
Per-App Interval Since Last Report: 36667 sec
Per-App Crashes Since Last Report: 2
Anonymous UUID: D54EF5D4-4959-49A8-A77E-194579D275F6
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Application Specific Information:
dyld: launch, running initializers
/usr/lib/libSystem.B.dylib
xpchelper reply message validation: sandbox creation failed: 1002
Container object initialization failed: The operation couldn't be completed. (Cocoa error 13.)
Application Specific Signatures:
sandbox creation failed: 1002
One | Two | Three | Four | Five | Six
See Also Industry Watch: 10.7 Roars Industry Watch: Lion: Kernel Panics Industry Watch: Lion: 'Ten Days After' Industry Watch: Got Lion? Get OWNED? Industry Watch: Apple Lion Security Update
The Technological: OS X Lion 10.7.2 WTF? The Technological: Lion's Bulging Scroll Bars
Developers Workshop: Apple Rooting Their Own Systems? Developers Workshop: Fireworks in Apple's /usr/bin/clang
9,737 files (97,370 data cells) in 0.143 seconds. Beat that, Apple.
|