5

I'm getting weird crash in Xcode 12 simulator with signal SIGABRT right after launch. it is happening on released version of Xcode 12.0 and Xcode 12.0.1 I have tried with newest beta 12.2.

App is working fine on device.

I can not trace much due to less log. following is stack.

Thread 1

dyld`__abort_with_payload:
0x1194b0ed4 <+0>:  movl   $0x2000209, %eax          ; imm = 0x2000209 
0x1194b0ed9 <+5>:  movq   %rcx, %r10
0x1194b0edc <+8>:  syscall 
->  0x1194b0ede <+10>: jae    0x1194b0ee8               ; <+20>
0x1194b0ee0 <+12>: movq   %rax, %rdi
0x1194b0ee3 <+15>: jmp    0x1194af408               ; cerror_nocancel
0x1194b0ee8 <+20>: retq   
0x1194b0ee9 <+21>: nop    
0x1194b0eea <+22>: nop    
0x1194b0eeb <+23>: nop    

enter image description here

enter image description here

EDIT After Adding exception break point, getting following console output

dyld: Library not loaded: /usr/lib/libnfshared.dylib
Referenced from: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreNFC.framework/CoreNFC
Reason: no suitable image found.  Did find:
/usr/lib/libnfshared.dylib: mach-o, but not built for platform iOS-sim

In my project i'm not using CoreNFC. it is not linked and not being used by pods, this i've already checked

Arslan Asim
  • 1,232
  • 1
  • 11
  • 29
  • 1
    This of any help? https://stackoverflow.com/questions/42027601/dyld-abort-with-payload-with-no-error-message – skaak Sep 28 '20 at 11:42
  • Yes thread sanitizer if OFF Malloc is OFF Zombies are OFF not using custom framework only Pods and some system frameworks (adSupport, CoreTelephony and iAd) – Arslan Asim Sep 28 '20 at 11:54
  • You have entitlements for all these (ad, telephone..)? Also, are you using any arguments to run it? – skaak Sep 28 '20 at 12:23
  • most of them are for firebase, and no special argument for them – Arslan Asim Sep 28 '20 at 12:32
  • 1
    Did you enable exception breakpoints in Xcode? – koen Sep 28 '20 at 13:19
  • You can try the usual - delete ```~/Library/Developer/Xcode/Derived data```. Also make a backup of ```Developer``` and delete e.g. the ```Caches``` in Core Simulators and anything that looks remotely temporary and give it another go. – skaak Sep 28 '20 at 13:57
  • @koen i have updated my question after adding breakpoint exception – Arslan Asim Sep 28 '20 at 14:16
  • 1
    @ArslanAsim Looks like a bug in iOS 14: https://openradar.appspot.com/FB8699389 – koen Sep 28 '20 at 14:19
  • imo just in case try pod update – roadRunner Sep 28 '20 at 15:24

4 Answers4

4

My solution: Manually copied libnfshared.dylib from Xcode 12 beta 6 to: Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/

This works for me.

If you want to avoid the hassle of downloading 11.25GB Xcode 12.2 beta for a single file. I have the file to share.

You may execute the following command to download and place it inside the Xcode package:

sudo curl https://storage.googleapis.com/mobile-simulator-build/libnfshared.dylib -o /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libnfshared.dylib

Hope it helps

Arif Fikri Abas
  • 836
  • 5
  • 9
1

I had the same issue where the simulator for iOS14 would crash right after launch. The older iOS simulators and deploying to a device with iOS14 worked fine.

My solution: Manually copied libnfshared.dylib from Xcode 12 beta 6 to:

Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/

as it appears this file is missing in release version.

Dilan
  • 2,610
  • 7
  • 23
  • 33
Napp
  • 11
  • 1
0

I hope this helps:

delete "VALID_ARCHS" from Target/App/Build Settings.

If you have Bitrise builds than I suggest adding: arm64 x86_64 to it. Because for some reason Bitrise currently will crash if "VALID_ARCHS" is removed.

Example:

enter image description here

koen
  • 5,383
  • 7
  • 50
  • 89
Milos
  • 21
  • 5
0

This issues gets solved with

Xcode-12.2 beta 2. Released on September 29, 2020.

waiting for stable version to confirm if things work as expected as working in beta.

Arslan Asim
  • 1,232
  • 1
  • 11
  • 29