我的应用程序在设备上崩溃XCode,在模拟器上没有崩溃

时间:2015-06-19 11:58:13

标签: ios xcode crash

在我的ios应用程序中进行了一些重大更改后,(主要是从我的目标c框架中删除一些部分并在swift应用程序中使用它)在没有任何断点的设备上运行我的应用程序崩溃XCode(不是应用程序)的错误消息xcode下面。在模拟器上运行相同的应用程序不会导致Xcode崩溃。在设备上运行另一个应用程序也不会导致Xcode崩溃。

我是否有断点并不重要。

这是XCode崩溃日志:

<code>
Process:               Xcode [1364]
Path:                  /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier:            com.apple.dt.Xcode
Version:               6.3.1 (7703)
Build Info:            IDEFrameworks-7703000000000000~4
App Item ID:           497799835
App External ID:       812230896
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Xcode [1364]
User ID:               501

Date/Time:             2015-06-19 13:45:22.218 +0300
OS Version:            Mac OS X 10.10.3 (14D136)
Report Version:        11
Anonymous UUID:        A0B813FC-1FE1-D484-FDB2-F36AFFF2EA43

Sleep/Wake UUID:       E3C58018-8450-4DBC-90F5-2F5FFC1D8724

Time Awake Since Boot: 5100 seconds
Time Since Wake:       3900 seconds

Crashed Thread:        24

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

VM Regions Near 0:
--> 
    __TEXT                 0000000101510000-0000000101511000 [    4K] r-x/rwx SM=COW  /Applications/Xcode.app/Contents/MacOS/Xcode

Application Specific Information:
ProductBuildVersion: 6D1002

Thread 0:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib         0x00007fff88b224de mach_msg_trap + 10
1   libsystem_kernel.dylib         0x00007fff88b2164f mach_msg + 55
2   com.apple.CoreFoundation       0x00007fff9152deb4 __CFRunLoopServiceMachPort + 212
3   com.apple.CoreFoundation       0x00007fff9152d37b __CFRunLoopRun + 1371
4   com.apple.CoreFoundation       0x00007fff9152cbd8 CFRunLoopRunSpecific + 296
5   com.apple.HIToolbox           0x00007fff89c4f56f RunCurrentEventLoopInMode + 235
6   com.apple.HIToolbox           0x00007fff89c4f2ea ReceiveNextEventCommon + 431
7   com.apple.HIToolbox           0x00007fff89c4f12b _BlockUntilNextEventMatchingListInModeWithFilter + 71
8   com.apple.AppKit               0x00007fff8c1c59bb _DPSNextEvent + 978
9   com.apple.AppKit               0x00007fff8c1c4f68 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 346
10  com.apple.dt.DVTKit           0x0000000101c69dda -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 237
11  com.apple.AppKit               0x00007fff8c1babf3 -[NSApplication run] + 594
12  com.apple.AppKit               0x00007fff8c137354 NSApplicationMain + 1832
13  libdyld.dylib                 0x00007fff88c0d5c9 start + 1

Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0   libsystem_kernel.dylib         0x00007fff88b28232 kevent64 + 10
1   libdispatch.dylib             0x00007fff87d49a6a _dispatch_mgr_thread + 52

Thread 2:: com.apple.NSURLConnectionLoader
0   libsystem_kernel.dylib         0x00007fff88b224de mach_msg_trap + 10
1   libsystem_kernel.dylib         0x00007fff88b2164f mach_msg + 55
2   com.apple.CoreFoundation       0x00007fff9152deb4 __CFRunLoopServiceMachPort + 212
3   com.apple.CoreFoundation       0x00007fff9152d37b __CFRunLoopRun + 1371
4   com.apple.CoreFoundation       0x00007fff9152cbd8 CFRunLoopRunSpecific + 296
5   com.apple.CFNetwork           0x00007fff8b947220 +[NSURLConnection(Loader) _resourceLoadLoop:] + 434
6   com.apple.Foundation           0x00007fff90af7dc2 __NSThread__main__ + 1345
7   libsystem_pthread.dylib       0x00007fff8f958268 _pthread_body + 131
8   libsystem_pthread.dylib       0x00007fff8f9581e5 _pthread_start + 176
9   libsystem_pthread.dylib       0x00007fff8f95641d thread_start + 13

