Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 7 crashing when debugging

Tags:

xcode

ios

I'm often getting crash when I try to debug my app in Xcode 7 with iPhone simulator (5s, iOS 8.4):

Process:               Xcode [6913]
Path:                  /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier:            com.apple.dt.Xcode
Version:               7.1 (9079)
Build Info:            IDEFrameworks-9079000000000000~8
App Item ID:           497799835
App External ID:       813804225
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Xcode [6913]
User ID:               501

Date/Time:             2015-11-02 13:37:44.248 +0300
OS Version:            Mac OS X 10.10.5 (14F1021)
Report Version:        11
Anonymous UUID:        CB3D1F12-E033-1160-2F9F-69DC0A89468E

Sleep/Wake UUID:       DA9F3D65-3E86-4A1C-9E41-2E921CDFD798

Time Awake Since Boot: 290000 seconds
Time Since Wake:       1500 seconds

Crashed Thread:        26  <DBGLLDBSessionThread (pid=42149)>  Dispatch queue: DVTInvalidationPreventionQueue

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000

VM Regions Near 0:
--> 
    __TEXT                 000000010798f000-0000000107993000 [   16K] r-x/rwx SM=COW  /Applications/Xcode.app/Contents/MacOS/Xcode

Application Specific Information:
ProductBuildVersion: 7B91b


