I develop app in xcode 6.
And then device connected i run app with debug.
After i can disconnect device from xcode and again run app. And it's runs.
But today begins some problems
i run app with run button in xcode 7 -> app run normally, and work good.
After i disconnect device from my mac, and try run app by press app icon on device and got crash
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x0000000197747270 __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001977e516c pthread_kill + 108
2 libsystem_c.dylib 0x00000001976beb14 abort + 108
3 ...g_rt.asan_ios_dynamic.dylib 0x00000001019d56d0 0x101984000 + 333520
4 ...g_rt.asan_ios_dynamic.dylib 0x00000001019c955c 0x101984000 + 283996
5 ...g_rt.asan_ios_dynamic.dylib 0x00000001019ccf28 0x101984000 + 298792
6 ...g_rt.asan_ios_dynamic.dylib 0x00000001019c9640 0x101984000 + 284224
7 ...g_rt.asan_ios_dynamic.dylib 0x00000001019cd0e8 0x101984000 + 299240
8 ...g_rt.asan_ios_dynamic.dylib 0x00000001019bef50 0x101984000 + 241488
9 ...g_rt.asan_ios_dynamic.dylib 0x00000001019c8d18 0x101984000 + 281880
10 dyld 0x0000000120095234 ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 256
11 dyld 0x00000001200953ec ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 32
12 dyld 0x0000000120091688 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 328
13 dyld 0x000000012009161c ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 220
14 dyld 0x00000001200914d8 ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 136
15 dyld 0x00000001200917a0 ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 80
16 dyld 0x0000000120086150 dyld::initializeMainExecutable() + 196
17 dyld 0x00000001200898bc dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 2664
18 dyld 0x0000000120085040 _dyld_start + 64
How to understand what library gives a crash?
Project on ObjectiveC, use CoreData, RestKit, MagicalRecord, FacebookSDK, GoogleSDK, VKSdk, Fabric (Crashlytics and Twitter)
Yeah, it's calls: "Welcome from Apple".
How you know XCode 7 give use new opportunity AddressSenitizer!
So remember DISABLE it's if you want run app without connected device to debug XCode mode.
Related
I have a MacOS app that was built with the Electron framework.
Its entitlements do not include com.apple.security.app-sandbox.
I am looking for ways to add this entitlement, but without rebuilding the app from source.
It is easy enough with the codesign utility to change the entitlement and re-sign it.
However, when doing so, the app will then crash at launch.
I have gone through this guide, added all the needed entitlements, and added the ElectronTeamId in the Info.plist.
However, the app crashes at launch. Here's what the crash report says :
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_secinit.dylib 0x19cea8154 _libsecinit_appsandbox.cold.5 + 92
1 libsystem_secinit.dylib 0x19cea8140 _libsecinit_appsandbox.cold.5 + 72
2 libsystem_secinit.dylib 0x19cea73d8 _libsecinit_appsandbox + 2044
3 libsystem_trace.dylib 0x1920c8b90 _os_activity_initiate_impl + 64
4 libsystem_secinit.dylib 0x19cea6b88 _libsecinit_initializer + 80
5 libSystem.B.dylib 0x19cebd6c0 libSystem_initializer + 272
6 dyld 0x1048cdf4c invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 164
7 dyld 0x1048f7784 invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 340
8 dyld 0x1048eded8 invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 528
9 dyld 0x1048b9f98 dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const + 168
10 dyld 0x1048edc80 dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 192
11 dyld 0x1048f71d4 dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 516
12 dyld 0x1048cde8c dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 172
13 dyld 0x1048d4a4c dyld4::PrebuiltLoader::runInitializers(dyld4::RuntimeState&) const + 44
14 dyld 0x1048e32a4 dyld4::APIs::runAllInitializersForMain() + 48
15 dyld 0x1048bddbc dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3136
16 dyld 0x1048bd06c start + 488
I am happy doing any modifications from the outside (i.e. without recompiling the app from source), for example swapping the electron framework by a different one in the app bundle.
Any pointer much appreciated.
My demo UnrealEngine4 ios application crashes immediately after launch. At the same time, android build works fine. Here is the crash log:
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000
VM Region Info: 0 is not in any region. Bytes before following region: 4366614528
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT 0000000104454000-000000010a1f0000 [ 93.6M] r-x/r-x SM=COW ...podealUE4Demo
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [5038]
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 UE4Demo 0x0000000106081624 FOutputDevice::LogfImpl+ 29546020 (char16_t const*, ...) + 204
1 UE4Demo 0x00000001060815b8 FOutputDevice::LogfImpl+ 29545912 (char16_t const*, ...) + 96
2 UE4Demo 0x0000000105feff88 FDebug::AssertFailed+ 28950408 (char const*, char const*, int, char16_t const*, ...) + 312
3 UE4Demo 0x0000000105ed5eec FGenericPlatformTime::GetSecondsPerCycle64+ 27795180 () + 244
4 UE4Demo 0x0000000105f17c4c FThreadHeartBeat::Get+ 28064844 () + 464
5 UE4Demo 0x0000000106009bfc FDebug::EnsureFailed+ 29055996 (char const*, char const*, int, char16_t const*, int) + 384
6 UE4Demo 0x000000010600a288 FDebug::OptionallyLogFormattedEnsureMessageReturningFalseImpl+ 29057672 (bool, char const*, char const*, int, char16_t const*, ...) + 116
7 UE4Demo 0x0000000105ef1780 LLMMap<PointerKey, unsigned int, ELLMTag>::Remove+ 27907968 (PointerKey const&) + 464
8 UE4Demo 0x0000000105eefae0 FLLMTracker::TrackFree+ 27900640 (void const*, ELLMTracker, ELLMAllocType) + 112
9 UE4Demo 0x0000000105f1c49c FMemory::Free+ 28083356 (void*) + 200
10 CFNetwork 0x00000001bb945ce0 XTubeManager::~XTubeManager+ 204000 () + 56
11 CFNetwork 0x00000001bb945c28 XTubeManager::~XTubeManager+ 203816 () + 12
12 CFNetwork 0x00000001bb920300 -[__NSURLSessionLocal dealloc] + 48
13 libobjc.A.dylib 0x00000001ba565b9c (anonymous namespace)::AutoreleasePoolPage::pop+ 129948 (void*) + 672
14 libobjc.A.dylib 0x00000001ba54e220 call_load_methods + 732
15 libobjc.A.dylib 0x00000001ba54fe54 load_images + 180
16 dyld 0x000000010e54e390 dyld::notifySingle+ 9104 (dyld_image_states, ImageLoader const*, ImageLoader::InitializerTimingList*) + 444
17 dyld 0x000000010e560314 ImageLoader::recursiveInitialization+ 82708 (ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 440
18 dyld 0x000000010e55f370 ImageLoader::processInitializers+ 78704 (ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 136
19 dyld 0x000000010e55f42c ImageLoader::runInitializers+ 78892 (ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 84
20 dyld 0x000000010e54e6d8 dyld::initializeMainExecutable+ 9944 () + 220
21 dyld 0x000000010e5532a0 dyld::_main+ 29344 (macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 4304
22 dyld 0x000000010e54d044 _dyld_start + 68
The only thing I'm doing on launch is showing a menu widget (which works fine in editor and android).
As I understand from the log, the main problem is outside of my code. It seems like FMemory::Free and other things are just service processes after crash. And I'm pretty sure that there is no my code in the call stack.
It's an -ObjC flag. I have this flag in UE4 project settings, but it seems that these setting has no effect on XCode project. At least for UE4.21.2.
I figured out a solution that worked for me:
System Preferences
Battery
Click Battery on the left-side panel
Uncheck "Automatic Graphics Switching"
Upon starting the epic games launcher again, it worked for me and didn't crash anymore.
I have an issue with debugging my iOS application. When the app reaches the breakpoint it stops there for a second and then the debugger crashes. (The app doesn't crash, only the debugger. A behavior similar to a device being disconnected from cable while it's in debug mode).
The print from Xcode Console:
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'. Please file a bug and attach the most recent crash
log.
I checked the crash log and here's the part of the file:
Process: lldb-rpc-server [21320]
Path: /Applications/Xcode.app/Contents/SharedFrameworks/LLDBRPC.framework/Versions/A/Resources/lldb-rpc-server
Identifier: lldb-rpc-server
Version: 2
Code Type: X86-64 (Native)
Parent Process: Xcode [15500]
Responsible: lldb-rpc-server [21320]
User ID: 502
Date/Time: 2018-04-12 17:20:19.901 +0300
OS Version: Mac OS X 10.13.4 (17E199)
Report Version: 12
Anonymous UUID: BCD9F4BE-3ECF-2DD0-68EC-671CF1821432
Time Awake Since Boot: 24000 seconds
System Integrity Protection: enabled
Crashed Thread: 8 RPC packet thread for client tid 00055ab9 (350905)
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
Stack dump:
0. error finding type for _T07Staging11AppDelegateCD
abort() called
Thread 8 Crashed:: RPC packet thread for client tid 00055ab9 (350905)
0 libsystem_kernel.dylib 0x00007fff70cdcb6e __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff70ea7080 pthread_kill + 333
2 libsystem_c.dylib 0x00007fff70c3824d __abort + 144
3 libsystem_c.dylib 0x00007fff70c381bd abort + 142
4 com.apple.LLDB.framework 0x000000011132acdd swift::ModuleFile::fatal(llvm::Error) + 1213
5 com.apple.LLDB.framework 0x0000000111332711 swift::ModuleFile::getDeclChecked(llvm::PointerEmbeddedInt<unsigned int, 31>, llvm::Optional<swift::DeclContext*>) + 27649
6 com.apple.LLDB.framework 0x0000000111359e39 swift::ModuleFile::lookupValue(swift::DeclName, llvm::SmallVectorImpl<swift::ValueDecl*>&) + 841
7 com.apple.LLDB.framework 0x0000000110b43f9a swift::ModuleDecl::lookupValue(llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::DeclName, swift::NLKind, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 90
8 com.apple.LLDB.framework 0x0000000110b4e8aa void lookupInModule<llvm::SmallSet<swift::CanType, 4u, (anonymous namespace)::SortCanType>, swift::namelookup::lookupInModule(swift::ModuleDecl*, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::DeclName, llvm::SmallVectorImpl<swift::ValueDecl*>&, swift::NLKind, swift::namelookup::ResolutionKind, swift::LazyResolver*, swift::DeclContext const*, llvm::ArrayRef<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*> >)::$_0>(swift::ModuleDecl*, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, llvm::SmallVectorImpl<swift::ValueDecl*>&, swift::namelookup::ResolutionKind, bool, swift::LazyResolver*, llvm::SmallDenseMap<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*>, llvm::TinyPtrVector<swift::ValueDecl*>, 32u, llvm::DenseMapInfo<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*> >, llvm::detail::DenseMapPair<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*>, llvm::TinyPtrVector<swift::ValueDecl*> > >&, swift::DeclContext const*, bool, llvm::ArrayRef<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*> >, swift::namelookup::lookupInModule(swift::ModuleDecl*, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::DeclName, llvm::SmallVectorImpl<swift::ValueDecl*>&, swift::NLKind, swift::namelookup::ResolutionKind, swift::LazyResolver*, swift::DeclContext const*, llvm::ArrayRef<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*> >)::$_0) + 346
9 com.apple.LLDB.framework 0x0000000110b4e71e swift::namelookup::lookupInModule(swift::ModuleDecl*, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::DeclName, llvm::SmallVectorImpl<swift::ValueDecl*>&, swift::NLKind, swift::namelookup::ResolutionKind, swift::LazyResolver*, swift::DeclContext const*, llvm::ArrayRef<std::__1::pair<llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*> >) + 1278
10 com.apple.LLDB.framework 0x0000000110b550e1 swift::DeclContext::lookupQualified(swift::Type, swift::DeclName, swift::NLOptions, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 1089
11 com.apple.LLDB.framework 0x0000000110c56db2 DeclsLookupSource::lookupQualified(swift::Identifier, swift::NLOptions, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) + 226
12 com.apple.LLDB.framework 0x0000000110c5693d FindFirstNamedDeclWithKind(swift::ASTContext*, llvm::StringRef const&, swift::DeclKind, VisitNodeResult&, llvm::Optional<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >) + 301
13 com.apple.LLDB.framework 0x0000000110c5608c VisitNodeIdentifier(swift::ASTContext*, swift::Demangle::Node*, swift::Demangle::Node*, VisitNodeResult&) + 124
14 com.apple.LLDB.framework 0x0000000110c4ebf7 VisitNode(swift::ASTContext*, swift::Demangle::Node*, VisitNodeResult&) + 199
15 com.apple.LLDB.framework 0x0000000110c4eba0 VisitNode(swift::ASTContext*, swift::Demangle::Node*, VisitNodeResult&) + 112
16 com.apple.LLDB.framework 0x0000000110c4eba0 VisitNode(swift::ASTContext*, swift::Demangle::Node*, VisitNodeResult&) + 112
17 com.apple.LLDB.framework 0x0000000110c4eba0 VisitNode(swift::ASTContext*, swift::Demangle::Node*, VisitNodeResult&) + 112
18 com.apple.LLDB.framework 0x0000000110c5475c swift::ide::getTypeFromMangledSymbolname(swift::ASTContext&, llvm::StringRef, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) + 204
19 com.apple.LLDB.framework 0x000000011172ceda lldb_private::SwiftASTContext::GetTypeFromMangledTypename(char const*, lldb_private::Error&) + 532
20 com.apple.LLDB.framework 0x00000001114a5101 DWARFASTParserSwift::ParseTypeFromDWARF(lldb_private::SymbolContext const&, DWARFDIE const&, lldb_private::Log*, bool*) + 887
21 com.apple.LLDB.framework 0x00000001115c2623 SymbolFileDWARF::ParseType(lldb_private::SymbolContext const&, DWARFDIE const&, bool*) + 171
22 com.apple.LLDB.framework 0x00000001115bc33f SymbolFileDWARF::GetTypeForDIE(DWARFDIE const&, bool) + 369
23 com.apple.LLDB.framework 0x00000001115bbc6e SymbolFileDWARF::ResolveType(DWARFDIE const&, bool, bool) + 68
24 com.apple.LLDB.framework 0x00000001115bbbed SymbolFileDWARF::ResolveTypeUID(unsigned long long) + 45
25 com.apple.LLDB.framework 0x00000001116390d7 lldb_private::SymbolFileType::GetType() + 51
26 com.apple.LLDB.framework 0x000000011147be4f lldb_private::ValueObjectVariable::GetCompilerTypeImpl() + 21
27 com.apple.LLDB.framework 0x000000011146cf67 lldb_private::ValueObject::MaybeCalculateCompleteType() + 39
28 com.apple.LLDB.framework 0x00000001114712dd lldb_private::ValueObject::GetObjectRuntimeLanguage() + 33
29 com.apple.LLDB.framework 0x000000011147167b lldb_private::ValueObject::IsRuntimeSupportValue() + 73
30 com.apple.LLDB.framework 0x000000010eb3faec lldb::SBFrame::GetVariables(lldb::SBVariablesOptions const&) + 624
31 com.apple.LLDB.framework 0x000000010eb3fda4 lldb::SBFrame::GetVariables(bool, bool, bool, bool, lldb::DynamicValueType) + 208
32 lldb-rpc-server 0x000000010e8b0aef rpc_server::_ZN4lldb7SBFrame12GetVariablesEbbbbNS_16DynamicValueTypeE::HandleRPCCall(rpc_common::Connection&, rpc_common::RPCStream&, rpc_common::RPCStream&) + 219
33 lldb-rpc-server 0x000000010e87662a rpc_common::Connection::PrivateHandleRPCPacket(rpc_common::RPCPacket&, rpc_common::RPCPacket&, bool&) + 506
34 lldb-rpc-server 0x000000010e87730c rpc_common::Connection::HandleRPCPacket(rpc_common::RPCPacket&) + 62
35 lldb-rpc-server 0x000000010e87a862 Packets::ProcessPackets() + 254
36 lldb-rpc-server 0x000000010e87a68b Packets::ReadThread() + 187
37 lldb-rpc-server 0x000000010e87a5cb Packets::RunReadThread(void*) + 9
38 libsystem_pthread.dylib 0x00007fff70ea4661 _pthread_body + 340
39 libsystem_pthread.dylib 0x00007fff70ea450d _pthread_start + 377
40 libsystem_pthread.dylib 0x00007fff70ea3bf9 thread_start + 13
(the full output could be found here)
https://pastebin.com/18ZE08kv
Line 28 says:
error finding type for _T07Staging11AppDelegateCD
Does anybody know, what the error means?
Any help would be appreciated.
Regards
Just move your breakpoint by a line. Clean the project and try to run again, it should solve your problem.
Using ESRI ARCGis Maps into app, Crashlytics reported some crashes with following stack trace, but not able to reproduce it.
Any direction how to debug this crash.
#0
Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000000
Raw Text
0
libsystem_platform.dylib
_platform_memmove + 176
3
GLEngine
glDrawElements_ACC_ES2Exec
4 MyCity
Esri_runtimecore::Map_renderer::Sequence_pick_visitor::draw_() + 396
5 MyCity
Esri_runtimecore::Map_renderer::Graphic_buffer::visit_sequences_(std::__1::shared_ptr<Esri_runtimecore::HAL::Device> const&, std::__1::shared_ptr<Esri_runtimecore::Map_renderer::Sequence_visitor> const&, Esri_runtimecore::Map_renderer::Graphic_buffer::Allow_throttling, bool) + 972
6 MyCity
Esri_runtimecore::Map_renderer::Graphics_layer::gpu_hit_test_(std::__1::shared_ptr<Esri_runtimecore::HAL::Device> const&, std::__1::shared_ptr<Esri_runtimecore::Map_renderer::Display_properties> const&, std::__1::shared_ptr<Esri_runtimecore::Map_renderer::Hit_testable::Hit_test_request_details> const&) + 1004
7 MyCity
Esri_runtimecore::Map_renderer::Graphics_layer::hit_test(std::__1::shared_ptr<Esri_runtimecore::Geometry::Multi_path> const&, unsigned long) + 460
8 MyCity
-[AGSMapViewBase hitTestPoint:mapPoint:] + 232
9 MyCity
-[AGSMapView singleTap] + 336
10
UIKit
_UIGestureRecognizerSendTargetActions + 164
21
UIKit
UIApplicationMain + 204
22 MyCity
AppDelegate.swift line 16
main
23 libdispatch.dylib
(Missing)
Tried with NSZombieEnabled, but still not found anything.
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.
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.
Try deleting DerivedData. This worked for me. I think intermediate build products from Xcode 6 cause Xcode 7 to crash.
I had the same Swift issue and reinstalling Xcode fix the thing.
By reinstalling I mean removing xcode.app bundle, and removing files from
- /Library/Developer
- /Library/Developer/Application Support/Xcode
- ~/Library/Developer
- ~/Library/Developer/Application Support/Xcode
+ I did the same for Simulator app
Plus I removed all the xcode and simulator preferences, what probably wasn't necessary too - remove DerivedData folder would be enough
Probably removing and re-download XCode isn't necessa
And don't forget to make a backup before.
A solution might be disabling module debugging.
Search for CLANG_ENABLE_MODULE_DEBUGGING in you're project and set it to no.
I had the same problem in Xcode 9.1 when I tried to run the app on a real device.
I just delete the app from the device and when I rerun the project, the Xcode doesn't crash anymore.
Experienced this in my project despite the CLANG_ENABLE_MODULE_DEBUGGING flag being lowered. This is probably edge case but worth sharing anyways.
It was being caused by my latest commit where I accidentally declared a property as a protocol instead of id.
#property (nonatomic, strong) MyObjectProtocol *selectedItem;
and was fixed when I changed it to:
#property (nonatomic, strong) id<MyObjectProtocol> selectedItem;
A big whoops on my end but no thanks to Xcode!!