Thread 3:: com.apple.CFSocket.private
0   libsystem_kernel.dylib         0x00007fff88b273fa __select + 10
1   libsystem_pthread.dylib       0x00007fff8f958268 _pthread_body + 131
2   libsystem_pthread.dylib       0x00007fff8f9581e5 _pthread_start + 176
3   libsystem_pthread.dylib       0x00007fff8f95641d thread_start + 13

Thread 4:
0   libsystem_kernel.dylib         0x00007fff88b224de mach_msg_trap + 10
1   libsystem_kernel.dylib         0x00007fff88b2164f mach_msg + 55
2   com.apple.CoreFoundation       0x00007fff9152deb4 __CFRunLoopServiceMachPort + 212
3   com.apple.CoreFoundation       0x00007fff9152d37b __CFRunLoopRun + 1371
4   com.apple.CoreFoundation       0x00007fff9152cbd8 CFRunLoopRunSpecific + 296
5   com.apple.Foundation           0x00007fff90b49a59 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 278
6   com.apple.DTDeviceKitBase     0x000000010bc73f2c -[DTDKRemoteDeviceDataListener listenerThreadImplementation] + 974
7   com.apple.Foundation           0x00007fff90af7dc2 __NSThread__main__ + 1345
8   libsystem_pthread.dylib       0x00007fff8f958268 _pthread_body + 131
9   libsystem_pthread.dylib       0x00007fff8f9581e5 _pthread_start + 176
10  libsystem_pthread.dylib       0x00007fff8f95641d thread_start + 13

Thread 5:
0   libsystem_kernel.dylib         0x00007fff88b224de mach_msg_trap + 10
1   libsystem_kernel.dylib         0x00007fff88b2164f mach_msg + 55
2   com.apple.CoreFoundation       0x00007fff9152deb4 __CFRunLoopServiceMachPort + 212
3   com.apple.CoreFoundation       0x00007fff9152d37b __CFRunLoopRun + 1371
4   com.apple.CoreFoundation       0x00007fff9152cbd8 CFRunLoopRunSpecific + 296
5   com.apple.Foundation           0x00007fff90b49a59 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 278
6   com.apple.DTDeviceKitBase     0x000000010bc658c6 +[DTDKRemoteDeviceConnection startServiceBrowsers] + 213
7   com.apple.Foundation           0x00007fff90af7dc2 __NSThread__main__ + 1345
8   libsystem_pthread.dylib       0x00007fff8f958268 _pthread_body + 131
9   libsystem_pthread.dylib       0x00007fff8f9581e5 _pthread_start + 176
10  libsystem_pthread.dylib       0x00007fff8f95641d thread_start + 13

Thread 6:
0   libsystem_kernel.dylib         0x00007fff88b224de mach_msg_trap + 10
1   libsystem_kernel.dylib         0x00007fff88b2164f mach_msg + 55
2   com.apple.CoreFoundation       0x00007fff9152deb4 __CFRunLoopServiceMachPort + 212
3   com.apple.CoreFoundation       0x00007fff9152d37b __CFRunLoopRun + 1371
4   com.apple.CoreFoundation       0x00007fff9152cbd8 CFRunLoopRunSpecific + 296
5   com.apple.AppKit               0x00007fff8c28d66b _NSEventThread + 137
6   libsystem_pthread.dylib       0x00007fff8f958268 _pthread_body + 131
7   libsystem_pthread.dylib       0x00007fff8f9581e5 _pthread_start + 176
8   libsystem_pthread.dylib       0x00007fff8f95641d thread_start + 13

