• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

ios - 仅限生产版本的 EXC_BREAKPOINT (SIGTRAP)

[复制链接]
菜鸟教程小白 发表于 2022-12-11 17:31:58 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题

我的 iOS 应用在测试中运行良好,但在使用从 App Store 下载的发布版本时启动时崩溃。我尝试使用 Xcode 中的发布构建配置重新测试,它不会崩溃,只是商店版本。我很确定这与应用内购买产品加载有关,但由于无法在测试环境中复制它并且无法阅读日志,因此无法缩小范围。设备日志显示如下:

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000000e7ffdefe
Triggered by Thread:  5

Filtered syslog:
None found

Global Trace Buffer (reverse chronological seconds):
1.456537     CFNetwork                  0x0000000025b13755 TCP Conn 0x16696ed0 SSL Handshake DONE
1.507619     CFNetwork                  0x0000000025b13755 TCP Conn 0x16697670 SSL Handshake DONE
1.618210     CFNetwork                  0x0000000025b1368f TCP Conn 0x16696ed0 starting SSL negotiation
1.619545     CFNetwork                  0x0000000025b1368f TCP Conn 0x16697670 starting SSL negotiation
1.619545     CFNetwork                  0x0000000025b9387d TCP Conn 0x16696ed0 complete. fd: 12, err: 0
1.620001     CFNetwork                  0x0000000025b9387d TCP Conn 0x16697670 complete. fd: 10, err: 0
1.621124     CFNetwork                  0x0000000025b94977 TCP Conn 0x16696ed0 event 1. err: 0
1.622355     CFNetwork                  0x0000000025b94977 TCP Conn 0x16697670 event 1. err: 0
1.699555     CFNetwork                  0x0000000025b949f5 TCP Conn 0x16697670 started
1.699555     CFNetwork                  0x0000000025b949f5 TCP Conn 0x16696ed0 started
1.757512     CFNetwork                  0x0000000025b13755 TCP Conn 0x16684640 SSL Handshake DONE
2.136019     CFNetwork                  0x0000000025b1368f TCP Conn 0x16684640 starting SSL negotiation
2.136958     CFNetwork                  0x0000000025b9387d TCP Conn 0x16684640 complete. fd: 5, err: 0
2.139006     CFNetwork                  0x0000000025b94977 TCP Conn 0x16684640 event 1. err: 0
2.400334     CFNetwork                  0x0000000025b949f5 TCP Conn 0x16684640 started
2.412851     CFNetwork                  0x0000000025bda15f Creating default cookie storage with default identifier
2.412851     CFNetwork                  0x0000000025bda13b Faulting in CFHTTPCookieStorage singleton
2.412851     CFNetwork                  0x0000000025c1c7bf Faulting in NSHTTPCookieStorage singleton



Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0:
0   libsystem_kernel.dylib          0x2528a8d0 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x2528a6d4 mach_msg + 40
2   CoreFoundation                  0x255d5ac4 __CFRunLoopServiceMachPort + 136
3   CoreFoundation                  0x255d3e4c __CFRunLoopRun + 1036
4   CoreFoundation                  0x25523228 CFRunLoopRunSpecific + 520
5   CoreFoundation                  0x25523014 CFRunLoopRunInMode + 108
6   GraphicsServices                0x26b13ac8 GSEventRunModal + 160
7   UIKit                           0x29bf7188 UIApplicationMain + 144
8   LeaseLocator_2016               0x000bfe88 0x53000 + 446088
9   libdyld.dylib                   0x251cb872 start + 2

Thread 1 name:  Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0   libsystem_kernel.dylib          0x252a02f8 kevent_qos + 24
1   libdispatch.dylib               0x25195d60 _dispatch_mgr_invoke + 256
2   libdispatch.dylib               0x25195abe _dispatch_mgr_thread$VARIANT$mp + 38

Thread 2:
0   libsystem_kernel.dylib          0x2529f864 __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x25345b34 _pthread_wqthread + 1036
2   libsystem_pthread.dylib         0x25345718 start_wqthread + 8

Thread 3:
0   libsystem_kernel.dylib          0x2529f864 __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x25345b34 _pthread_wqthread + 1036
2   libsystem_pthread.dylib         0x25345718 start_wqthread + 8

Thread 4:
0   libsystem_kernel.dylib          0x2529f864 __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x25345b34 _pthread_wqthread + 1036
2   libsystem_pthread.dylib         0x25345718 start_wqthread + 8

