I'm trying to use the Thread Sanitizer in Xcode 11.2.1 but whenever the app launches (just a single view app from Xcode's template, nothing added) it hits __abort_with_payload:
libsystem_kernel.dylib`__abort_with_payload:
0x7fff51b73be0 <+0>: movl $0x2000209, %eax ; imm = 0x2000209
0x7fff51b73be5 <+5>: movq %rcx, %r10
0x7fff51b73be8 <+8>: syscall
-> 0x7fff51b73bea <+10>: jae 0x7fff51b73bf4 ; <+20>
0x7fff51b73bec <+12>: movq %rax, %rdi
0x7fff51b73bef <+15>: jmp 0x7fff51b54a89 ; cerror_nocancel
0x7fff51b73bf4 <+20>: retq
0x7fff51b73bf5 <+21>: nop
0x7fff51b73bf6 <+22>: nop
0x7fff51b73bf7 <+23>: nop
None of Apple's docs or other people's guides to using the Thread Sanitizer say you need to do anything more than tick the box in the scheme's settings but for me that doesn't work :(
Printing out $arg5 gives
pthread_t was corrupted
which doesn't sound great!
This is on Catalina 10.15.2 using the iPhone 11 Pro Max simulator
This issue has been fixed as of Xcode 11.3.1, thanks to vandzi for pointing it out!
I also faced similar issue, Thread Sanitizer was ON in scheme settings and turning that off solved the problem in my case.
Looks like it is connected to this tsan commit
https://github.com/llvm/llvm-project/commit/f9a706a36ae5dcb87b0b6649d0c80e989400f48e
https://reviews.llvm.org/D71559
I need to run thread sanitizer very badly, so
built the newest llvm with
> mkdir workspace/
> git clone https://github.com/llvm/llvm-project.git
> cd llvm-project; mkdir build; cd build
>cmake -G Ninja ../llvm -DLLVM_ENABLE_PROJECTS='clang;clang-tools-extra;libcxx;libcxxabi;libunwind;lldb;compiler-rt;lld;polly' -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=$HOME/llvm -DLLVM_ENABLE_DUMP=ON # not everything is needed though here
>ninja
and replaced
~/Library/Developer/CoreSimulator/Devices/C0E36E0C-C22A-426E-80B7-557164B2FBD3/data/Containers/Bundle/Application/D6D4D9DB-4C26-4FA0-8363-5CA03A47B6C0/Spotify.app/Frameworks/libclang_rt.tsan_iossim_dynamic.dylib
with the newly built lib from
/workspace/llvm-project/build/lib/clang/10.0.0/lib/darwin/libclang_rt.tsan_iossim_dynamic.dylib # 10.0.0 is the previos version some artifact of my bulding, it had the fixed revision ^
the app seem to load in the simulator and not crash with
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00007fff523d5bea __abort_with_payload + 10
1 libsystem_kernel.dylib 0x00007fff523d74f3 abort_with_payload_wrapper_internal + 80
2 libsystem_kernel.dylib 0x00007fff523d74a3 abort_with_reason + 19
3 libsystem_pthread.dylib 0x00007fff52469974 pthread_self.cold.1 + 24
4 libsystem_pthread.dylib 0x00007fff52462fe3 pthread_self + 34
5 libclang_rt.tsan_iossim_dynamic.dylib 0x000000013b59816b __tsan::cur_thread() + 11
6 libclang_rt.tsan_iossim_dynamic.dylib 0x000000013b56d985 wrap_sysctlbyname + 37
7 libsystem_sim_kernel.dylib 0x00007fff52470331 assert_simulator_supported_host + 44
8 libSystem.B.dylib 0x00007fff4ff167c1 libSystem_initializer + 78
9 dyld_sim 0x000000013b3a73a7 ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 517
any more! my app seems to show the first screen but freeze afterwards, so not sure its completely workable.
hope that helps
Related
I am trying to debug with ASAN. (address sanitizer)
But I have met a segmentation fault.
I try to debug with lldb.
It seems that there is a bug in ASAN that causes the error.
Process 71756 stopped
* thread #1, stop reason = EXC_BAD_ACCESS (code=1, address=0x180000000)
frame #0: 0x0000000100bfa5f4 libclang_rt.asan_osx_dynamic.dylib`__sanitizer::get_dyld_hdr() + 184
libclang_rt.asan_osx_dynamic.dylib`__sanitizer::get_dyld_hdr:
-> 0x100bfa5f4 <+184>: ldr w9, [x0]
0x100bfa5f8 <+188>: cmp w21, w9, lsr #1
0x100bfa5fc <+192>: b.ne 0x100bfa5b0 ; <+116>
0x100bfa600 <+196>: ldr w9, [x0, #0xc]
The gcc and g++ version are AppleClang 12.0.5.12050022 for arm64(M1).
Note. ASAN works good until I upgraded the osx to 13.2.1.
Can I upgrade or downgrade my gcc/g++ version to fix it? and how?
I am using iPhone 8 (Version 13.3.1), and a MacBook air (Version 10.14.6). I have set 'team' to personal team in Xcode > general. Then I click the button on the top left corner to run it.
I received error like this even I have deleted the apps that I have installed before on the same phone with the sample apple id:
Details
Unable to install "Runner"
Domain: com.apple.dtdevicekit
Code: -402620383
--
App installation failed
Domain: com.apple.dtdevicekit
Code: -402620383
Failure Reason: The maximum number of apps for free development profiles has been reached.
User Info: {
DVTRadarComponentKey = 487927;
"com.apple.dtdevicekit.stacktrace" = (
0 DTDeviceKitBase 0x00000001263006e7 DTDKCreateNSError + 109
1 DTDeviceKitBase 0x0000000126300de9 DTDK_AMDErrorToNSError + 792
2 DTDeviceKitBase 0x000000012634056a __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 164
3 DVTFoundation 0x000000010ba8dc12 DVTInvokeWithStrongOwnership + 73
4 DTDeviceKitBase 0x0000000126340301 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1589
5 IDEiOSSupportCore 0x00000001261c8a25 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.352 + 4523
6 DVTFoundation 0x000000010bbbee7a __DVT_CALLING_CLIENT_BLOCK__ + 7
7 DVTFoundation 0x000000010bbc0552 __DVTDispatchAsync_block_invoke + 809
8 libdispatch.dylib 0x00007fff6734f5f8 _dispatch_call_block_and_release + 12
9 libdispatch.dylib 0x00007fff6735063d _dispatch_client_callout + 8
10 libdispatch.dylib 0x00007fff673568e0 _dispatch_lane_serial_drain + 602
11 libdispatch.dylib 0x00007fff67357396 _dispatch_lane_invoke + 385
12 libdispatch.dylib 0x00007fff6735f6ed _dispatch_workloop_worker_thread + 598
13 libsystem_pthread.dylib 0x00007fff67590611 _pthread_wqthread + 421
14 libsystem_pthread.dylib 0x00007fff675903fd start_wqthread + 13
);
}
--
In Xcode go to Window → Devices under Installed Apps delete some apps, and afterwords you could run your app
Removing the app from the device worked for me.
I fixed it by renaming the bundle ID
The bundle ID it was complaining about had been used in the past on my phone, with a different app, coming from a different TestFlight account and build.
Unable to Install Runner
It's because of the debug App Quantity in your real device. Max 3 apps are able to run from Xcode to your real device for real debugging for further more just uninstall the app. Try to uninstall some of your test app then try to install the new debug app from xcode .Now it will work. Thanks.
Goto Xcode
Runner > General,
Under Identity, Change "Bundle Identifier",
Run app to the real device,
If you want, change the "Bundle Identifier" back to the original one.
I did all 5 steps , and worked perfectly , thanks to Rens.
I simply changed the build number, it worked just fine.
possible ways: (maybe one of them works)
change the build number.
change the team.
delete the app from the phone or from installed apps in window ->
Devices
unplug the usb cable.
change the bundle identifier.
https://stackoverflow.com/a/73597887/13059465
Try changing the lightning cable for another, use a certificate for more security, that's what I did and it worked
I too faced this issue. Removing the app from Window > Devices and Simulators didn't do it for me. What worked was renaming the bundle id. This allowed me to run it again, but I was also able to then rename it back to the original and get it to run.
Deleting the app from the device and removing any uncommitted git changes to the ios files worked for me.
I'm trying to upload my app that uses ARKit (Unity build) to iTunes Connect for TestFlight distribution. While both exporting and uploading to app store processes from Xcode -> Organizer I see crash on "Stripping extended attributes for APPNAME.app".
I checked all configuration of bitcode and symbols on/off, signing automatically, manually. Deployment target of my project is iOS 10, as 11 cannot be set.
I also tried following steps from simillar thread (https://forums.developer.apple.com/thread/83219) and added App Store 1024 icon to Images.xcassets.
Any ideas why Xcode is crashing?
Screenshot from just before the crash:
Crash report:
Process: Xcode [10862]
Path: /Applications/Xcode-9b6.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 9.0 (13238.4)
Build Info: IDEFrameworks-13238004000000000~11
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [10862]
User ID: 501
Date/Time: 2017-09-10 14:56:10.196 +0100
OS Version: Mac OS X 10.12.6 (16G29)
Report Version: 12
Anonymous UUID: FD8390BC-9E7B-969D-15A2-22A8DBBD050D
Time Awake Since Boot: 16000 seconds
System Integrity Protection: enabled
Crashed Thread: 17 Dispatch queue: ConcurrentQueue: -[IDEDistributionPackagingStepViewController viewDidInstall]_block_invoke
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000020
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [0]
VM Regions Near 0x20:
-->
__TEXT 0000000103625000-0000000103627000 [ 8K] r-x/rwx SM=COW /Applications/Xcode-9b6.app/Contents/MacOS/Xcode
Application Specific Information:
ProductBuildVersion: 9M214v
Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fffbb90634a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fffbb905797 mach_msg + 55
2 com.apple.CoreFoundation 0x00007fffa6037434 __CFRunLoopServiceMachPort + 212
3 com.apple.CoreFoundation 0x00007fffa60368c1 __CFRunLoopRun + 1361
4 com.apple.CoreFoundation 0x00007fffa6036114 CFRunLoopRunSpecific + 420
5 com.apple.HIToolbox 0x00007fffa5596ebc RunCurrentEventLoopInMode + 240
6 com.apple.HIToolbox 0x00007fffa5596cf1 ReceiveNextEventCommon + 432
7 com.apple.HIToolbox 0x00007fffa5596b26 _BlockUntilNextEventMatchingListInModeWithFilter + 71
8 com.apple.AppKit 0x00007fffa3b2fa54 _DPSNextEvent + 1120
9 com.apple.AppKit 0x00007fffa42ab7ee -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796
10 com.apple.dt.DVTKit 0x0000000103eb58be -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 390
11 com.apple.AppKit 0x00007fffa3b243db -[NSApplication run] + 926
12 com.apple.AppKit 0x00007fffa3aeee0e NSApplicationMain + 1237
13 libdyld.dylib 0x00007fffbb7df235 start + 1
Edit
Running xcodebuild (through fastlane gym) produces the following:
+ xcodebuild -exportArchive -exportOptionsPlist /var/folders/z1/m155xvnn42s7xl7hfw3_8w5w0000gn/T/gym_config20170912-61009-190kutb.plist -archivePath '/Users/wert/Library/Developer/Xcode/Archives/2017-09-12/towerar 2017-09-12 22.06.54.xcarchive' -exportPath /var/folders/z1/m155xvnn42s7xl7hfw3_8w5w0000gn/T/gym_output20170912-61009-42bo6w
2017-09-12 22:09:04.966 xcodebuild[62085:5372649] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/z1/m155xvnn42s7xl7hfw3_8w5w0000gn/T/Unity-iPhone_2017-09-12_22-09-04.966.xcdistributionlogs'.
2017-09-12 22:09:21.584 xcodebuild[62085:5372649] [MT] IDEDistribution: Step failed: <IDEDistributionPackagingStep: 0x7fc3c75f18b0>: <IDEDistributionPackagingStep: 0x7fc3c75f18b0>
2017-09-12 22:09:21.584 xcodebuild[62085:5372649] -[__NSCFString userInfo]: unrecognized selector sent to instance 0x7fc3c74d72f0
** INTERNAL ERROR: Uncaught exception **
Uncaught Exception: -[__NSCFString userInfo]: unrecognized selector sent to instance 0x7fc3c74d72f0
Stack:
0 __exceptionPreprocess (in CoreFoundation)
1 objc_exception_throw (in libobjc.A.dylib)
2 -[NSObject(NSObject) doesNotRecognizeSelector:] (in CoreFoundation)
3 ___forwarding___ (in CoreFoundation)
4 _CF_forwarding_prep_0 (in CoreFoundation)
5 __55-[Xcode3CommandLineBuildTool _distributeArchiveAndExit]_block_invoke (in Xcode3Core)
6 -[Xcode3CommandLineBuildTool _distributeArchiveAndExit] (in Xcode3Core)
7 -[Xcode3CommandLineBuildTool run] (in Xcode3Core)
8 0x0000000104d752af (in xcodebuild)
9 start (in libdyld.dylib)
I've had to uncheck all checkboxes and use manual managing signing, then it was possible to proceed in the wizard.
Does the xattr command line tool work? It's possible your python installation is damaged, or if you've replaced the installed xattr module then you may need to reinstall the system provided one.
I had been experiencing same frustating problem and it happen almost all day , Xcode 9 suddenly crashes in the middle of the archiving process, resulting in the same error report.
#dangercheng gave me insight about archive process in xcode 9, which is, it needs the xattr command , therefore I go check xattr command in my macbook and somehow xattr doesn't work. From the verbose message, it reveals that the error is related to file permission owned by folders/files inside /Library/Python/2.7 . Somehow a user other than root has no right to write (w/ 2) on those files/folders.
From above facts I concluded that I need to change file permission in this case chmod -R 775 and apply it to all folders and its content on /Library/Python/2.7. After that my xattr is running well and my Archive process in Xcode 9 is running smoothly, experiencing no crash.
Thanks for all of you guys
In my case, it was due to permissions issues with python.
When running xattr from terminal I had the following error:
IOError: [Errno 13] Permission denied: '/Users/cb/Library/Python/2.7/lib/python/site-packages/zc.buildout-1.5.2-py2.7.egg-info/namespace_packages.txt'
Taking a look inside the /Users/cb/Library folder I found that all of the folders were owned by cb:staff (my currently logged in user and group) but the /Users/cb/Library/Python folder was owned by root:wheel
Running the following will eliminate the error:
sudo chown -R $USER:$(id -g) /Users/$USER/Library/Python
After the sudo chown you can run xattr again to verify. There should be no errors or other output from the xattr command.
Probably not your fault but do file a bug with Apple. But when the Xcode uploader fails for any reason try the good ol' Application Loader:
Xcode.app/Contents/Applications/Application Loader.app
run 'xattr' command in mac terminal,if result like bellow:
python version 2.7.10 can't run /usr/bin/xattr. Try the alternative(s):
/usr/bin/xattr-2.6 (uses python 2.6)
/usr/bin/xattr-2.7 (uses python 2.7)
Run "man python" for more information about multiple version support in
Mac OS X.
you should creat a new soft link to '/usr/bin/xattr-2.7'
run bellow commands:
cd /usr/bin
sudo rm xattr
sudo ln -s xattr-2.7 xattr
this solve my problem!
I solved my problem following #dangercheng's answer.
I upgraded my python to python 3.6 two days ago.And it seems that the xattr command was executed under python3.6 .
However, when I execute xattr in terminal.
File "/usr/bin/xattr", line 31
continue
^
TabError: inconsistent use of tabs and spaces in indentation
Something bad happened!
So I edit the source code of xattr.
for i in g:
vers = vpat.search(i)
if vers is None:
continue //add 4 space
sys.stderr.write("%s (uses python %s)\n" % (i, i[vers.start():vers.end()]))
n = 1
```
python version 3.6.3 can't run /usr/bin/xattr. Try the alternative(s):
(Error: no alternatives found)
Run "man python" for more information about multiple version support in
Mac OS X.
```
another error!
I guess the xattr command should judge the version of python and execute suitable codes and the code of python3 contains some error.
Finally I change the default version of python to python2.7 and replace softlink of xattr to xattr-2.7. It works.
Attention, when xcodebuild execute xattr command the path of python was "/usr/bin/python".
The path "/usr/bin/python" was softlink too.
So, I resolved this problem following this step.
Step1:
cd /usr/bin
Step2:
sudo rm python
sudo ln -s python2.7 python
Step3:
sudo rm xattr
sudo ln -s xattr-2.7 xattr
If you can not found python2.7 under "/usr/bin", please find another suitable python path such as "/Library/Frameworks/Python.framework/Versions/2.7" etc.
I am developing an Application for iOS and I changed nothing in the Application. But at a restart of my Mac, Xcode crashes every time.
Don't know if this is important, but my spotlight can't find any applications and also when I open the finder and using the shortcut cmd + shift + H I see a white window.
Xcode isn't starting anymore and throws this error:
Process: Xcode [1346]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 7.2 (9548)
Build Info: IDEFrameworks-9548000000000000~7
App Item ID: 497799835
App External ID: 814662604
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [1346]
Date/Time: 2015-12-24 11:01:44.753 +0100
OS Version: Mac OS X 10.11.2 (15C50)
Report Version: 11
Time Awake Since Boot: 4000 seconds
System Integrity Protection: enabled
Crashed Thread: 4 Dispatch queue: DVTFilePathEventWatcher - event queue
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
VM Regions Near 0:
-->
__TEXT 0000000108a5a000-0000000108a5e000 [ 16K] r-x/rwx SM=COW /Applications/Xcode.app/Contents/MacOS/Xcode
Application Specific Information:
ProductBuildVersion: 7C68
Thread 0:: Dispatch queue: DVTFilePath cache derivation lock for key DVTFilePathKey_SortedDirectoryContents
0 libobjc.A.dylib 0x00007fff8df27aa0 search_method_list(method_list_t const*, objc_selector*) + 2
1 libobjc.A.dylib 0x00007fff8df28d76 lookUpImpOrForward + 413
2 libobjc.A.dylib 0x00007fff8df22591 objc_msgSend + 209
3 com.apple.dt.DVTFoundation 0x0000000108a741f8 -[DVTFileSystemVNode addCachedEntriesFromDictionary:] + 215
4 com.apple.dt.DVTFoundation 0x0000000108bd2e2d __33-[DVTFilePath cachedValueForKey:]_block_invoke549 + 245
5 libdispatch.dylib 0x00007fff9fcbd33f _dispatch_client_callout + 8
6 libdispatch.dylib 0x00007fff9fcbe926 _dispatch_barrier_sync_f_invoke + 74
7 com.apple.dt.DVTFoundation 0x0000000108cd1005 DVTDispatchBarrierSync + 62
8 com.apple.dt.DVTFoundation 0x0000000108a69627 -[DVTDispatchLock performLockedBlock:] + 116
9 com.apple.dt.DVTFoundation 0x0000000108a715b0 -[DVTFilePath cachedValueForKey:] + 1802
10 com.apple.dt.DVTFoundation 0x0000000108a70afc -[DVTToolchainRegistry scanSearchPathAndRegisterToolchains:] + 563
11 com.apple.dt.IDEFoundation 0x00000001097d1a66 IDEInitialize + 655
12 com.apple.dt.IDEKit 0x0000000109ecdf7c -[IDEApplicationController applicationWillFinishLaunching:] + 708
13 com.apple.CoreFoundation 0x00007fffa18fa70c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
14 com.apple.CoreFoundation 0x00007fffa18fa67f ___CFXRegistrationPost_block_invoke + 63
15 com.apple.CoreFoundation 0x00007fffa18f9d47 _CFXRegistrationPost + 407
16 com.apple.CoreFoundation 0x00007fffa18f9ab2 ___CFXNotificationPost_block_invoke + 50
17 com.apple.CoreFoundation 0x00007fffa18f3d42 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1922
18 com.apple.CoreFoundation 0x00007fffa17e2145 _CFXNotificationPost + 693
19 com.apple.Foundation 0x00007fff9ef36921 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
20 com.apple.dt.DVTFoundation 0x0000000108c6cf55 -[NSNotificationCenter(DVTNSNotificationCenterAdditions) _dvt_postNotificationName:object:userInfo:] + 698
21 com.apple.AppKit 0x00007fff9db412c2 -[NSApplication finishLaunching] + 354
22 com.apple.dt.DVTKit 0x0000000109275f62 -[DVTApplication finishLaunching] + 149
23 com.apple.AppKit 0x00007fff9db40e05 -[NSApplication run] + 231
24 com.apple.AppKit 0x00007fff9dac3520 NSApplicationMain + 1176
25 libdyld.dylib 0x00007fff9a8605ad start + 1
Could this be an issue due to Permissions conflicts?
ANSWER:
After I changed the rights from my OSX-Drive to everyone can write&read. Everything worked. But I knew that this is a temporary solution, so I decided to reinstall my MAC and everything was fine.
Delete ~/Library/Developer/Xcode/DerivedData by running this command in terminal:
rm -r ~/Library/Developer/XCode/DerivedData
If that doesnt work, At this point and with given info, all I could recommend to delete and reinstall Xcode.
If the delete of ~/Library/Developer/Xcode/DerivedData is not working for you, try this steps to remove xcuserdata:
open a Finder window and navigate to your project
right-click on the .xcodeproj OR .xcworkspace file
select Show Package Contents
a new window appears
delete a folder called xcuserdata
I had one where i selected a file that was quite large which crashed xcode when it tried to parse it. Then when i restarted it somehow it got set to load that file on start. Only way i saw was to temporarily rename the file that it was trying to load at start so it would load empty.
I'll recommend deleting xcuserdata: folder from both of your .xcodeproj & .xcworkspace file (open with Show Package Contents) and try again.
I hope this will work.
Ensure there are no issues with your SPM packages/dependencies.
This is simply another suggestion. I just spent some time debugging this on a fairly popular open source project.
My Xcode first crashed when I updated a SPM package, so I was fairly certain it was an issue with one of the future commits in that package or a SPM bug. I subscribe to Occam's Razor, so I started going through the changes in the commits.
After some time, I found a duplicate Swift Playground page delcaration in contents.xcplayground. I removed that single line, pushed the PR, and everything worked fine after that.
To be able to reopen the project:
Open project.pbxproj in your code editor of choice (e.g. vi, nano, emacs, atom, code).
Remove the offending package or packages from the /* Begin XCRemoteSwiftPackageReference section */ and /* Begin XCSwiftPackageProductDependency section */ sections.
Save the file and Xcode should now open.
Again, if your Xcode is immediately crashing when opening a project (and you last updated/auto-updated a SPM package) go through your packages.
I have an app that I am distributing using AdHoc - that works fine (using testflightapp.com) on most devices, however I have two older ones which run iOS 5.1.1 and iOS 4.3 respectively and on those I just can't get the app installed.
The app has been built using XCode 5.1.1 and deployment target of iOS 4.3.
The installation goes about 75% through (i.e. icon shows on home screen, progress indicator starts running up to about 75%), then an error message is shown: "Unable to Download Application" - ... could not be downloaded at this time.
Checking the logs I found crash of /usr/libexec/installd - see below.
Btw the same happens when I try to install the app via iTunes, so it's not related to Testflight.
Any hints on why this happens and how I can fix it would be highly appreciated.
Patrick
Incident Identifier: 55B1E8CF-AF1B-4E2E-9445-9001A1E9181F
CrashReporter Key: 2c384f06f249d55ddbb948525a8bef5b10aef496
Hardware Model: iPad1,1
Process: installd [301]
Path: /usr/libexec/installd
Identifier: installd
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2014-08-15 19:45:40.965 +1000
OS Version: iPhone OS 5.1.1 (9B206)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000
Crashed Thread: 2
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_kernel.dylib 0x35b5c004 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x35b5c1fa mach_msg + 50
2 CoreFoundation 0x35aca3ec __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x35ac90ea __CFRunLoopRun + 818
4 CoreFoundation 0x35a4c49e CFRunLoopRunSpecific + 294
5 CoreFoundation 0x35a4c366 CFRunLoopRunInMode + 98
6 installd 0x00070bb8 0x64000 + 52152
7 installd 0x00065856 0x64000 + 6230
8 installd 0x0006528c 0x64000 + 4748
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x35b5c3a8 kevent + 24
1 libdispatch.dylib 0x33e8fea4 _dispatch_mgr_invoke + 708
2 libdispatch.dylib 0x33e8fbc2 _dispatch_mgr_thread + 30
Thread 2 name: Dispatch queue: com.apple.root.default-priority
Thread 2 Crashed:
0 libsystem_c.dylib 0x34d0c884 strlen + 12
1 libstdc++.6.dylib 0x37151e2c std::string::operator+=(char const*) + 8
2 libmis.dylib 0x32d7c43e ___lldb_unnamed_function268$$libmis.dylib + 226
3 libmis.dylib 0x32d728bc ___lldb_unnamed_function40$$libmis.dylib + 112
4 libmis.dylib 0x32d784ee ___lldb_unnamed_function174$$libmis.dylib + 298
5 libmis.dylib 0x32d747aa ___lldb_unnamed_function81$$libmis.dylib + 166
6 libmis.dylib 0x32d71b2a ___lldb_unnamed_function22$$libmis.dylib + 14
7 libmis.dylib 0x32d71fa2 MISValidateSignatureAndCopyInfo + 266
8 installd 0x00067b56 0x64000 + 15190
It is not possible to install one build that includes arm64 architecture on devices running iOS 5.x other than using the App Store.
So to install development or ad-hoc builds on a device with iOS 5.x or 4.x you need to make an extra build that does not include 64 bit architecture.
When submitting to the App Store, the build can contain all architectures, and Apple will modify the binary on their end so the problem won't occur in that case.