phlux.us

Blog about hardware and software projects by phluxus

Archive for July 2011

XCode: symbolicatecrash doesn’t work with apps with spaces in the name.

leave a comment »

Apple has allowed spaces in application names since about 1984. How long ago was that? Exactly.

I had to debug some crashreports from an iOS app with a space in the name. Now, there are some handy websites out there that describe this process, notably  http://www.anoshkin.net/blog/2008/09/09/iphone-crash-logs/

But that didn’t work, because the script fails with an error in a find command. Say our app is called “Apple Soup.app” Somewhere in the output is the error message:

Running find “/Users/…/Library/Developer/Xcode/Archives/2011-07-02/appletest 02-07-11 15.22.xcarchive/Products” -name Apple Soup.app
find: Soup.app: unknown option Did not find executable for dsym
## Warning: Can’t find any unstripped binary that matches version of /var/mobile/Applications/ … etc. 

I’m using a copy of symbolicatecrash from

/Applications/Utilities/iPhone Configuration Utility.app/Contents/Frameworks/
DTDeviceKit.framework/Versions/A/Resources/symbolicatecrash”

but the bug is also in

/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/
DTDeviceKit.framework/Versions/A/Resources/symbolicatecrash
(XCode 4.0.2)

Conclusion: The program fails to find an application binary if there is a name in the application.

Luckily, there is a terribly easy fix:

Just replace the following find command in the symbolicatecrash perl script (line 251)

my $cmd = “find \”$archive_path/Products\” -name $exec_name.app”;

with

my $cmd = “find \”$archive_path/Products\” -name \”$exec_name.app\””;

Written by axello

2011-07-05 at 14:15

Posted in Cocoa, devtools