Aperture import crash - Adobe Camera Raw metadata problem

(AKA Aperture on Mac OS 10.5 Leopard crashes upon importing certain images) I spent the last two days collecting, anonymizing, and organizing over 1,200 images submitted by various folks to a photography contest that I run. Like last year, my plan was to use Aperture to actually look at and shuffle around the images, but when I attempted to import them by reference, Aperture crashed. When I re-launched Aperture, only a certain number of images had been imported, and successive imports of the remaining images continued to cause Aperture to crash. I finally isolated some of the images that Aperture refused to import without crashing, and after saving and re-saving them in various combinations, I realized that it was metadata that was causing the crash.

Here's what I discovered after playing around with some of the files:

  1. crashing images were taken with cameras from multiple vendors
  2. files that crashed Aperture had metadata from Adobe Photoshop
  3. stripping IPTC and EXIF using ImageMagick's mogrify command* had no effect on the file's ability to crash Aperture
  4. stripping all XMP profiles using ImageMagick's mogrify command** fixed the import problem
  5. re-saving the original file in Photo Mechanic fixed the import problem
  6. re-saving the original file in Photoshop did not fix the problem

* command: "mogrify +profile iptc image.jpg" and "mogrify +profile exif image.jpg" ** command: "mogrify +profile xmp image.jpg"

Interesting: removing all XMP profiles from the file fixed the import crash. But re-saving it in Photo Mechanic also fixed the problem. Photo Mechanic preserves some XMP data, but clearly removes the offending bits.

I compared the metadata in the Photoshop-saved file vs. the Photo Mechanic-saved file, and found this:

The only three profiles that Photo Mechanic removed were:

  1. XMP Media Management Properties
  2. http://ns.adobe.com/camera-raw-saved-settings/1.0/
  3. http://ns.adobe.com/lightroom/1.0/

So one by one, I created files that only contained the metadata profiles for each of the potentially offensive bits above. The culprit? camera-raw-saved-settings/1.0/!

Creating a 1x1-pixel image in Photoshop and replacing the metadata with an XMP file containing the profile data for http://ns.adobe.com/camera-raw-saved-settings/1.0/ results in an image that crashes Aperture upon import. It's important to note that the problematic metadata fragment came from one of the bad files itself -- I saved the metadata and deleted everything out of the XMP file except for the camera-raw part. I couldn't create problematic metadata myself using any of the software I have, including my install of Photoshop / Camera Raw.

You can download all of the files (23KB) to test this out for yourself. The archive consists of the following files:

  • crashaperture-cameraraw-only.jpg - an image file that will crash Aperture upon import. It's just a 1x1-pixel image that contains the offending metadata frament.
  • crashaperture-cameraraw-only.xmp - the offending metadata fragment
  • original images/ - dummy images containing the full metadata of the original crashing images

Also, here's the Apple crash report.

I'm going to submit this to Aperture support. I just thought I'd get the information out there for teh Google to index.

UPDATE: Here's a video showing how to create a crashing image using the XMP file in the downloadable archive:

[flashvideo filename=videos/echeng-aperturecrash.flv width=512 height=384 floatingcontrols=true /]

I didn't realize my voice had such a strong nasal component! I blame the microphone. :)

Below, I've inlined the offending metadata. When I append this to any image by using Photoshop's File Info dialog box, the resulting image crashes Aperture upon import.