Thread 26 Crashed:: <DBGLLDBSessionThread (pid=42149)>  Dispatch queue: DVTInvalidationPreventionQueue
0   com.apple.LLDB.framework        0x0000000113efd3cb swift::ModuleFile::getModule(llvm::ArrayRef<swift::Identifier>) + 443
1   com.apple.LLDB.framework        0x0000000113f1116b swift::ModuleFile::associateWithFileContext(swift::FileUnit*, swift::SourceLoc) + 1739
2   com.apple.LLDB.framework        0x0000000113f175bd swift::SerializedModuleLoader::loadAST(swift::ModuleDecl&, llvm::Optional<swift::SourceLoc>, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, bool) + 589
3   com.apple.LLDB.framework        0x0000000113f199cf swift::SerializedModuleLoader::loadModule(swift::SourceLoc, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >) + 5423
4   com.apple.LLDB.framework        0x0000000113b58004 swift::ASTContext::getModule(llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >) + 276
5   com.apple.LLDB.framework        0x0000000113efd385 swift::ModuleFile::getModule(llvm::ArrayRef<swift::Identifier>) + 373
6   com.apple.LLDB.framework        0x0000000113f1116b swift::ModuleFile::associateWithFileContext(swift::FileUnit*, swift::SourceLoc) + 1739
7   com.apple.LLDB.framework        0x0000000113f175bd swift::SerializedModuleLoader::loadAST(swift::ModuleDecl&, llvm::Optional<swift::SourceLoc>, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, bool) + 589
8   com.apple.LLDB.framework        0x0000000113f199cf swift::SerializedModuleLoader::loadModule(swift::SourceLoc, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >) + 5423
9   com.apple.LLDB.framework        0x0000000113b58004 swift::ASTContext::getModule(llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >) + 276
10  com.apple.LLDB.framework        0x0000000113efd385 swift::ModuleFile::getModule(llvm::ArrayRef<swift::Identifier>) + 373
11  com.apple.LLDB.framework        0x0000000113f1116b swift::ModuleFile::associateWithFileContext(swift::FileUnit*, swift::SourceLoc) + 1739
12  com.apple.LLDB.framework        0x0000000113f175bd swift::SerializedModuleLoader::loadAST(swift::ModuleDecl&, llvm::Optional<swift::SourceLoc>, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, bool) + 589
13  com.apple.LLDB.framework        0x0000000113f199cf swift::SerializedModuleLoader::loadModule(swift::SourceLoc, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >) + 5423
14  com.apple.LLDB.framework        0x0000000113b58004 swift::ASTContext::getModule(llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >) + 276
15  com.apple.LLDB.framework        0x00000001143a09bd lldb_private::SwiftASTContext::GetModule(lldb_private::ConstString const&, lldb_private::Error&) + 365
16  com.apple.LLDB.framework        0x00000001143a21d6 lldb_private::SwiftASTContext::ValidateSectionModules(lldb_private::Module&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) + 114
17  com.apple.LLDB.framework        0x000000011412d5ef lldb_private::Module::GetSwiftASTContext(lldb_private::Error*) + 2579
18  com.apple.LLDB.framework        0x000000011425922f SymbolFileDWARF::GetSwiftASTContext(lldb_private::Error*) + 83
19  com.apple.LLDB.framework        0x00000001143218dc std::__1::__function::__func<lldb_private::Target::GetSwiftASTContext(lldb_private::Error&, bool, char const*)::$_0, std::__1::allocator<lldb_private::Target::GetSwiftASTContext(lldb_private::Error&, bool, char const*)::$_0>, void (std::__1::shared_ptr<lldb_private::Module>&&)>::operator()(std::__1::shared_ptr<lldb_private::Module>&&) + 646
20  com.apple.LLDB.framework        0x000000011431c66d lldb_private::Target::GetSwiftASTContext(lldb_private::Error&, bool, char const*) + 1945
21  com.apple.LLDB.framework        0x000000011418a7ba lldb_private::formatters::swift::SwiftMetatype_SummaryProvider(lldb_private::ValueObject&, lldb_private::Stream&, lldb_private::TypeSummaryOptions const&) + 318
22  com.apple.LLDB.framework        0x000000011446b9c9 lldb_private::CXXFunctionSummaryFormat::FormatObject(lldb_private::ValueObject*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, lldb_private::TypeSummaryOptions const&) + 85
23  com.apple.LLDB.framework        0x0000000114165512 lldb_private::ValueObject::GetSummaryAsCString(lldb_private::TypeSummaryImpl*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, lldb_private::TypeSummaryOptions const&) + 202
24  com.apple.LLDB.framework        0x00000001141655ab lldb_private::ValueObject::GetSummaryAsCString(lldb::LanguageType) + 105
25  com.apple.LLDB.framework        0x0000000112427788 lldb::SBValue::GetSummary() + 78
26  com.apple.dt.dbg.DebuggerLLDB   0x000000011237985f -[DBGLLDBDataValue _calculateSummary] + 117
27  com.apple.dt.dbg.DebuggerLLDB   0x0000000112379500 __67-[DBGLLDBDataValue _fetchSummaryFromLLDBOnSessionThreadIfNecessary]_block_invoke + 104
28  com.apple.dt.DVTFoundation      0x0000000107a915ec ___DVTPreventInvalidationForObjectAllowingRecursiveCallsDuringBlock_block_invoke_2 + 49
29  libdispatch.dylib               0x00007fff8ddffe73 _dispatch_client_callout + 8
30  libdispatch.dylib               0x00007fff8de0eee9 _dispatch_sync_f_invoke + 39
31  com.apple.dt.DVTFoundation      0x0000000107a91596 ___DVTPreventInvalidationForObjectAllowingRecursiveCallsDuringBlock_block_invoke + 133
32  libdispatch.dylib               0x00007fff8ddffe73 _dispatch_client_callout + 8
33  libdispatch.dylib               0x00007fff8de0eee9 _dispatch_sync_f_invoke + 39
34  com.apple.dt.DVTFoundation      0x0000000107a913f2 _DVTPreventInvalidationForObjectAllowingRecursiveCallsDuringBlock + 372
35  com.apple.dt.DVTFoundation      0x0000000107a91745 _DVTPreventInvalidationAllowingRecursiveCallsDuringBlock + 35
36  com.apple.dt.dbg.DebuggerLLDB   0x0000000112378ba8 __44-[DBGLLDBDataValue _addSessionThreadAction:]_block_invoke + 122
37  com.apple.dt.dbg.DebuggerLLDB   0x000000011238c168 -[DBGLLDBSession handleNextActionWithState:withRunPending:] + 435
38  com.apple.dt.dbg.DebuggerLLDB   0x00000001123872f8 DBGLLDBSessionThread(void*) + 997
39  libsystem_pthread.dylib         0x00007fff873ec05a _pthread_body + 131
40  libsystem_pthread.dylib         0x00007fff873ebfd7 _pthread_start + 176
41  libsystem_pthread.dylib         0x00007fff873e93ed thread_start + 13

I use Swift language and several frameworks in my app, here is Cartfile:

github "robb/Cartography"
github "ReactiveCocoa/ReactiveCocoa" "v4.0.0-alpha.3"
github "realm/realm-cocoa"

Maybe someone already seen such crash or maybe have idea about it.

like image 232
John Tracid Avatar asked Nov 02 '15 10:11

John Tracid


2 Answers

What solved this exact crash for me, Xcode 7.1.1 (which previously was reproducible on my breakpoint 100% of the time) was rerunning carthage bootstrap, and the crashes vanished.

like image 113
Ian Dundas Avatar answered Oct 10 '22 11:10

Ian Dundas


Try deleting DerivedData. This worked for me. I think intermediate build products from Xcode 6 cause Xcode 7 to crash.

like image 38
Abhinav Avatar answered Oct 10 '22 11:10

Abhinav