Duplicate Objective-C classes in bundled frameworks
- 0 replies
- 4 views
- Translate
Description of Issue
- At every launch, the Objective-C runtime warns that several classes are implemented in two of Lightroom's bundled frameworks. Apple documents this as able to "cause spurious casting failures and mysterious crashes".
- The app bundle also contains a second, complete copy of WichitaFoundation (19 MB) inside AgUI.framework that is never loaded, and a category (NSException(ToString)) defined in both AgKernel and AgSubstrate, where which implementation wins is undefined and the runtime doesn't warn.
Step-by-step Reproduction Instructions
1. Launch Lightroom.
2. Open the first lines of:
~/Library/Containers/com.adobe.mas.lightroomCC/Data/Library/Application Support/Adobe/Lightroom CC/lrcc_console.log
3. Optional, without launching Lightroom (Xcode command line tools): list the Objective-C classes each framework defines and compare, e.g.
cd "/Applications/Adobe Lightroom.app/Contents/Frameworks"
xcrun dyld_info -arch arm64 -objc WichitaFoundation.agtoolkit/Versions/A/WichitaFoundation | grep "@interface"
xcrun dyld_info -arch arm64 -objc CameraRaw.lrtoolkit/Versions/A/CameraRaw | grep "@interface"
4. Compare the two WichitaFoundation copies and check which one AgUI links to:
dwarfdump --uuid WichitaFoundation.agtoolkit/Versions/A/WichitaFoundation AgUI.framework/Versions/A/Frameworks/WichitaFoundation.agtoolkit/Versions/A/WichitaFoundation
otool -L AgUI.framework/Versions/A/AgUI | grep WichitaFoundation
lsof -p $(pgrep -x "Adobe Lightroom") | grep WichitaFoundation
The Expected Result
- Each class is defined in exactly one framework, or namespaced per framework, with no runtime warnings
- Each category method is defined once
- The app bundle contains one copy of each framework
The Actual Result
- objc: Class SODSFileDecode is implemented in both …/WichitaFoundation.agtoolkit/…/WichitaFoundation and …/CameraRaw.lrtoolkit/…/CameraRaw. This may cause spurious casting failures and mysterious crashes. One of the duplicates must be removed or renamed.
- The same warning for _GPUOperator and _CPUOperator (WichitaFoundation and CameraRaw), and for VFExporterMessageDelegate, VFTools and VFExporter (CameraRaw and video_toolkit.agtoolkit).
- A static check of all 35 binaries in the bundle (xcrun dyld_info -objc) finds 37 classes or categories defined in more than one binary:
- the six above;
- NSException(ToString), a category in both AgKernel and AgSubstrate;
- 30 classes shared by Frameworks/WichitaFoundation.agtoolkit and a second copy at Frameworks/AgUI.framework/Versions/A/Frameworks/WichitaFoundation.agtoolkit (19 MB, same arm64 UUID A433F2B5-42A7-3B02-9151-9D9F13069C06). AgUI links to @executable_path/../Frameworks/WichitaFoundation.agtoolkit, and lsof on a running Lightroom shows only the main copy open, so the nested copy is never used.
System Details
- Lightroom 9.6 (Mac App Store), build 20260923-1659-a32d844, arm64
- macOS 27.0.1 (26A434), MacBook Pro 16" (MacBookPro18,2), Apple M1 Max, 64 GB RAM
- Cameras: Canon R5m2 and R6m3
- Library: 41,490 photos, 211 albums, 4,818 stacks; local library 78–85 GB (40 GB originals, 29 GB proxies, 12 GB previews); all proxies stored locally, photo cache limit 50 GB
- Working set: an 11,650-photo Canon CR3 shoot