Thread 7:: DYMobileDeviceManager
0   libsystem_kernel.dylib         0x00007fff88b224de mach_msg_trap + 10
1   libsystem_kernel.dylib         0x00007fff88b2164f mach_msg + 55
2   com.apple.CoreFoundation       0x00007fff9152deb4 __CFRunLoopServiceMachPort + 212
3   com.apple.CoreFoundation       0x00007fff9152d37b __CFRunLoopRun + 1371
4   com.apple.CoreFoundation       0x00007fff9152cbd8 CFRunLoopRunSpecific + 296
5   com.apple.Foundation           0x00007fff90b49a59 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 278
6   com.apple.Foundation           0x00007fff90bbf17f -[NSRunLoop(NSRunLoop) run] + 74
7   com.apple.GPUToolsMobileFoundation 0x000000011246a89b -[DYMobileDeviceManager _deviceNotificationThread:] + 134
8   com.apple.Foundation           0x00007fff90af7dc2 __NSThread__main__ + 1345
9   libsystem_pthread.dylib       0x00007fff8f958268 _pthread_body + 131
10  libsystem_pthread.dylib       0x00007fff8f9581e5 _pthread_start + 176
11  libsystem_pthread.dylib       0x00007fff8f95641d thread_start + 13

Thread 8:
0   libsystem_kernel.dylib         0x00007fff88b27136 __psynch_cvwait + 10
1   com.apple.Xcode.DevToolsCore   0x000000010b63c426 -[XCBlockQueue _processBlocksInThreadSlotNumber:] + 456
2   com.apple.Foundation           0x00007fff90af7dc2 __NSThread__main__ + 1345
3   libsystem_pthread.dylib       0x00007fff8f958268 _pthread_body + 131
4   libsystem_pthread.dylib       0x00007fff8f9581e5 _pthread_start + 176
5   libsystem_pthread.dylib       0x00007fff8f95641d thread_start + 13

Thread 9:
0   libsystem_kernel.dylib         0x00007fff88b27136 __psynch_cvwait + 10
1   com.apple.Xcode.DevToolsCore   0x000000010b63c426 -[XCBlockQueue _processBlocksInThreadSlotNumber:] + 456
2   com.apple.Foundation           0x00007fff90af7dc2 __NSThread__main__ + 1345
3   libsystem_pthread.dylib       0x00007fff8f958268 _pthread_body + 131
4   libsystem_pthread.dylib       0x00007fff8f9581e5 _pthread_start + 176
5   libsystem_pthread.dylib       0x00007fff8f95641d thread_start + 13

Thread 10:
0   libsystem_kernel.dylib         0x00007fff88b27136 __psynch_cvwait + 10
1   com.apple.Xcode.DevToolsCore   0x000000010b63c426 -[XCBlockQueue _processBlocksInThreadSlotNumber:] + 456
2   com.apple.Foundation           0x00007fff90af7dc2 __NSThread__main__ + 1345
3   libsystem_pthread.dylib       0x00007fff8f958268 _pthread_body + 131
4   libsystem_pthread.dylib       0x00007fff8f9581e5 _pthread_start + 176
5   libsystem_pthread.dylib       0x00007fff8f95641d thread_start + 13

Thread 11:
0   libsystem_kernel.dylib         0x00007fff88b2794a __workq_kernreturn + 10
1   libsystem_pthread.dylib       0x00007fff8f95640d start_wqthread + 13

Thread 12:
0   libsystem_kernel.dylib         0x00007fff88b2794a __workq_kernreturn + 10
1   libsystem_pthread.dylib       0x00007fff8f95640d start_wqthread + 13

Thread 13:
0   libsystem_kernel.dylib         0x00007fff88b2794a __workq_kernreturn + 10
1   libsystem_pthread.dylib       0x00007fff8f95640d start_wqthread + 13

