vim caught deadly signal SEGV - ruby-on-rails

While using vim with pathogen and rails.vim it sometimes crashes vim. This is my console log file for the crash. How can I prevent this from happening?
Process: vim [16620]
Path: /usr/bin/vim
Identifier: vim
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: zsh [961]
Date/Time: 2011-08-31 08:20:25.727 +0800
OS Version: Mac OS X 10.6.7 (10J869)
Report Version: 6
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: 0x000000000000000d, 0x0000000000000000
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 libSystem.B.dylib 0x00007fff832af5d6 __kill + 10
1 vim 0x0000000100118943 0x100000000 + 1149251
2 libSystem.B.dylib 0x00007fff832c166a _sigtramp + 26
3 vim 0x00000001000249a2 0x100000000 + 149922
4 vim 0x00000001000249ef 0x100000000 + 149999
5 vim 0x00000001000249ef 0x100000000 + 149999
6 vim 0x0000000100024a1c 0x100000000 + 150044
7 vim 0x00000001000249ef 0x100000000 + 149999
8 vim 0x000000010002554c 0x100000000 + 152908
9 vim 0x0000000100118b75 0x100000000 + 1149813
10 vim 0x000000010010c138 0x100000000 + 1098040
11 vim 0x0000000100069900 0x100000000 + 432384
12 vim 0x000000010006cf45 0x100000000 + 446277
13 vim 0x000000010006d1a3 0x100000000 + 446883
14 vim 0x000000010006d5d6 0x100000000 + 447958
15 vim 0x00000001000a475c 0x100000000 + 673628
16 vim 0x0000000100075bb8 0x100000000 + 482232
17 vim 0x0000000100077e22 0x100000000 + 491042
18 vim 0x0000000100000978 0x100000000 + 2424
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000002 rcx: 0x00000001001cdbc8 rdx: 0x0000000000000000
rdi: 0x00000000000040ec rsi: 0x000000000000000b rbp: 0x00000001001cdbe0 rsp: 0x00000001001cdbc8
r8: 0x0000000000000000 r9: 0x00007fff7073fbc0 r10: 0x00007fff832b1552 r11: 0x0000000000000206
r12: 0x0000000000000029 r13: 0x000000000000007c r14: 0x000000000000007c r15: 0x0000000000000044
rip: 0x00007fff832af5d6 rfl: 0x0000000000000206 cr2: 0x0000000101185000
Binary Images:
0x100000000 - 0x100155fef +vim ??? (???) <F8247F1F-4D43-963A-D218-3D0E8ECFF899> /usr/bin/vim
0x7fff5fc00000 - 0x7fff5fc3bdef dyld 132.1 (???) <B536F2F1-9DF1-3B6C-1C2C-9075EA219A06> /usr/lib/dyld
0x7fff83260000 - 0x7fff83421fff libSystem.B.dylib 125.2.10 (compatibility 1.0.0) <9BAEB2F2-B485-6349-E1AB-637FE12EE770> /usr/lib/libSystem.B.dylib
0x7fff85845000 - 0x7fff85849ff7 libmathCommon.A.dylib 315.0.0 (compatibility 1.0.0) <95718673-FEEE-B6ED-B127-BCDBDB60D4E5> /usr/lib/system/libmathCommon.A.dylib
0x7fff85dcb000 - 0x7fff85e0afef libncurses.5.4.dylib 5.4.0 (compatibility 5.4.0) <E1F34D53-3D62-78C0-CAD8-8AD22C110A9E> /usr/lib/libncurses.5.4.dylib
0x7fff87ca5000 - 0x7fff87d9dff7 libiconv.2.dylib 7.0.0 (compatibility 7.0.0) <E0683DF0-8180-58A2-BA49-511111D4F36E> /usr/lib/libiconv.2.dylib
0x7fffffe00000 - 0x7fffffe01fff libSystem.B.dylib ??? (???) <9BAEB2F2-B485-6349-E1AB-637FE12EE770> /usr/lib/libSystem.B.dylib

Ask brew to compile macvim with debugging flag set, then run it under a debugger so that when it crashes you can ask the debugger to print the stack trace so that you can see which source code line is trying to access deallocated memory area which causes the SIGSEGV exception.
If you managed to get it that far then see if you can fix the error and submit a patch to the vim-dev list and feel good about it for a week :) good luck!

