After upgrading to Mojave the application started to crash in XCode debugger. It does run normally as a standalone application.
The backtrace looks like the following:
frames 0-5 call for the custom new, which is not initialized, the app initializes custom memory allocator in main
frame #6: 0x00007fff53ee006f libprotobuf.dylib`wireless_diagnostics::google::protobuf::(anonymous namespace)::InitGeneratedPool() + 20
frame #7: 0x00007fff53ecdd47 libprotobuf-lite.dylib`wireless_diagnostics::google::protobuf::internal::FunctionClosure0::Run() + 17
frame #8: 0x00007fff53ecdd1b libprotobuf-lite.dylib`wireless_diagnostics::google::protobuf::GoogleOnceInitImpl(long*, wireless_diagnostics::google::protobuf::Closure*) + 73
frame #9: 0x00007fff53edffbe libprotobuf.dylib`wireless_diagnostics::google::protobuf::DescriptorPool::InternalAddGeneratedFile(void const*, int) + 78
frame #10: 0x00007fff53edfbf9 libprotobuf.dylib`wireless_diagnostics::google::protobuf::protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto() + 68
frame #11: 0x0000000117de8cc8 dyld`ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 518
frame #12: 0x0000000117de8ec6 dyld`ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 40
frame #13: 0x0000000117de40da dyld`ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 358
frame #14: 0x0000000117de406d dyld`ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 249
frame #15: 0x0000000117de406d dyld`ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 249
frame #16: 0x0000000117de406d dyld`ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 249
frame #17: 0x0000000117de406d dyld`ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 249
frame #18: 0x0000000117de406d dyld`ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 249
frame #19: 0x0000000117de3254 dyld`ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 134
frame #20: 0x0000000117de32e8 dyld`ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 74
frame #21: 0x0000000117dd2756 dyld`dyld::initializeMainExecutable() + 169
frame #22: 0x0000000117dd778f dyld`dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 6237
frame #23: 0x0000000117dd14f6 dyld`dyldbootstrap::start(macho_header const*, int, char const**, long, macho_header const*, unsigned long*) + 1154
frame #24: 0x0000000117dd1036 dyld`_dyld_start + 54
Xcode injects the dynamic library libViewDebuggerSupport.dylib, which causes the crash. And problematic *.dylib is
/System/Library/PrivateFrameworks/WirelessDiagnostics.framework/Versions/A/Libraries/libprotobuf.dylib
Fixing the custom allocator is the one of the options, but I want to avoid doing it.
Do you know any way to prevent XCode from injecting libViewDebuggerSupport.dylib?
It is appeared to be a bug in Mojave. Apple is working on fixing it, but they did not give me any ETA.
For now I fixed the crash by fixing my custom allocator.
Related
I'm writing in assembly using clang 13.1.6 with MacOS Monterey 12.5 on an ARM64 M1 Pro laptop.
If I try to use .dword/.xword in the .text section with the address of a label as its value, my program crashes on startup with a bus error.
Minimal reproducible example:
.text
.balign 4
.global _main
_main:
// accepted method to load from static address
adrp x1, vector#GOTPAGE
ldr x1, [x1, #vector#GOTPAGEOFF]
// now x1 contains the address of vector
ldr x2, [x1]
// now x2 should contain the address of dest
br x2
dest:
mov x0, #0
ret
vector:
.xword dest
This assembles and links without errors or warnings using cc reloc.s -o reloc, but bus errors immediately when run, apparently before even reaching my actual code. The backtrace from lldb is as follows:
* thread #1, stop reason = EXC_BAD_ACCESS (code=2, address=0x100003fb0)
frame #0: 0x000000010001da54 dyld`invocation function for block in dyld4::Loader::applyFixupsGeneric(Diagnostics&, dyld4::RuntimeState&, dyld3::Array<void const*> const&, dyld3::Array<void const*> const&, bool, dyld3::Array<dyld4::Loader::MissingFlatLazySymbol> const&) const + 60
dyld`invocation function for block in dyld4::Loader::applyFixupsGeneric(Diagnostics&, dyld4::RuntimeState&, dyld3::Array<void const*> const&, dyld3::Array<void const*> const&, bool, dyld3::Array<dyld4::Loader::MissingFlatLazySymbol> const&) const:
-> 0x10001da54 <+60>: str x19, [x20]
0x10001da58 <+64>: ldp x29, x30, [sp, #0x20]
0x10001da5c <+68>: ldp x20, x19, [sp, #0x10]
0x10001da60 <+72>: add sp, sp, #0x30
Target 0: (a.out) stopped.
(lldb) bt
* thread #1, stop reason = EXC_BAD_ACCESS (code=2, address=0x100003fb0)
* frame #0: 0x000000010001da54 dyld`invocation function for block in dyld4::Loader::applyFixupsGeneric(Diagnostics&, dyld4::RuntimeState&, dyld3::Array<void const*> const&, dyld3::Array<void const*> const&, bool, dyld3::Array<dyld4::Loader::MissingFlatLazySymbol> const&) const + 60
frame #1: 0x0000000100040fd4 dyld`invocation function for block in dyld3::MachOLoaded::fixupAllChainedFixups(Diagnostics&, dyld_chained_starts_in_image const*, unsigned long, dyld3::Array<void const*>, void (void*, void*) block_pointer) const + 424
frame #2: 0x0000000100041080 dyld`dyld3::MachOLoaded::walkChain(Diagnostics&, dyld3::MachOLoaded::ChainedFixupPointerOnDisk*, unsigned short, bool, unsigned int, void (dyld3::MachOLoaded::ChainedFixupPointerOnDisk*, bool&) block_pointer) const + 104
frame #3: 0x00000001000412b0 dyld`dyld3::MachOLoaded::forEachFixupInSegmentChains(Diagnostics&, dyld_chained_starts_in_segment const*, bool, void (dyld3::MachOLoaded::ChainedFixupPointerOnDisk*, dyld_chained_starts_in_segment const*, bool&) block_pointer) const + 208
frame #4: 0x0000000100040e04 dyld`dyld3::MachOLoaded::forEachFixupInAllChains(Diagnostics&, dyld_chained_starts_in_image const*, bool, void (dyld3::MachOLoaded::ChainedFixupPointerOnDisk*, dyld_chained_starts_in_segment const*, bool&) block_pointer) const + 96
frame #5: 0x0000000100040d98 dyld`dyld3::MachOLoaded::fixupAllChainedFixups(Diagnostics&, dyld_chained_starts_in_image const*, unsigned long, dyld3::Array<void const*>, void (void*, void*) block_pointer) const + 120
frame #6: 0x000000010001da0c dyld`invocation function for block in dyld4::Loader::applyFixupsGeneric(Diagnostics&, dyld4::RuntimeState&, dyld3::Array<void const*> const&, dyld3::Array<void const*> const&, bool, dyld3::Array<dyld4::Loader::MissingFlatLazySymbol> const&) const + 136
frame #7: 0x000000010001d788 dyld`dyld4::Loader::applyFixupsGeneric(Diagnostics&, dyld4::RuntimeState&, dyld3::Array<void const*> const&, dyld3::Array<void const*> const&, bool, dyld3::Array<dyld4::Loader::MissingFlatLazySymbol> const&) const + 204
frame #8: 0x0000000100021574 dyld`dyld4::JustInTimeLoader::applyFixups(Diagnostics&, dyld4::RuntimeState&, dyld4::DyldCacheDataConstLazyScopedWriter&, bool) const + 604
frame #9: 0x000000010000d904 dyld`dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 1928
frame #10: 0x000000010000d06c dyld`start + 488
The crash appears to be inside the dynamic linker, not in my code at all.
An even simpler example with the same behavior is:
.text
.balign 4
.global _main
_main:
ldr x1, =dest
br x1
dest:
mov x0, #0
ret
Here ldr x1, =dest is supposed to similarly assemble the address of dest into the literal pool (a nearby location within the .text section) and load from there into x1. This also bus errors.
Equivalent code works fine on ARM64 Linux.
Why is this, and how do I fix it?
Absolute addresses in the text section seem to be unsupported by ARM64 MacOS. As best I can tell, the dynamic linker tries to apply a relocation/fixup to store the actual runtime address of dest into vector, but crashes because .text is already mapped read-only.
So if you have an object that needs to be initialized with the address of a label or other object, then you need to put it in a data section, even if it is read-only. This is what clang does when compiling C/C++ code. For instance, if you write in C
const int i = 42;
const int * const ptr1 = &i;
const int * const ptr2 = NULL;
const int * const ptr3 = (const int *)0xdeadbeefcafed00dUL;
then i, ptr2, ptr3 all get preceded by .section __TEXT,__const, but ptr1 is preceded by .section __DATA,__const. The latter section is also read-only at runtime, but apparently is mapped read-write while relocation is done.
And you simply cannot use ldr x1, =label at all. Use instead adr or adrp / add as appropriate to generate the address in x1 if label is in the text section, or otherwise load it from the global offset table as appropriate.
It would be nice if the linker would detect this and warn you, instead of going ahead and building an executable that mysteriously crashes.
I have a project in Xcode 10.1 which contains both Objective C and Swift code.Whenever I apply breakpoints in my swift code the LLDB crashes, which eventually end the debugging session.I am completely stuck in this scenario as I cannot debug my code.I have tried moving the breakpoints to other lines(suggested by some other posts), but its not working.
Is there any workaround on this?
Message from debugger: The LLDB RPC server has crashed. The crash log is located in ~/Library/Logs/DiagnosticReports and has a prefix 'lldb-rpc-server'.
Crash summary:
Thread 11 Crashed:: RPC packet thread for client tid 0028defc (2678524)
0 libsystem_kernel.dylib 0x00007fff6d6a223e __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff6d758c1c pthread_kill + 285
2 libsystem_c.dylib 0x00007fff6d60b1c9 abort + 127
3 com.apple.LLDB.framework 0x0000000106bd2443 swift::ModuleFile::fatal(llvm::Error) + 835
4 com.apple.LLDB.framework 0x0000000106be3753 swift::ModuleFile::getDeclCheckedImpl(llvm::PointerEmbeddedInt<unsigned int, 31>, llvm::Optional<swift::DeclContext*>) + 30515
5 com.apple.LLDB.framework 0x0000000106bd321e swift::ModuleFile::getDeclChecked(llvm::PointerEmbeddedInt<unsigned int, 31>, llvm::Optional<swift::DeclContext*>) + 78
6 com.apple.LLDB.framework 0x0000000106c0a707 swift::ModuleFile::loadExtensions(swift::NominalTypeDecl*) + 1911
7 com.apple.LLDB.framework 0x0000000106c13011 swift::SerializedModuleLoader::loadExtensions(swift::NominalTypeDecl*, unsigned int) + 49
8 com.apple.LLDB.framework 0x00000001062246bf swift::ASTContext::loadExtensions(swift::NominalTypeDecl*, unsigned int) + 63
9 com.apple.LLDB.framework 0x00000001062a6272 swift::NominalTypeDecl::getExtensions() + 82
10 com.apple.LLDB.framework 0x000000010631681e populateLookupTableEntryFromExtensions(swift::ASTContext&, swift::MemberLookupTable&, swift::NominalTypeDecl*, swift::DeclName, bool) + 46
11 com.apple.LLDB.framework 0x0000000106316e98 swift::NominalTypeDecl::lookupDirect(swift::DeclName, bool) + 616
12 com.apple.LLDB.framework 0x0000000106301a66 swift::ModuleDecl::lookupMember(llvm::SmallVectorImpl<swift::ValueDecl*>&, swift::DeclContext*, swift::DeclName, swift::Identifier) const + 86
13 com.apple.LLDB.framework 0x000000010643e5a1 FindNamedDecls(swift::ASTContext*, swift::DeclBaseName const&, VisitNodeResult&, llvm::Optional<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >) + 1313
14 com.apple.LLDB.framework 0x0000000106437cdf VisitNode(swift::ASTContext*, swift::Demangle::Node*, VisitNodeResult&) + 2703
15 com.apple.LLDB.framework 0x0000000106439e25 VisitNode(swift::ASTContext*, swift::Demangle::Node*, VisitNodeResult&) + 11221
16 com.apple.LLDB.framework 0x000000010643d94c swift::ide::getTypeFromMangledSymbolname(swift::ASTContext&, llvm::StringRef, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) + 204
17 com.apple.LLDB.framework 0x000000010705e2e7 lldb_private::SwiftASTContext::GetTypeFromMangledTypename(char const*, lldb_private::Status&) + 535
18 com.apple.LLDB.framework 0x0000000106db6241 DWARFASTParserSwift::ParseTypeFromDWARF(lldb_private::SymbolContext const&, DWARFDIE const&, lldb_private::Log*, bool*) + 933
19 com.apple.LLDB.framework 0x0000000106ee6a15 SymbolFileDWARF::ParseType(lldb_private::SymbolContext const&, DWARFDIE const&, bool*) + 209
20 com.apple.LLDB.framework 0x0000000106ee01fa SymbolFileDWARF::GetTypeForDIE(DWARFDIE const&, bool) + 486
21 com.apple.LLDB.framework 0x0000000106edf9ce SymbolFileDWARF::ResolveType(DWARFDIE const&, bool, bool) + 68
22 com.apple.LLDB.framework 0x0000000106edf94d SymbolFileDWARF::ResolveTypeUID(unsigned long long) + 45
23 com.apple.LLDB.framework 0x0000000106f2e87d lldb_private::Function::GetType() + 105
24 com.apple.LLDB.framework 0x0000000106f2e73c lldb_private::Function::GetStartLineSourceInfo(lldb_private::FileSpec&, unsigned int&) + 60
25 com.apple.LLDB.framework 0x0000000106c6c488 lldb_private::BreakpointResolverFileLine::FilterContexts(lldb_private::SymbolContextList&) + 262
26 com.apple.LLDB.framework 0x0000000106c6c88d lldb_private::BreakpointResolverFileLine::SearchCallback(lldb_private::SearchFilter&, lldb_private::SymbolContext&, lldb_private::Address*, bool) + 263
27 com.apple.LLDB.framework 0x0000000106d51f80 lldb_private::SearchFilter::DoModuleIteration(lldb_private::SymbolContext const&, lldb_private::Searcher&) + 346
28 com.apple.LLDB.framework 0x0000000106d51dd9 lldb_private::SearchFilter::Search(lldb_private::Searcher&) + 153
29 com.apple.LLDB.framework 0x0000000106f96b9f lldb_private::Target::AddBreakpoint(std::__1::shared_ptr<lldb_private::Breakpoint>, bool) + 203
30 com.apple.LLDB.framework 0x0000000106f97f29 lldb_private::Target::CreateBreakpoint(std::__1::shared_ptr<lldb_private::SearchFilter>&, std::__1::shared_ptr<lldb_private::BreakpointResolver>&, bool, bool, bool) + 249
31 com.apple.LLDB.framework 0x0000000106f98352 lldb_private::Target::CreateBreakpoint(lldb_private::FileSpecList const*, lldb_private::FileSpec const&, unsigned int, unsigned long long, lldb_private::LazyBool, lldb_private::LazyBool, bool, bool, lldb_private::LazyBool) + 920
32 com.apple.LLDB.framework 0x0000000103dda3d8 lldb::SBTarget::BreakpointCreateByLocation(lldb::SBFileSpec const&, unsigned int, unsigned long long, lldb::SBFileSpecList&) + 246
33 com.apple.LLDB.framework 0x0000000103dda2b0 lldb::SBTarget::BreakpointCreateByLocation(lldb::SBFileSpec const&, unsigned int, unsigned long long) + 62
34 com.apple.LLDB.framework 0x0000000103dda226 lldb::SBTarget::BreakpointCreateByLocation(char const*, unsigned int) + 64
35 lldb-rpc-server 0x0000000103af6f5d rpc_server::_ZN4lldb8SBTarget26BreakpointCreateByLocationEPKcj::HandleRPCCall(rpc_common::Connection&, rpc_common::RPCStream&, rpc_common::RPCStream&) + 179
36 lldb-rpc-server 0x0000000103b0073f rpc_common::Connection::PrivateHandleRPCPacket(rpc_common::RPCPacket&, rpc_common::RPCPacket&, bool&) + 469
37 lldb-rpc-server 0x0000000103b014e0 rpc_common::Connection::HandleRPCPacket(rpc_common::RPCPacket&) + 62
38 lldb-rpc-server 0x0000000103b04f12 Packets::ProcessPackets() + 256
39 lldb-rpc-server 0x0000000103b04d95 Packets::ReadThread() + 289
40 lldb-rpc-server 0x0000000103b04c6f Packets::RunReadThread(void*) + 9
41 libsystem_pthread.dylib 0x00007fff6d756305 _pthread_body + 126
42 libsystem_pthread.dylib 0x00007fff6d75926f _pthread_start + 70
43 libsystem_pthread.dylib 0x00007fff6d755415 thread_start + 13
Thread 11 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000700010856000 rcx: 0x00007000108534f8 rdx: 0x0000000000000000
rdi: 0x0000000000003e0b rsi: 0x0000000000000006 rbp: 0x0000700010853530 rsp: 0x00007000108534f8
r8: 0x000000000000000b r9: 0x0000000000000000 r10: 0x0000000000000000 r11: 0x0000000000000206
r12: 0x0000000000003e0b r13: 0x0000000107fd4d70 r14: 0x0000000000000006 r15: 0x000000000000002d
rip: 0x00007fff6d6a223e rfl: 0x0000000000000206 cr2: 0x00007fffa0349188
Complete crash log
The crash is happening in swift code, Objective C code is working fine. Also, it is not occasional, it is happening every time.
I have also tried clearing all Xcode caches and derived data.
I meet the same situation, hopes my solution helps you.
The reason of my Xcode LLDB crashing while adding breakpoints is that my project name (Security) is same to Apple's framework.
After switch project name to another random name, the problem solved.
I'm patching a Mach-O binary with a dylib (by appending a LC_LOAD_DYLIB command at the end of the load commands + adjusting the mach header's sizeofcmds + incrementing its ncmds) and I would expect to be able to compile over and over the dylib itself and just rerun the binary.
However, for some reason, when doing so, after the first run, the binary crashes for various reasons (e.g EXC_CRASH or EXC_BAD_ACCESS at different addresses)
If I restart the machine, everything works perfectly fine(the lib is patched and the exec runs). I bet this has to do with some obscure (for me at least) memory mapping or caching the dynamic linker does, but my expertise in that area is slim. Any chance you guys know something about it?
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x00007fffd43d3829 map_images_nolock + 588
1 libobjc.A.dylib 0x00007fffd43d3521 map_2_images + 43
2 dyld 0x00000001164e5d4c dyld::notifyBatchPartial(dyld_image_states, bool, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*), bool, bool) + 1124
3 dyld 0x00000001164e5f25 dyld::registerObjCNotifiers(void (*)(unsigned int, char const* const*, mach_header const* const*), void (*)(char const*, mach_header const*), void (*)(char const*, mach_header const*)) + 50
4 libdyld.dylib 0x00007fffd4cbd584 _dyld_objc_notify_register + 77
5 libobjc.A.dylib 0x00007fffd43d3074 _objc_init + 115
6 libdispatch.dylib 0x00007fffd4c84c64 _os_object_init + 13
7 libdispatch.dylib 0x00007fffd4c84c13 libdispatch_init + 295
8 libSystem.B.dylib 0x00007fffd36f1a02 libSystem_initializer + 121
9 dyld 0x00000001164f6063 ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 385
10 dyld 0x00000001164f6266 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 40
11 dyld 0x00000001164f1bf0 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 338
12 dyld 0x00000001164f1b87 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 233
13 dyld 0x00000001164f1b87 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 233
14 dyld 0x00000001164f1b87 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 233
15 dyld 0x00000001164f1b87 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 233
16 dyld 0x00000001164f1b87 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 233
17 dyld 0x00000001164f1b87 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 233
18 dyld 0x00000001164f1b87 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 233
19 dyld 0x00000001164f0c60 ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 138
20 dyld 0x00000001164f0cf5 ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 75
21 dyld 0x00000001164e32f6 dyld::initializeMainExecutable() + 195
22 dyld 0x00000001164e7459 dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 3789
23 dyld 0x00000001164e2249 dyldbootstrap::start(macho_header const*, int, char const**, long, macho_header const*, unsigned long*) + 470
24 dyld 0x00000001164e2036 _dyld_start + 54
Can anybody help me out, I'm getting error on app launch with archive build. Debug build is working fine.
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0xffffffffffffffe8
VM Regions Near 0xffffffffffffffe8:
--> shared memory 00007fffffe36000-00007fffffe37000 [ 4K] r-x/r-x SM=SHM
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libc++.1.dylib 0x00007fff8fb6c4f1 std::__1::basic_istream<char, std::__1::char_traits<char> >::sentry::sentry(std::__1::basic_istream<char, std::__1::char_traits<char> >&, bool) + 29
1 libc++.1.dylib 0x00007fff8fb6e437 std::__1::basic_istream<char, std::__1::char_traits<char> >::tellg() + 191
2 ??? 0x000000010d0b44ee 0 + 4513809646
3 ??? 0x000000010d0b35d8 0 + 4513805784
4 ??? 0x000000010d1213cd 0 + 4514255821
5 ??? 0x000000010d18e5c7 0 + 4514702791
6 ??? 0x000000010d159251 0 + 4514484817
7 ??? 0x000000010d18df0a 0 + 4514701066
8 ??? 0x000000010d144b1a 0 + 4514401050
9 ??? 0x000000010d0b121a 0 + 4513796634
10 ??? 0x000000010d0b66b1 0 + 4513818289
11 dyld 0x00007fff659f1d0b ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 265
12 dyld 0x00007fff659f1e98 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 40
13 dyld 0x00007fff659ee891 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 305
14 dyld 0x00007fff659ee718 ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 138
15 dyld 0x00007fff659ee989 ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 75
16 dyld 0x00007fff659e1245 dyld::initializeMainExecutable() + 187
17 dyld 0x00007fff659e4c19 dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 2669
18 dyld 0x00007fff659e0276 dyldbootstrap::start(macho_header const*, int, char const**, long, macho_header const*, unsigned long*) + 512
19 dyld 0x00007fff659e0036 _dyld_start + 54
This was due to library image not loaded in release build. I didn't added library in 'Linked Binary With Libraries'.
I am running Yosemite 10.10.4 on a Macbook Air. I have a number of Xcode projects that worked successfully under Xcode 6.4. However, I downloaded Xcode 5.02 from Apple in order to use the Big Nerd Ranch book "IOS Programming" which is written for Xcode 5. Any time I open a xib file, Xcode crashes. As suggested, I opened the console app,found the crash log, and copied it.
Process: Interface Builder Cocoa Touch Tool [1370]
Path: /Applications/Xcode 2.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Overlays/Interface Builder Cocoa Touch Tool
Identifier: Interface Builder Cocoa Touch Tool
Version: 4.3 (141)
Code Type: X86 (Native)
Parent Process: Xcode [1315]
Responsible: Xcode [1315]
User ID: 501
Date/Time: 2015-08-16 17:49:29.223 -0500
OS Version: Mac OS X 10.10.4 (14E46)
Report Version: 11
Anonymous UUID: EFE6107D-FC8B-4F16-13CF-5078BA3A872D
Sleep/Wake UUID: AC708070-A2AD-4BD3-97E0-72E185438011
Time Awake Since Boot: 2400 seconds
Time Since Wake: 1400 seconds
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x94ecb69a __pthread_kill + 10
1 libsystem_pthread.dylib 0x92192f19 pthread_kill + 101
2 libsystem_sim_c.dylib 0x02a78e12 abort + 127
3 libsystem_sim_c.dylib 0x02a43900 __assert_rtn + 284
4 libsystem_override.dylib 0x0297e73c _sim_host_bootstrap_init + 264
5 libsystem_override.dylib 0x0297e7aa _sim_host_bootstrap_port + 26
6 libxpc.dylib 0x02ba4b06 _libxpc_initializer + 870
7 libSystem.B.dylib 0x98a9daae libSystem_initializer + 167
8 dyld 0x8fe710b3 ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 291
9 dyld 0x8fe71218 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 64
10 dyld 0x8fe6d2f0 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 296
11 dyld 0x8fe6d288 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 192
12 dyld 0x8fe6d288 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 192
13 dyld 0x8fe6d288 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 192
14 dyld 0x8fe6d288 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 192
15 dyld 0x8fe6d288 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 192
16 dyld 0x8fe6d288 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 192
17 dyld 0x8fe6d288 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 192
18 dyld 0x8fe6d176 ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 120
19 dyld 0x8fe6d3e1 ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 79
20 dyld 0x8fe5f125 dyld::initializeMainExecutable() + 183
21 dyld 0x8fe62bad dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 2793
22 dyld 0x8fe5e232 dyldbootstrap::start(macho_header const*, int, char const**, long, macho_header const*, unsigned long*) + 428
23 dyld 0x8fe5e047 _dyld_start + 71
Thread 0 crashed with X86 Thread State (32-bit):
eax: 0x00000000 ebx: 0x02980015 ecx: 0xbfffd5ac edx: 0x00000000
edi: 0xa08481d4 esi: 0x00000006 ebp: 0xbfffd5c8 esp: 0xbfffd5ac
ss: 0x00000023 efl: 0x00000206 eip: 0x94ecb69a cs: 0x0000000b
ds: 0x00000023 es: 0x00000023 fs: 0x00000000 gs: 0x0000000f
cr2: 0x02a78d93
Logical CPU: 0
Error Code: 0x00080148
Trap Number: 132