Thread 14:
0   libsystem_kernel.dylib         0x00007fff88b2794a __workq_kernreturn + 10
1   libsystem_pthread.dylib       0x00007fff8f95640d start_wqthread + 13

Thread 15:
0   libsystem_kernel.dylib         0x00007fff88b2794a __workq_kernreturn + 10
1   libsystem_pthread.dylib       0x00007fff8f95640d start_wqthread + 13

Thread 16:: Dispatch queue: parsing queue
0   libsystem_kernel.dylib         0x00007fff88b2251a semaphore_wait_trap + 10
1   libdispatch.dylib             0x00007fff87d4dc55 _dispatch_semaphore_wait_slow + 213
2   com.apple.dt.instruments.DTXConnectionServices 0x000000010355cd7a -[DTXMessageParser waitForMoreData:incrementalBuffer:] + 87
3   com.apple.dt.instruments.DTXConnectionServices 0x000000010355c9b8 -[DTXMessageParser parseMessage] + 50
4   com.apple.dt.instruments.DTXConnectionServices 0x000000010355c776 __43-[DTXMessageParser initWithMessageHandler:]_block_invoke + 35
5   libdispatch.dylib             0x00007fff87d4b323 _dispatch_call_block_and_release + 12
6   libdispatch.dylib             0x00007fff87d46c13 _dispatch_client_callout + 8
7   libdispatch.dylib             0x00007fff87d4a365 _dispatch_queue_drain + 1100
8   libdispatch.dylib             0x00007fff87d4becc _dispatch_queue_invoke + 202
9   libdispatch.dylib             0x00007fff87d496b7 _dispatch_root_queue_drain + 463
10  libdispatch.dylib             0x00007fff87d57fe4 _dispatch_worker_thread3 + 91
11  libsystem_pthread.dylib       0x00007fff8f958637 _pthread_wqthread + 729
12  libsystem_pthread.dylib       0x00007fff8f95640d start_wqthread + 13

Thread 17:
0   libsystem_kernel.dylib         0x00007fff88b2730a __read_nocancel + 10
1   libsystem_c.dylib             0x00007fff88ac6f4b __srefill1 + 24
2   libsystem_c.dylib             0x00007fff88ac07db fgets + 104
3   com.apple.LLDB.framework       0x000000010a18cbc1 lldb_private::IOHandlerEditline::GetLine(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, bool&) + 341
4   com.apple.LLDB.framework       0x000000010a18d03c lldb_private::IOHandlerEditline::Run() + 176
5   com.apple.LLDB.framework       0x000000010a0a446c lldb_private::Debugger::ExecuteIOHanders() + 86
6   com.apple.LLDB.framework       0x000000010a0a64c8 lldb_private::Debugger::IOHandlerThread(void*) + 14
7   libsystem_pthread.dylib       0x00007fff8f958268 _pthread_body + 131
8   libsystem_pthread.dylib       0x00007fff8f9581e5 _pthread_start + 176
9   libsystem_pthread.dylib       0x00007fff8f95641d thread_start + 13

Thread 18:
0   libsystem_kernel.dylib         0x00007fff88b224de mach_msg_trap + 10
1   libsystem_kernel.dylib         0x00007fff88b2164f mach_msg + 55
2   com.apple.CoreFoundation       0x00007fff9152deb4 __CFRunLoopServiceMachPort + 212
3   com.apple.CoreFoundation       0x00007fff9152d37b __CFRunLoopRun + 1371
4   com.apple.CoreFoundation       0x00007fff9152cbd8 CFRunLoopRunSpecific + 296
5   com.apple.CoreFoundation       0x00007fff915e4671 CFRunLoopRun + 97
6   com.apple.DebugSymbols         0x00007fff89949b8f SpotlightQueryThread(void*) + 463
7   libsystem_pthread.dylib       0x00007fff8f958268 _pthread_body + 131
8   libsystem_pthread.dylib       0x00007fff8f9581e5 _pthread_start + 176
9   libsystem_pthread.dylib       0x00007fff8f95641d thread_start + 13