<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 4.1-c036 46.276720, Mon Feb 19 2007 22:13:43 "> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:crss="http://ns.adobe.com/camera-raw-saved-settings/1.0/" xmlns:crs="http://ns.adobe.com/camera-raw-settings/1.0/"> <crss:SavedSettings> <rdf:Bag> <rdf:li rdf:parseType="Resource"> <crss:Name>Import</crss:Name> <crss:Type>Snapshot</crss:Type> <crss:Parameters rdf:parseType="Resource"> <crs:WhiteBalance>As Shot</crs:WhiteBalance> <crs:IncrementalTemperature>0</crs:IncrementalTemperature> <crs:IncrementalTint>0</crs:IncrementalTint> <crs:Exposure>0.00</crs:Exposure> <crs:Shadows>0</crs:Shadows> <crs:Brightness>0</crs:Brightness> <crs:Contrast>0</crs:Contrast> <crs:Saturation>0</crs:Saturation> <crs:Sharpness>0</crs:Sharpness> <crs:LuminanceSmoothing>0</crs:LuminanceSmoothing> <crs:ColorNoiseReduction>0</crs:ColorNoiseReduction> <crs:ChromaticAberrationR>0</crs:ChromaticAberrationR> <crs:ChromaticAberrationB>0</crs:ChromaticAberrationB> <crs:VignetteAmount>0</crs:VignetteAmount> <crs:ShadowTint>0</crs:ShadowTint> <crs:RedHue>0</crs:RedHue> <crs:RedSaturation>0</crs:RedSaturation> <crs:GreenHue>0</crs:GreenHue> <crs:GreenSaturation>0</crs:GreenSaturation> <crs:BlueHue>0</crs:BlueHue> <crs:BlueSaturation>0</crs:BlueSaturation> <crs:FillLight>0</crs:FillLight> <crs:Vibrance>0</crs:Vibrance> <crs:HighlightRecovery>0</crs:HighlightRecovery> <crs:Clarity>0</crs:Clarity> <crs:Defringe>0</crs:Defringe> <crs:HueAdjustmentRed>0</crs:HueAdjustmentRed> <crs:HueAdjustmentOrange>0</crs:HueAdjustmentOrange> <crs:HueAdjustmentYellow>0</crs:HueAdjustmentYellow> <crs:HueAdjustmentGreen>0</crs:HueAdjustmentGreen> <crs:HueAdjustmentAqua>0</crs:HueAdjustmentAqua> <crs:HueAdjustmentBlue>0</crs:HueAdjustmentBlue> <crs:HueAdjustmentPurple>0</crs:HueAdjustmentPurple> <crs:HueAdjustmentMagenta>0</crs:HueAdjustmentMagenta> <crs:SaturationAdjustmentRed>0</crs:SaturationAdjustmentRed> <crs:SaturationAdjustmentOrange>0</crs:SaturationAdjustmentOrange> <crs:SaturationAdjustmentYellow>0</crs:SaturationAdjustmentYellow> <crs:SaturationAdjustmentGreen>0</crs:SaturationAdjustmentGreen> <crs:SaturationAdjustmentAqua>0</crs:SaturationAdjustmentAqua> <crs:SaturationAdjustmentBlue>0</crs:SaturationAdjustmentBlue> <crs:SaturationAdjustmentPurple>0</crs:SaturationAdjustmentPurple> <crs:SaturationAdjustmentMagenta>0</crs:SaturationAdjustmentMagenta> <crs:LuminanceAdjustmentRed>0</crs:LuminanceAdjustmentRed> <crs:LuminanceAdjustmentOrange>0</crs:LuminanceAdjustmentOrange> <crs:LuminanceAdjustmentYellow>0</crs:LuminanceAdjustmentYellow> <crs:LuminanceAdjustmentGreen>0</crs:LuminanceAdjustmentGreen> <crs:LuminanceAdjustmentAqua>0</crs:LuminanceAdjustmentAqua> <crs:LuminanceAdjustmentBlue>0</crs:LuminanceAdjustmentBlue> <crs:LuminanceAdjustmentPurple>0</crs:LuminanceAdjustmentPurple> <crs:LuminanceAdjustmentMagenta>0</crs:LuminanceAdjustmentMagenta> <crs:SplitToningShadowHue>0</crs:SplitToningShadowHue> <crs:SplitToningShadowSaturation>0</crs:SplitToningShadowSaturation> <crs:SplitToningHighlightHue>0</crs:SplitToningHighlightHue> <crs:SplitToningHighlightSaturation>0</crs:SplitToningHighlightSaturation> <crs:SplitToningBalance>0</crs:SplitToningBalance> <crs:ParametricShadows>0</crs:ParametricShadows> <crs:ParametricDarks>0</crs:ParametricDarks> <crs:ParametricLights>0</crs:ParametricLights> <crs:ParametricHighlights>0</crs:ParametricHighlights> <crs:ParametricShadowSplit>25</crs:ParametricShadowSplit> <crs:ParametricMidtoneSplit>50</crs:ParametricMidtoneSplit> <crs:ParametricHighlightSplit>75</crs:ParametricHighlightSplit> <crs:SharpenRadius>+1.0</crs:SharpenRadius> <crs:SharpenDetail>25</crs:SharpenDetail> <crs:SharpenEdgeMasking>0</crs:SharpenEdgeMasking> <crs:ConvertToGrayscale>False</crs:ConvertToGrayscale> <crs:ToneCurveName>Linear</crs:ToneCurveName> <crs:CameraProfile>Embedded</crs:CameraProfile> <crs:ToneCurve> <rdf:Seq> <rdf:li>0, 0</rdf:li> <rdf:li>255, 255</rdf:li> </rdf:Seq> </crs:ToneCurve> </crss:Parameters> </rdf:li> </rdf:Bag> </crss:SavedSettings> </rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket end="w"?>