Vim sometime will crash. If your ruby code are not well format.
process(:hello => 'world', :foo => 'bar')
You should not write as:
process(:hello => 'world',
:foo => 'bar')

In my case vim stopped working after mavericks installation. I tracked it down to an issue with rvm, which was also on my system. 'vim -u NONE' ran fine. There were many suggestions about recompiling command-T, a vim plugin, but doing so didn't fix the problem for me. I ended using 'rvm implode' to remove rvm altogether. Then 'brew uninstall vim && brew install vim'. This fixed vim, and also fixed macvim, which was not opening windows unlessed launched from the console with 'mvim'. Therefore, there is some incompatibility with mavericks and rvm, which causes problems with vim.

After hours of researching following different threads turns out there may be a ton of reasons causing vim to crash and getting that error message(not surprising!). But in my particular case after running it in verbose mode I realized there were stuff in my ~/.vimrc file that vim crashed because of. So very easily after removing my ~/.vimrc everything went back to normal and no more crashing. Just make sure you keep a back-up of it before removing in case you have customized your vim.

Related

React native app crash on ios when running release or debug

Here is the crash report:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: DYLD 1 Library missing
Library not loaded: #rpath/double-conversion.framework/double-conversion
Referenced from: <FC807FC8-F29C-3926-8FD2-B52AB0C43805> /Users/USER/Library/Developer/CoreSimulator/Devices/9DC328E5-38CB-4BAE-AA0F-E2976C0765E4/data/Containers/Bundle/Application/EFC99D36-68DA-47EB-A147-602CC1AE1B59/tekvetek_RN.app/tekvetek_RN
Reason: tried: '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/double-conversion.framework/double-conversion' (errno=2), '/usr/lib/swift/double-conversion.framework/double-conversion' (errno=2, no dyld cache), '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/double-conversion.framework/double-conversion' (errno=2), '/usr/lib/swift/double-conversion.framework/double-conversion' (errno=2, no dyld cache), '/Users/omerkocer/Libra
(terminated at launch; ignore backtrace)
Triggered by Thread: 0
Thread 0 Crashed:
0 ??? 0x1062d6940 ???
1 <translation info unavailable> 0x1063636fc ???
2 dyld 0x206696a72 abort_with_payload_wrapper_internal + 80
3 dyld 0x206696aa4 abort_with_payload + 9
4 dyld_sim 0x10ea79593 abort_with_payload + 26
5 dyld_sim 0x10ea26f1e dyld4::halt(char const*) + 375
6 dyld_sim 0x10ea24f75 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3928
7 dyld_sim 0x10ea251a0 _dyld_sim_prepare + 442
8 dyld 0x206640b78 dyld4::prepareSim(dyld4::RuntimeState&, char const*) + 1265
9 dyld 0x20663f70e dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 244
10 dyld 0x20663f4e4 start + 388
Thread 1:: com.apple.rosetta.exceptionserver
0 ??? 0x7ff7ffeed944 ???
1 ??? 0x7ff7fff061f0 ???
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000006 rbx: 0x000000000000010b rcx: 0x0000000000000001 rdx: 0x000000030efbe6c0
rdi: 0x000000200ea28d03 rsi: 0x000000030efbe390 rbp: 0x0000000000000000 rsp: 0x000000030efbe2c0
r8: 0x000000030efbe2c0 r9: 0x0000000000000000 r10: 0x000000000000010b r11: 0xfefefefefefefeff
r12: 0x000000000000010b r13: 0x000000030efbe6c0 r14: 0x0000000000000001 r15: 0x0000000000000006
rip: <unavailable> rfl: 0x0000000000000283
tmp0: 0xffffffffffffffff tmp1: 0x00000001062d6914 tmp2: 0x0000000206696a72
Binary Images:
0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
0x20663a000 - 0x2066a5fff dyld (*) <71febccd-d9dc-3599-9971-2b3407c588a8> /usr/lib/dyld
0x10ea23000 - 0x10ea82fff dyld_sim (*) <db2ea9eb-03d5-3b81-a6ce-26ec4dd81b07> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/dyld_sim
Error Formulating Crash Report:
dyld_process_snapshot_get_shared_cache failed
EOF
As I understand it crashes because it can't find the #rpath/double-conversion.framework/double-conversion library.
I tried to linked binary with libraries:
libDoubleConversion.a
double-conversion.xcframework
But still same.
P.S.
The app is running without crashes with npx react-native run-ios or in xcode after build. However npx react-native run-ios --configuration=debug or --configuration=release is crashing the app on launch with EXC_CRASH (SIGABRT).
PROJECT > TARGET > BUILD PHASES > Link Binary With Libraries
I changed this libraries status
libDoubleConversion.a
double-conversion.xcframework
required from optional.
This worked for me.