Thread 19:
0   libsystem_kernel.dylib         0x00007fff88b27136 __psynch_cvwait + 10
1   com.apple.LLDB.framework       0x000000010a156049 lldb_private::Condition::Wait(lldb_private::Mutex&, lldb_private::TimeValue const*, bool*) + 109
2   com.apple.LLDB.framework       0x000000010a15769a lldb_private::Predicate<bool>::WaitForValueEqualTo(bool, lldb_private::TimeValue const*, bool*) + 90
3   com.apple.LLDB.framework       0x000000010a0b23e7 lldb_private::Listener::WaitForEventsInternal(lldb_private::TimeValue const*, lldb_private::Broadcaster*, lldb_private::ConstString const*, unsigned int, unsigned int, std::__1::shared_ptr<lldb_private::Event>&) + 327
4   com.apple.LLDB.framework       0x000000010a0b24fb lldb_private::Listener::WaitForEvent(lldb_private::TimeValue const*, std::__1::shared_ptr<lldb_private::Event>&) + 27
5   com.apple.LLDB.framework       0x000000010a1c87e0 ProcessGDBRemote::AsyncThread(void*) + 1228
6   libsystem_pthread.dylib       0x00007fff8f958268 _pthread_body + 131
7   libsystem_pthread.dylib       0x00007fff8f9581e5 _pthread_start + 176
8   libsystem_pthread.dylib       0x00007fff8f95641d thread_start + 13


VM Region Summary:
ReadOnly portion of Libraries: Total=415.9M resident=152.4M(37%) swapped_out_or_unallocated=263.6M(63%)
Writable regions: Total=1.5G written=329.4M(21%) resident=404.7M(26%) swapped_out=608K(0%) unallocated=1.1G(74%)
 
REGION TYPE                        VIRTUAL
===========                        =======
Activity Tracing                     2048K
CG backing stores                    8392K
CG image                             1088K
CG shared images                      432K
CoreAnimation                        9048K
CoreData Object IDs                  4100K
CoreImage                               8K
CoreUI image data                     220K
Dispatch continuations               8192K
Foundation                             16K
Image IO                              188K
JS JIT generated code                   8K
JS JIT generated code (reserved)      1.0G        reserved VM address space (unallocated)
Kernel Alloc Once                       8K
MALLOC                              399.2M
MALLOC (admin)                         32K
Memory Tag 242                         12K
Memory Tag 249                        156K
Memory Tag 251                         44K
OpenCL                                 24K
SQLite page cache                    2048K
STACK GUARD                          56.1M
Stack                                42.2M
VM_ALLOCATE                          17.3M
WebKit Malloc                         464K
__DATA                               45.3M
__IMAGE                               528K
__LINKEDIT                          106.7M
__TEXT                              309.2M
__UNICODE                             552K
mapped file                         537.2M
shared memory                           4K
===========                        =======
TOTAL           `enter code here`                      2.5G
TOTAL, minus reserved VM space        1.5G
</code>

2 个答案:

答案 0 :(得分:0)

尝试这种方式...退出系统偏好设置。在Finder中,选择Go&gt;从菜单栏转到“文件夹...”,然后在打开的文本框中输入以下内容:  〜/库/首选项/ MobileMeAccounts.plist 将所选文件移动到桌面并保持Finder窗口打开。打开系统首选项并测试。如果仍然发生崩溃,请将文件放在桌面上,然后再将其放在桌面上。否则,重新创建设置并删除您移动的文件。

这可能会对您有所帮助Check This

答案 1 :(得分:0)

我使用的是我在项目中创建的框架。将此框架添加到嵌入式二进制文件解决了XCode中的崩溃问题。

将框架添加到嵌入式二进制文件:    1.在目标中打开常规选项卡    2.在嵌入式二进制文件部分中添加框架