Symbol not found: _OBJC_CLASS_$_NSURL error when launching on Mac OS X Leopard
I've just gotten a report from a user that a new build of my app crashes on his machine when he tries to launch it. The crash report is:
Process: MyApp [222] Path: /Applications/MyApp.app/Contents/MacOS/MyApp Identifi开发者_如何转开发er: com.MyCompany.MyAppAppAndImporter Version: ??? (???) Code Type: X86-64 (Native) Parent Process: launchd [155]
Date/Time: 2010-09-04 14:27:21.668 -0400 OS Version: Mac OS X 10.5.8 (9L30) Report Version: 6 Anonymous UUID: 8F8B3FDF-6F95-463B-AC8F-170775D224D2
Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0000000000000002, 0x0000000000000000 Crashed Thread: 0
Dyld Error Message: Symbol not found: _OBJC_CLASS_$_NSURL Referenced from: /Applications/MyApp.app/Contents/MacOS/MyApp Expected in: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
The user is running OS X 10.5.8 on a 3.06 GHz Core 2 Duo Macbook Pro. I am able to launch the app just fine under Tiger and Leopard on my PowerBook G4 and on Snow Leopard on my iMac. At least one user is able to launch the app just fine under Snow Leopard. From my (admittedly small) sample set, I think the problem is specific to 64-bit machines running Leopard.
My project is compiled with the 10.6 SDK with the Deployment Target set to 10.4.
I recompiled using the 10.5 SDK and the problem goes away. My best guess is that it's related to NSURL moving from Foundation to CoreFoundation in Snow Leopard (see http://www.cocoabuilder.com/archive/cocoa/280239-nsurl-crash.html?q=%22nsurl+crash%22#280239). The thing I don't understand is why it would work fine on my (32-bit) PowerBook G4, but not on the user's 64-bit Intel Mac even though both are running Leopard.
Any thoughts on how to fix this or exactly why it's happening?
It should launch on a 64 bit leopard machine. Given the class name mangling, that does look like 64 bit.
Have the user send you a System Profiler report.
I never found a real solution to this. Due to a dependency on on libcrypto.0.9.7, I simply build release versions of the app this question was about on 10.5.
精彩评论