Could not run XCode 9.1 on MacOS 12

I am trying to migrate my Swift 3 code to Swift 4 to meet the requirement of Apple. I downloaded Xcode 9.1, renamed it to Xcode9.1.app, and moved it to the Applications.
I tried to open it as explained in the following link: How can I run Xcode 12.5.1 on Monterey?. But it quits.
The quitting message is:
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: Xcode [14762]
Path: /Applications/Xcode9.0.1.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 9.0.1 (13249)
Build Info: IDEFrameworks-13249000000000000~2 (9A1004)
Code Type: X86-64 (Native)
Parent Process: launchd [1]
User ID: 501
Date/Time: 2022-01-10 11:36:20.3726 -0600
OS Version: macOS 12.0.1 (21A559)
Report Version: 12
Bridge OS Version: 6.0 (19P549)
Anonymous UUID: A485806D-0882-7796-CC9C-BB31F6F3E237
Sleep/Wake UUID: 22979CA9-B8DA-4613-99F5-34DE333FABB8
Time Awake Since Boot: 570000 seconds
Time Since Wake: 7415 seconds
System Integrity Protection: enabled
Crashed Thread: 0
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace DYLD, Code 1 Library missing
Library not loaded: #rpath/XCTest.framework/Versions/A/XCTest
Referenced from: /Applications/Xcode9.0.1.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/DVTKit
Reason: tried: '/Applications/Xcode9.0.1.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/../../../../Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework/Versions/A/XCTest' (no such file), '/Applications/Xcode9.0.1.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/../../../XCTest.framework/Versions/A/XCTest' (no such file), '/Applications/Xcode9.0.1.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/../../../../Applications/Instruments.app/Contents/Frameworks/XCTest.framework/Versions/A/XCTest' (no such file), '/Applications/Xcode9.0.1.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/../../../../Frameworks/XCTest.framework/Versions/A/XCTest' (no such file), '/Applications/Xcode9.0.1.app/Contents/MacOS/../Frameworks/XCTest.framework/Versions/A/XCTest' (no such file), '/Applicat
(terminated at launch; ignore backtrace)
Application Specific Information:
Library not loaded: #rpath/XCTest.framework/Versions/A/XCTest
Referenced from: /Applications/Xcode9.0.1.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/DVTKit
Reason: tried: '/Applications/Xcode9.0.1.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/../../../../Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework/Versions/A/XCTest' (no such file), '/Applications/Xcode9.0.1.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/../../../XCTest.framework/Versions/A/XCTest' (no such file), '/Applications/Xcode9.0.1.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/../../../../Applications/Instruments.app/Contents/Frameworks/XCTest.framework/Versions/A/XCTest' (no such file), '/Applications/Xcode9.0.1.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/../../../../Frameworks/XCTest.framework/Versions/A/XCTest' (no such file), '/Applications/Xcode9.0.1.app/Contents/MacOS/../Frameworks/XCTest.framework/Versions/A/XCTest' (no such file), '/Applicat
Thread 0 Crashed:
0 dyld 0x10c9c60ce __abort_with_payload + 10
1 dyld 0x10c9dc1cf abort_with_payload_wrapper_internal + 80
2 dyld 0x10c9dc201 abort_with_payload + 9
3 dyld 0x10c98a613 dyld4::halt(char const*) + 375
4 dyld 0x10c98655d dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3955
5 dyld 0x10c9854b4 start + 388
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000002000209 rbx: 0x0000000000000000 rcx: 0x00007ff7baf28a28 rdx: 0x00007ff7baf28e90
rdi: 0x0000000000000006 rsi: 0x0000000000000001 rbp: 0x00007ff7baf28a70 rsp: 0x00007ff7baf28a28
r8: 0x00007ff7baf28a90 r9: 0x0000000000000000 r10: 0x0000000000000096 r11: 0x0000000000000246
r12: 0x0000000000000096 r13: 0x00007ff7baf28e90 r14: 0x0000000000000001 r15: 0x0000000000000006
rip: 0x000000010c9c60ce rfl: 0x0000000000000246 cr2: 0x0000000104fe7000
Logical CPU: 0
Error Code: 0x02000209
Trap Number: 133
Binary Images:
0x10c980000 - 0x10c9ebfff dyld (*) <1a6ae033-9438-33c0-8077-988fd885250a> /usr/lib/dyld
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 41
thread_create: 0
thread_set_state: 935
VM Region Summary:
ReadOnly portion of Libraries: Total=991.7M resident=0K(0%) swapped_out_or_unallocated=991.7M(100%)
Writable regions: Total=9636K written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=9636K(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
STACK GUARD 56.0M 1
Stack 8192K 1
VM_ALLOCATE 16K 3
__CTF 759 1
__DATA 31.2M 376
__DATA_CONST 12.0M 180
__DATA_DIRTY 534K 106
__FONT_DATA 4K 1
__LINKEDIT 661.8M 47
__OBJC_RO 81.5M 1
__OBJC_RW 3120K 1
__TEXT 329.9M 386
__UNICODE 588K 1
dyld private memory 1024K 1
=========== ======= =======
TOTAL 1.2G 1106
Problem
According to apple, macOS 12 requires you to use Xcode 13.
https://developer.apple.com/news/?id=ufox?.ci5
Solution
There is a way to install only the tool chain for Xcode 9, but not the
app itself. I'm not sure if Migration is possible through the command
line but it seems like the best solution.
https://github.com/mrpippy/XcodeNueve

How to get filename and line number in crash backtrace from my DKMS module?

I'm building a Linux module, on a Debian distribution, using DKMS, and I have a kernel freeze that I need to debug.
I've installed the crash command line tool, with the kernel debug symbols.
When a freeze happens, I have a crash file which I load with the crash command, and I can see the filenames and line numbers for each of the lines from the kernel trace, but when it is about my module, I don't have any filename, nor line number.
Here is an example:
WARNING: active task ffff98d215239e80 on cpu 1 not found in PID hash
KERNEL: /usr/lib/debug/boot/vmlinux-4.19.0-8-amd64
DUMPFILE: /var/crash/202004292108/dump.202004292108 [PARTIAL DUMP]
CPUS: 12
DATE: Wed Apr 29 21:07:00 2020
UPTIME: 00:13:32
LOAD AVERAGE: 0.62, 0.57, 0.37
TASKS: 886
NODENAME: debian
RELEASE: 4.19.0-8-amd64
VERSION: #1 SMP Debian 4.19.98-1+deb10u1 (2020-04-27)
MACHINE: x86_64 (3700 Mhz)
MEMORY: 16 GB
PANIC: "BUG: unable to handle kernel NULL pointer dereference at 0000000000000018"
PID: 15775
COMMAND: "douaned"
TASK: ffff98d215239e80 [THREAD_INFO: ffff98d215239e80]
CPU: 1
STATE: EXIT_DEAD (PANIC)
crash> bt -l
PID: 15775 TASK: ffff98d215239e80 CPU: 1 COMMAND: "douaned"
#0 [ffff98d36e843870] machine_kexec at ffffffff87656967
./debian/build/build_amd64_none_amd64/./arch/x86/include/asm/mem_encrypt.h: 75
#1 [ffff98d36e8438c8] __crash_kexec at ffffffff877213ad
./debian/build/build_amd64_none_amd64/./kernel/kexec_core.c: 958
#2 [ffff98d36e843990] crash_kexec at ffffffff877221fd
./debian/build/build_amd64_none_amd64/./include/linux/compiler.h: 219
#3 [ffff98d36e8439a8] oops_end at ffffffff8762a0ad
./debian/build/build_amd64_none_amd64/./arch/x86/kernel/dumpstack.c: 334
#4 [ffff98d36e8439c8] no_context at ffffffff876653ee
./debian/build/build_amd64_none_amd64/./arch/x86/mm/fault.c: 808
#5 [ffff98d36e843a20] __do_page_fault at ffffffff87665ab2
./debian/build/build_amd64_none_amd64/./arch/x86/mm/fault.c: 1323
#6 [ffff98d36e843a90] page_fault at ffffffff87e0114e
/build/linux-AqT5hv/linux-4.19.98/arch/x86/entry/entry_64.S: 1204
[exception RIP: idr_find]
RIP: ffffffff87d0b860 RSP: ffff98d36e843b40 RFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff98d20e848000 RCX: 0000000000000000
RDX: 000000009456dad9 RSI: 0000000000005807 RDI: 0000000000000008
RBP: ffff98d363bc3ae8 R8: 000000000001421d R9: 00000000917bc5e0
R10: ffff98d36e843bae R11: 0000000000000049 R12: 0000000000000004
R13: ffff98d226491480 R14: ffff98d206f28cfc R15: ffff98d206f28d10
ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018
./debian/build/build_amd64_none_amd64/./lib/idr.c: 177
#7 [ffff98d36e843b40] find_get_pid at ffffffff8769e846
./debian/build/build_amd64_none_amd64/./include/linux/pid.h: 71
#8 [ffff98d36e843b48] netfiler_packet_hook at ffffffffc1962eda [douane]
#9 [ffff98d36e843ce8] nf_hook_slow at ffffffff87c2eea4
./debian/build/build_amd64_none_amd64/./net/netfilter/core.c: 512
#10 [ffff98d36e843d18] __ip_local_out at ffffffff87c3c8a7
./debian/build/build_amd64_none_amd64/./include/linux/netfilter.h: 248
#11 [ffff98d36e843d70] ip_local_out at ffffffff87c3c927
./debian/build/build_amd64_none_amd64/./net/ipv4/ip_output.c: 123
...
Have a look at the line #8.
From the DKMS documentation, I found the STRIPE=[#] config to which I passed no in order to not remove the debug symbols (as the documentation says), but I still don't have any filenames nor line numbers.
Can anyone tell how can I have them showing please?
I finally figured it out !
You first need to know where is installed your kernel module file (douane.ko in my case, which is installed in /lib/modules/$(uname -r)/updates/dkms/), then after having loaded the crash file, like it is shown in the question, you then need to load the module's debug symbols using the mod command:
crash> mod -s douane /lib/modules/4.19.0-8-amd64/updates/dkms/douane.ko
MODULE NAME SIZE OBJECT FILE
ffffffffc17f8040 douane 28672 /lib/modules/4.19.0-8-amd64/updates/dkms/douane.ko
From now on, using bt -l will show you also the line number from your kernel module source code too.

Xcode 9 GM - Export and Upload to App Store crashing

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.

Xcode launch app error in Mac 10.9 Mavericks

I using MacOSX 10.9.3 Maverick, xcode 5.1.1 . I try to launch app in simulator, but happen black screen and close xcode. This is notice:
Process: Xcode [625]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 5.1.1 (5085)
Build Info: IDEFrameworks-5085000000000000~10
App Item ID: 497799835
App External ID: 520942841
Code Type: X86-64 (Native)
Parent Process: launchd [151]
Responsible: Xcode [625]
User ID: 501
Date/Time: 2014-05-19 09:43:47.454 +0700
OS Version: Mac OS X 10.9.3 (13D65)
Report Version: 11
Anonymous UUID: 9C94CD1D-3B3C-6A87-75C0-B9FADF7F71B3
Crashed Thread: 7 Dispatch queue: DBGLLDBLauncher Serial Queue
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
ProductBuildVersion: 5B1008
Assertion failed: (out_port != 0), function StartDebugserverProcess, file /SourceCache/lldb/lldb-310.2.37/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp, line 720.
Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff885c9a1a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff885c8d18 mach_msg + 64
2 com.apple.CoreFoundation 0x00007fff86bdafc5 __CFRunLoopServiceMachPort + 181
3 com.apple.CoreFoundation 0x00007fff86bda5e9 __CFRunLoopRun + 1161
4 com.apple.CoreFoundation 0x00007fff86bd9f25 CFRunLoopRunSpecific + 309
5 com.apple.HIToolbox 0x00007fff8b588a0d RunCurrentEventLoopInMode + 226
...
How to fix it ?
A solution and a workaround to avoid this issue:
Option A (solution)- Ensure your /etc/hosts file contains this entry:
127.0.0.1 localhost
Option B (workaround)- If you really must have 127.0.0.1 mapped differently, eg I happened to be also doing some Facebook API testing that required it set to local.mysite.com, disabling the Xcode debugger:
Product -> Scheme -> Edit Scheme -> Debugger -> None
will also resolve this.
Issue may be caused by another application which removed hosts file, for example MAMP PRO
Recreate hosts file
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost

Resources