Thread 5 name:  Dispatch queue: NSOperationQueue 0x1666ba80 :: NSOperation 0x165dafe0 (QOS: LEGACY)
Thread 5 Crashed:
0   LeaseLocator_2016               0x00079894 0x53000 + 157844
1   LeaseLocator_2016               0x00073d90 0x53000 + 134544
2   LeaseLocator_2016               0x000788d0 0x53000 + 153808
3   CFNetwork                       0x25b1b280 __75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke + 16
4   CFNetwork                       0x25b2aa6a __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke + 278
5   Foundation                      0x25e25678 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 8
6   Foundation                      0x25d865f2 -[NSBlockOperation main] + 146
7   Foundation                      0x25d78bc8 -[__NSOperationInternal _start:] + 768
8   Foundation                      0x25e27930 __NSOQSchedule_f + 192
9   libdispatch.dylib               0x2518e422 _dispatch_queue_drain$VARIANT$mp + 1758
10  libdispatch.dylib               0x2518da60 _dispatch_queue_invoke$VARIANT$mp + 284
11  libdispatch.dylib               0x2519015c _dispatch_root_queue_drain + 396
12  libdispatch.dylib               0x2518ffcc _dispatch_worker_thread3 + 96
13  libsystem_pthread.dylib         0x25345b28 _pthread_wqthread + 1024
14  libsystem_pthread.dylib         0x25345718 start_wqthread + 8

Thread 6:
0   libsystem_kernel.dylib          0x2529f864 __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x25345b34 _pthread_wqthread + 1036
2   libsystem_pthread.dylib         0x25345718 start_wqthread + 8

Thread 7:
0   libsystem_pthread.dylib         0x25345710 start_wqthread + 0

Thread 8 name:  com.apple.NSURLConnectionLoader
Thread 8:
0   libsystem_kernel.dylib          0x2528a8d0 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x2528a6d4 mach_msg + 40
2   CoreFoundation                  0x255d5ac4 __CFRunLoopServiceMachPort + 136
3   CoreFoundation                  0x255d3e4c __CFRunLoopRun + 1036
4   CoreFoundation                  0x25523228 CFRunLoopRunSpecific + 520
5   CoreFoundation                  0x25523014 CFRunLoopRunInMode + 108
6   CFNetwork                       0x25b749f6 +[NSURLConnection(Loader) _resourceLoadLoop:] + 486
7   Foundation                      0x25e3d4a4 __NSThread__start__ + 1148
8   libsystem_pthread.dylib         0x2534785a _pthread_body + 138
9   libsystem_pthread.dylib         0x253477ce _pthread_start + 110
10  libsystem_pthread.dylib         0x25345724 thread_start + 8

Thread 9 name:  com.apple.CFSocket.private
Thread 9:
0   libsystem_kernel.dylib          0x2529eeec __select + 20
1   CoreFoundation                  0x255daf12 __CFSocketManager + 566
2   libsystem_pthread.dylib         0x2534785a _pthread_body + 138
3   libsystem_pthread.dylib         0x253477ce _pthread_start + 110
4   libsystem_pthread.dylib         0x25345724 thread_start + 8

Thread 5 crashed with ARM Thread State (32-bit):
    r0: 0x00000000    r1: 0x402190b0      r2: 0x00000000      r3: 0x00000000
    r4: 0x165d5790    r5: 0x00421c86      r6: 0x00000000      r7: 0x40218b48
    r8: 0x16696b50    r9: 0x16696b54     r10: 0x00000001     r11: 0x00000000
    ip: 0x000d3274    sp: 0x40218a80      lr: 0x00078c08      pc: 0x00079894
  cpsr: 0x60000010

有什么方法可以让我从商店测试生产版本,或者此日志是否提供了足够的信息来查明我的错误在哪里?



Best Answer-推荐答案


几周前我遇到了同样的问题,无法对其进行测试非常令人沮丧。我所做的虽然不是一个完美的解决方案,但确实让我能够测试这个问题。

进入您项目的build设置,然后进入签名。代码签名身份下的所有字段都应显示“iOS 开发人员”。将它们全部更改为 iOS Distribution。构建并运行您的应用程序,它应该会崩溃。现在,您将能够通过 Xcode 弄清楚发生了什么。

此外,一旦您解决了问题,请确保将这些代码签名身份恢复正常。

关于ios - 仅限生产版本的 EXC_BREAKPOINT (SIGTRAP),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39546949/

回复

使用道具 举报

懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注0

粉丝2

帖子830918

发布主题
阅读排行 更多
广告位

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap