菜鸟教程小白 发表于 2022-12-13 09:09:32

ios - 如何在启动时调试 iOS 应用程序崩溃,仅在程序集文件中设置断点


                                            <p><p>我正面临一个当前正在开发的应用的问题。
问题是应用程序在启动时在后台运行了一段时间后崩溃,并且仅在这种情况下。
在应用程序被杀死时启动应用程序不会导致从调试器或手机崩溃。
在后台启动应用程序大约 5-10 分钟不会导致崩溃,无论是否调试。
在后台启动应用程序大约 15-20 分钟会导致崩溃。在异常上使用调试器和断点给了我这个文件:</p>

<pre><code>libdispatch.dylib`_dispatch_assert_queue_fail:
0x349c6ce4:push   {r4, r5, r7, lr}
0x349c6ce6:add    r7, sp, #0x8
0x349c6ce8:sub    sp, #0xc
0x349c6cea:movw   r5, #0x7810
0x349c6cee:mov    r4, r0
0x349c6cf0:movt   r5, #0x1
0x349c6cf4:movw   r12, #0x7af0
0x349c6cf8:movt   r12, #0x1
0x349c6cfc:movw   r9, #0x7a83
0x349c6d00:movt   r9, #0x1
0x349c6d04:ldr    r0,
0x349c6d06:movw   r2, #0x7a93
0x349c6d0a:movt   r2, #0x1
0x349c6d0e:movw   r3, #0x7af5
0x349c6d12:movt   r3, #0x1
0x349c6d16:add    r5, pc
0x349c6d18:cmp    r0, #0x0
0x349c6d1a:it   ne
0x349c6d1c:movner5, r0
0x349c6d1e:add    r12, pc
0x349c6d20:add    r9, pc
0x349c6d22:add    r3, pc
0x349c6d24:cmp    r1, #0x0
0x349c6d26:add    r2, pc
0x349c6d28:strd   r4, r5,
0x349c6d2c:it   ne
0x349c6d2e:movner3, r12
0x349c6d30:add    r0, sp, #0x8
0x349c6d32:mov    r1, r9
0x349c6d34:blx    0x349dda4c                ; symbol stub for: -
0x349c6d38:movw   r0, #0x7ae0
0x349c6d3c:movt   r0, #0x1
0x349c6d40:ldr    r1,
0x349c6d42:add    r0, pc
0x349c6d44:bl   0x349c65cc                ; _dispatch_log
0x349c6d48:trap   
0x349c6d4a:nop   
</code></pre>

<p>调试器在陷阱行上中断,就在结尾的 nop 之前:</p>

<pre><code>Thread 1: EXC_BREAKPOINT (code=EXC_ARM_BREAKPOINT, subcode=0xdefe)
</code></pre>

<p>我找不到任何关于如何调试的线索。</p>

<p>任何帮助将不胜感激。</p>

<p>编辑:这是带有堆栈跟踪的崩溃日志(我将设备名称替换为 DeviceName,将应用名称和公司名称替换​​为 com.company.myAppName):</p>

<pre><code>Sep 22 11:36:31 DeviceName locationd &lt;Notice&gt;: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0
Sep 22 11:36:31 DeviceName myAppName &lt;Warning&gt;: *** Assertion failure in -, /SourceCache/BaseBoard/BaseBoard-97/BaseBoard/BSAction.m:221
Sep 22 11:36:32 DeviceName myAppName &lt;Notice&gt;: BUG in client of libdispatch: Assertion failed: Block was run on an unexpected queue
    Expected queue: 0x0x3713cd40
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: task_set_exception_ports(B07, 400, D03, 0, 0) failed with error (4: (os/kern) invalid argument)
Sep 22 11:36:32 DeviceName ReportCrash &lt;Notice&gt;: ReportCrash acting against PID 6750
Sep 22 11:36:32 DeviceName diagnosticd &lt;Error&gt;: error evaluating process info - pid: 6750, punique: 6750
Sep 22 11:36:32 DeviceName ReportCrash &lt;Notice&gt;: Formulating crash report for process myAppName
Sep 22 11:36:32 DeviceName SpringBoard &lt;Warning&gt;: BSXPCMessage received error for message: Connection invalid
Sep 22 11:36:32 DeviceName wifid &lt;Notice&gt;: WiFi:: BG Application: Not Present, BG Daemon: Present. Daemons: lockdownd networkd assistantd
Sep 22 11:36:32 DeviceName com.apple.xpc.launchd (UIKitApplication:com.company.myAppName) &lt;Notice&gt;: Service exited due to signal: Trace/BPT trap: 5
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Not saving crash log because we have reached the limit for logs to store on disk.Sync or otherwise clear logs from /var/mobile/Library/Logs/CrashReporter to save new logs.
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Could not save crash report to disk!
Sep 22 11:36:32 DeviceName SpringBoard &lt;Warning&gt;: Application &#39;UIKitApplication:com.company.myAppName&#39; crashed.
Sep 22 11:36:32 DeviceName assertiond &lt;Warning&gt;: Could not set priority of &lt;BKNewProcess: 0x145437b0; com.company.myAppName; pid: 6750&gt; to 2, priority: No such process
Sep 22 11:36:32 DeviceName assertiond &lt;Warning&gt;: Could not set priority of &lt;BKNewProcess: 0x145437b0; com.company.myAppName; pid: 6750&gt; to 4096, priority: No such process
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Incident Identifier: DF8D30C9-4F46-43CB-B192-323E819180A6
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: CrashReporter Key:   a93a18a1167cbedc4b3623154bd083fdd7770808
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Hardware Model:      iPhone5,2
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Process:             myAppName
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Path:                /private/var/mobile/Containers/Bundle/Application/DE60F941-317E-49C2-95EA-0F152A117C16/myAppName.app/myAppName
Sep 22 11:36:32 DeviceName UserEventAgent &lt;Warning&gt;: id=com.company.myAppName pid=6750, state=0
Sep 22 11:36:32 DeviceName backboardd &lt;Warning&gt;: Unable to bootstrap_look_up port with name com.company.myAppName.gsEvents: unknown error code (1102)
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Identifier:          myAppName
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Version:             ???
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Code Type:         ARM (Native)
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Parent Process:      launchd
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Date/Time:         2014-09-22 11:36:32.054 +0200
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Launch Time:         2014-09-22 11:25:29.726 +0200
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: OS Version:          iOS 8.0 (12A365)
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Report Version:      105
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Exception Type:EXC_BREAKPOINT (SIGTRAP)
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Exception Codes: 0x0000000000000001, 0x000000000000defe
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Triggered by Thread:0
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Last Exception Backtrace:
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: (0x26db3e3a 0x34461c86 0x26db3d10 0x27a845aa 0x2b8bf8c8 0x349c8b64 0x2b8bf832 0x2a7c7ba8 0x349c18c6 0x349c18b2 0x349c50ba 0x26d79be4 0x26d782e4 0x26cc661c 0x26cc642e 0x2e0740a4 0x2a2b0804 0xcee48 0x349e1aaa)
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Thread 0 Crashed:
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 0   libdispatch.dylib               0x349c6d48 0x349c0000 + 27976
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 1   libdispatch.dylib               0x349c4be4 0x349c0000 + 19428
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 2   FrontBoardServices                0x2d4e7830 0x2d4df000 + 34864
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 3   FrontBoardServices                0x2d4f40e6 0x2d4df000 + 86246
Sep 22 11:36:32 DeviceName SpringBoard &lt;Warning&gt;: Unable to deliver - message to port 0: (ipc/send) invalid destination port
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 4   CoreFoundation                  0x26d7a5b2 0x26cae000 + 837042
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 5   CoreFoundation                  0x26d79874 0x26cae000 + 833652
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 6   CoreFoundation                  0x26d77ff6 0x26cae000 + 827382
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 7   CoreFoundation                  0x26cc661c 0x26cae000 + 99868
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 8   CoreFoundation                  0x26cc642e 0x26cae000 + 99374
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 9   myAppName                         0x00177f72 0x4f000 + 1216370
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 10CoreFoundation                  0x26db416c 0x26cae000 + 1073516
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 11libobjc.A.dylib                   0x34461f10 0x3445b000 + 28432
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 12libc++abi.dylib                   0x33d9ade0 0x33d83000 + 97760
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 13libc++abi.dylib                   0x33d9a5a4 0x33d83000 + 95652
Sep 22 11:36:32 DeviceName locationd &lt;Notice&gt;: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 14libobjc.A.dylib                   0x34461d5a 0x3445b000 + 27994
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 15CoreFoundation                  0x26db3d10 0x26cae000 + 1072400
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 16Foundation                        0x27a845aa 0x279f2000 + 599466
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 17BaseBoard                         0x2b8bf8c8 0x2b89b000 + 149704
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 18libdispatch.dylib               0x349c8b64 0x349c0000 + 35684
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 19BaseBoard                         0x2b8bf832 0x2b89b000 + 149554
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 20UIKit                           0x2a7c7ba8 0x2a242000 + 5790632
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 21libdispatch.dylib               0x349c18c8 0x349c0000 + 6344
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 22libdispatch.dylib               0x349c18b4 0x349c0000 + 6324
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 23libdispatch.dylib               0x349c50ba 0x349c0000 + 20666
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 24CoreFoundation                  0x26d79be4 0x26cae000 + 834532
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 25CoreFoundation                  0x26d782e4 0x26cae000 + 828132
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 26CoreFoundation                  0x26cc661c 0x26cae000 + 99868
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 27CoreFoundation                  0x26cc642e 0x26cae000 + 99374
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 28GraphicsServices                  0x2e0740a4 0x2e06b000 + 37028
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 29UIKit                           0x2a2b0804 0x2a242000 + 452612
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 30myAppName                         0x000cee48 0x4f000 + 523848
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 31libdyld.dylib                     0x349e1aac 0x349e0000 + 6828
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Thread 1 name:Dispatch queue: com.apple.libdispatch-manager
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Thread 1:
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 0   libsystem_kernel.dylib            0x34a942a0 0x34a93000 + 4768
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 1   libdispatch.dylib               0x349cd9fc 0x349c0000 + 55804
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 2   libdispatch.dylib               0x349c331e 0x349c0000 + 13086
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Thread 2 name:GAIThreadDispatch queue: NSPersistentStoreCoordinator 0x15582b60
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Thread 2:
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 0   libsystem_kernel.dylib            0x34aa9388 0x34a93000 + 91016
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 1   libsqlite3.dylib                  0x347e4164 0x3474b000 + 627044
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 2   libsqlite3.dylib                  0x3479334a 0x3474b000 + 295754
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 3   libsqlite3.dylib                  0x347d2544 0x3474b000 + 554308
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 4   libsqlite3.dylib                  0x347d1e54 0x3474b000 + 552532
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 5   libsqlite3.dylib                  0x34792f8e 0x3474b000 + 294798
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 6   libsqlite3.dylib                  0x34787c72 0x3474b000 + 248946
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 7   libsqlite3.dylib                  0x347657dc 0x3474b000 + 108508
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 8   libsqlite3.dylib                  0x34783f10 0x3474b000 + 233232
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 9   libsqlite3.dylib                  0x34778ed6 0x3474b000 + 188118
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 10CoreData                        0x26ab7ab8 0x26aa2000 + 88760
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 11CoreData                        0x26af0d92 0x26aa2000 + 322962
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 12CoreData                        0x26b87110 0x26aa2000 + 938256
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 13CoreData                        0x26b6c3ac 0x26aa2000 + 828332
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 14CoreData                        0x26b717c8 0x26aa2000 + 849864
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 15libdispatch.dylib               0x349c18b4 0x349c0000 + 6324
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 16libdispatch.dylib               0x349c8b64 0x349c0000 + 35684
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 17CoreData                        0x26b65302 0x26aa2000 + 799490
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 18CoreData                        0x26b6bf9a 0x26aa2000 + 827290
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 19CoreData                        0x26b3d5be 0x26aa2000 + 636350
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 20myAppName                         0x0017312c 0x4f000 + 1196332
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 21myAppName                         0x00171c46 0x4f000 + 1190982
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 22myAppName                         0x00172fe2 0x4f000 + 1196002
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 23myAppName                         0x0017d77e 0x4f000 + 1238910
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 24myAppName                         0x0017e9ee 0x4f000 + 1243630
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 25myAppName                         0x0017e7ec 0x4f000 + 1243116
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 26Foundation                        0x27ac359a 0x279f2000 + 857498
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 27CoreFoundation                  0x26d7a58c 0x26cae000 + 837004
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 28CoreFoundation                  0x26d7999a 0x26cae000 + 833946
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 29CoreFoundation                  0x26d78000 0x26cae000 + 827392
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 30CoreFoundation                  0x26cc661c 0x26cae000 + 99868
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 31CoreFoundation                  0x26cc642e 0x26cae000 + 99374
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 32Foundation                        0x279fe428 0x279f2000 + 50216
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 33Foundation                        0x27a4c8e8 0x279f2000 + 370920
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 34myAppName                         0x0016f678 0x4f000 + 1181304
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 35Foundation                        0x27ac3386 0x279f2000 + 856966
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 36libsystem_pthread.dylib         0x34b24e90 0x34b22000 + 11920
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 37libsystem_pthread.dylib         0x34b24e02 0x34b22000 + 11778
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 38libsystem_pthread.dylib         0x34b22b8c 0x34b22000 + 2956
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Thread 3:
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 0   libsystem_kernel.dylib            0x34aa7b38 0x34a93000 + 84792
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 1   libsystem_pthread.dylib         0x34b243f4 0x34b22000 + 9204
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 2   libsystem_pthread.dylib         0x34b252d8 0x34b22000 + 13016
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 3   Foundation                        0x27a48f62 0x279f2000 + 356194
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 4   myAppName                         0x0011f036 0x4f000 + 852022
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 5   Foundation                        0x27ac3386 0x279f2000 + 856966
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 6   libsystem_pthread.dylib         0x34b24e90 0x34b22000 + 11920
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 7   libsystem_pthread.dylib         0x34b24e02 0x34b22000 + 11778
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 8   libsystem_pthread.dylib         0x34b22b8c 0x34b22000 + 2956
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Thread 4:
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 0   libsystem_kernel.dylib            0x34aa89cc 0x34a93000 + 88524
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 1   libsystem_pthread.dylib         0x34b22ea8 0x34b22000 + 3752
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 2   libsystem_pthread.dylib         0x34b22b80 0x34b22000 + 2944
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Thread 5 name:PF_AFNetworking
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Thread 5:
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 0   libsystem_kernel.dylib            0x34a944f0 0x34a93000 + 5360
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 1   libsystem_kernel.dylib            0x34a942e4 0x34a93000 + 4836
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 2   CoreFoundation                  0x26d79b4e 0x26cae000 + 834382
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 3   CoreFoundation                  0x26d780f4 0x26cae000 + 827636
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 4   CoreFoundation                  0x26cc661c 0x26cae000 + 99868
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 5   CoreFoundation                  0x26cc642e 0x26cae000 + 99374
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 6   Foundation                        0x279fe428 0x279f2000 + 50216
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 7   Foundation                        0x27a4c8e8 0x279f2000 + 370920
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 8   myAppName                         0x001317ee 0x4f000 + 927726
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 9   Foundation                        0x27ac3386 0x279f2000 + 856966
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 10libsystem_pthread.dylib         0x34b24e90 0x34b22000 + 11920
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 11libsystem_pthread.dylib         0x34b24e02 0x34b22000 + 11778
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 12libsystem_pthread.dylib         0x34b22b8c 0x34b22000 + 2956
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Thread 6 name:com.apple.NSURLConnectionLoader
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Thread 6:
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 0   libsystem_kernel.dylib            0x34a944f0 0x34a93000 + 5360
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 1   libsystem_kernel.dylib            0x34a942e4 0x34a93000 + 4836
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 2   CoreFoundation                  0x26d79b4e 0x26cae000 + 834382
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 3   CoreFoundation                  0x26d780f4 0x26cae000 + 827636
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 4   CoreFoundation                  0x26cc661c 0x26cae000 + 99868
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 5   CoreFoundation                  0x26cc642e 0x26cae000 + 99374
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 6   CFNetwork                         0x2687f3da 0x26803000 + 508890
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 7   Foundation                        0x27ac3386 0x279f2000 + 856966
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 8   libsystem_pthread.dylib         0x34b24e90 0x34b22000 + 11920
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 9   libsystem_pthread.dylib         0x34b24e02 0x34b22000 + 11778
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 10libsystem_pthread.dylib         0x34b22b8c 0x34b22000 + 2956
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Thread 7 name:com.apple.CFSocket.private
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Thread 7:
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 0   libsystem_kernel.dylib            0x34aa808c 0x34a93000 + 86156
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 1   CoreFoundation                  0x26d7e31a 0x26cae000 + 852762
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 2   libsystem_pthread.dylib         0x34b24e90 0x34b22000 + 11920
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 3   libsystem_pthread.dylib         0x34b24e02 0x34b22000 + 11778
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 4   libsystem_pthread.dylib         0x34b22b8c 0x34b22000 + 2956
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Thread 8:
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 0   libsystem_kernel.dylib            0x34aa89cc 0x34a93000 + 88524
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 1   libsystem_pthread.dylib         0x34b22ea8 0x34b22000 + 3752
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 2   libsystem_pthread.dylib         0x34b22b80 0x34b22000 + 2944
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Thread 9:
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 0   libsystem_kernel.dylib            0x34aa89cc 0x34a93000 + 88524
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 1   libsystem_pthread.dylib         0x34b22ea8 0x34b22000 + 3752
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 2   libsystem_pthread.dylib         0x34b22b80 0x34b22000 + 2944
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Thread 10:
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 0   libsystem_kernel.dylib            0x34aa89cc 0x34a93000 + 88524
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 1   libsystem_pthread.dylib         0x34b22ea8 0x34b22000 + 3752
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 2   libsystem_pthread.dylib         0x34b22b80 0x34b22000 + 2944
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Thread 11:
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 0   libsystem_kernel.dylib            0x34aa89cc 0x34a93000 + 88524
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 1   libsystem_pthread.dylib         0x34b22ea8 0x34b22000 + 3752
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 2   libsystem_pthread.dylib         0x34b22b80 0x34b22000 + 2944
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Thread 12:
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 0   libsystem_kernel.dylib            0x34aa89cc 0x34a93000 + 88524
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 1   libsystem_pthread.dylib         0x34b22ea8 0x34b22000 + 3752
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 2   libsystem_pthread.dylib         0x34b22b80 0x34b22000 + 2944
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Thread 0 crashed with ARM Thread State (32-bit):
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;:   r0: 0x0056c500    r1: 0x00000000      r2: 0x156a7a00      r3: 0x00000fff
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;:   r4: 0x3713cd40    r5: 0x349de338      r6: 0x352bfca8      r7: 0x005622e8
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;:   r8: 0x155c4610    r9: 0x156a8000   r10: 0x155c4610   r11: 0x156cb5f0
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;:   ip: 0x37154124    sp: 0x005622d4      lr: 0x349c6d49      pc: 0x349c6d48
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;:   cpsr: 0x60000030
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: Binary Images:
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 0x4f000 - 0x2eefff myAppName armv7&lt;8d48834e6e563ba08bd970b675b2c2b1&gt; /var/mobile/Containers/Bundle/Application/DE60F941-317E-49C2-95EA-0F152A117C16/myAppName.app/myAppName
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 0x1fed6000 - 0x1fef9fff dyld armv7s&lt;fd3fef9c43c9382e8e46d5d59fb52f86&gt; /usr/lib/dyld
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 0x25852000 - 0x259befff AVFoundation armv7s&lt;291c7a621b65396491697e7a7f728b16&gt; /System/Library/Frameworks/AVFoundation.framework/AVFoundation
Sep 22 11:36:32 DeviceName ReportCrash &lt;Error&gt;: 0x259bf000 - 0x25a1dfff libAVFAudio.dylib armv7s&lt;1b452a7a75513cf9aa82e59feb7eef33&gt; /System/Library/Frameworks/AVFoundation.framework/libAVFAudio.dylib
A lot of lines like the previous one
</code></pre></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>查看此错误消息。 iOS SDK 中的断言检查似乎失败。</p>

<pre><code>*** Assertion failure in -, /SourceCache/BaseBoard/BaseBoard-97/BaseBoard/BSAction.m:221
BUG in client of libdispatch: Assertion failed: Block was run on an unexpected queue
Expected queue: 0x0x3713cd40
</code></pre>

<p>断言确实检查了指定的 block 是否会在正确的调度队列上运行。从断言消息和堆栈跟踪中,<code>-</code> 使用 <a href="http://opensource.apple.com/source/libdispatch/libdispatch-339.92.1/src/queue.c" rel="noreferrer noopener nofollow">dispatch_assert_queue</a>检查应用程序代码是否正确使用 block 的主队列。</p>

<p>所以你最好检查一下你应该使用主队列的后台获取代码,但是你的代码使用的是全局队列、串行队列或并发队列。</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 如何在启动时调试 iOS 应用程序崩溃,仅在程序集文件中设置断点,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/25992205/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/25992205/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 如何在启动时调试 iOS 应用程序崩溃,仅在程序集文件中设置断点