iOS 应用程序在苹果应用程序审查中崩溃,但在本地完全无法重现

Posted

技术标签:

【中文标题】iOS 应用程序在苹果应用程序审查中崩溃,但在本地完全无法重现【英文标题】:iOS app crashing in apple app review but completely unreproducible locally 【发布时间】:2016-07-27 22:14:59 【问题描述】:

我们最近开发了一个适用于 androidios 的 Xamarin 表单应用程序。 Android 版本在 google play store 上,并按预期工作。 iOS 版本适用于我们所有的设备和模拟器,但当苹果在他们的应用审查过程中使用 iOS 9.3.3 测试它时崩溃。我们已经符号化了崩溃报告,但不知道可能导致崩溃的原因。

象征性的崩溃报告如下,非常感谢人们提供的任何帮助,以帮助我们追查崩溃的原因。

事件标识符:1D827CDB-F42D-457B-AE32-F887824E7EFE CrashReporter 密钥:ed6d5c5e7f0dc0721d5e88ce52e57230f0fb842f 硬件 型号:xxx 流程:SwiftPOSMemberPortaliOS [1615] 路径: /private/var/containers/Bundle/Application/DB6ED5ED-7A9A-4809-A92F-514EC1BC35C9/SwiftPOSMemberPortaliOS.app/SwiftPOSMemberPortaliOS 标识符:com.swiftpos.loyalty 版本:4 (6.48.4) 代码类型:ARM-64(本机)父进程: 已启动 [1]

日期/时间:2016-07-25 17:31:45.45 -0700 发布时间: 2016-07-25 17:31:43.43 -0700 操作系统版本:iOS 9.3.3 (13G34) 报告版本:105

异常类型:EXC_BAD_ACCESS (SIGABRT) 异常子类型: KERN_INVALID_ADDRESS at 0x0000000000000000 由线程触发:0

过滤的系统日志:未找到

最后一个异常回溯:0 CoreFoundation 0x182ce2db0 0x182bb8000 + 1224112 1 libobjc.A.dylib 0x182347f80 0x182340000 + 32640 2 核心基础 0x182ce2a70 0x182bb8000 + 1223280 3 SwiftPOSMemberPortaliOS 0x100f6f078 WriteZStream + 13814828 4 SwiftPOSMemberPortaliOS 0x100f5f62c WriteZStream + 13750752 5 SwiftPOSMemberPortaliOS 0x100f5f46c WriteZStream + 13750304 6 SwiftPOSMemberPortaliOS 0x100f612e8 WriteZStream + 13758108 7 SwiftPOSMemberPortaliOS 0x1004f9e84 WriteZStream + 2849336 8 SwiftPOSMemberPortaliOS 0x10016bfbc plcrash::BIT::async::dwarf_cfa_state_iterator::next(unsigned int*, plcrash::BIT::async::plcrash_dwarf_cfa_reg_rule_t*,无符号长 长*) + 252664 9 SwiftPOSMemberPortaliOS 0x1001c2ae4 plcrash::BIT::async::dwarf_cfa_state_iterator::next(unsigned int*, plcrash::BIT::async::plcrash_dwarf_cfa_reg_rule_t*,无符号长 长*) + 607776 10 SwiftPOSMemberPortaliOS 0x1001c766c plcrash::BIT::async::dwarf_cfa_state_iterator::next(unsigned int*, plcrash::BIT::async::plcrash_dwarf_cfa_reg_rule_t*,无符号长 长*) + 627112 11 SwiftPOSMemberPortaliOS 0x1001c7264 plcrash::BIT::async::dwarf_cfa_state_iterator::next(unsigned int*, plcrash::BIT::async::plcrash_dwarf_cfa_reg_rule_t*,无符号长 长*) + 626080 12 SwiftPOSMemberPortaliOS 0x10015f214 plcrash::BIT::async::dwarf_cfa_state_iterator::next(unsigned int*, plcrash::BIT::async::plcrash_dwarf_cfa_reg_rule_t*,无符号长 长*) + 200016 13 SwiftPOSMemberPortaliOS 0x10015e8fc plcrash::BIT::async::dwarf_cfa_state_iterator::next(unsigned int*, plcrash::BIT::async::plcrash_dwarf_cfa_reg_rule_t*,无符号长 长*) + 197688 14 SwiftPOSMemberPortaliOS 0x100157a54 plcrash::BIT::async::dwarf_cfa_state_iterator::next(unsigned int*, plcrash::BIT::async::plcrash_dwarf_cfa_reg_rule_t*,无符号长 长*) + 169360 15 SwiftPOSMemberPortaliOS 0x10052f388 WriteZStream + 3067708 16 SwiftPOSMemberPortaliOS 0x100358aac WriteZStream + 1140320 17 SwiftPOSMemberPortaliOS 0x1003574b0 WriteZStream + 1134692 18 SwiftPOSMemberPortaliOS 0x10094e3e8 WriteZStream + 7389084 19 SwiftPOSMemberPortaliOS 0x10098b944 WriteZStream + 7640312 20 SwiftPOSMemberPortaliOS 0x1004f9e84 WriteZStream + 2849336 21 SwiftPOSMemberPortaliOS 0x10016bfbc plcrash::BIT::async::dwarf_cfa_state_iterator::next(unsigned int*, plcrash::BIT::async::plcrash_dwarf_cfa_reg_rule_t*,无符号长 长*) + 252664 22 SwiftPOSMemberPortaliOS 0x1001c2ae4 plcrash::BIT::async::dwarf_cfa_state_iterator::next(unsigned int*, plcrash::BIT::async::plcrash_dwarf_cfa_reg_rule_t*,无符号长 长*) + 607776 23 SwiftPOSMemberPortaliOS 0x100f744cc WriteZStream + 13836416 24 SwiftPOSMemberPortaliOS 0x100f74fc8 WriteZStream + 13839228 25 基础 0x1836b802c 0x1835c4000 + 999468 26 核心基础 0x182c9909c 0x182bb8000 + 921756 27 核心基础 0x182c98b30 0x182bb8000 + 920368 28 核心基础 0x182c96830 0x182bb8000 + 911408 29 核心基础 0x182bc0c50 0x182bb8000 + 35920 30 图形服务 0x1844a8088 0x18449c000 + 49288 31 UIKit 0x187ea2088 0x187e24000 + 516232 32 SwiftPOSMemberPortaliOS 0x1009d0b64 WriteZStream + 7923480 33 SwiftPOSMemberPortaliOS 0x10093cb3c WriteZStream + 7317232 34 SwiftPOSMemberPortaliOS 0x10093cafc WriteZStream + 7317168 35 SwiftPOSMemberPortaliOS 0x1002436c4 WriteZStream + 4728 36 SwiftPOSMemberPortaliOS 0x1004f9e84 WriteZStream + 2849336 37 SwiftPOSMemberPortaliOS 0x10016bfbc plcrash::BIT::async::dwarf_cfa_state_iterator::next(unsigned int*, plcrash::BIT::async::plcrash_dwarf_cfa_reg_rule_t*,无符号长 长*) + 252664 38 SwiftPOSMemberPortaliOS 0x1001c2ae4 plcrash::BIT::async::dwarf_cfa_state_iterator::next(unsigned int*, plcrash::BIT::async::plcrash_dwarf_cfa_reg_rule_t*,无符号长 长*) + 607776 39 SwiftPOSMemberPortaliOS 0x1001c6f34 plcrash::BIT::async::dwarf_cfa_state_iterator::next(unsigned int*, plcrash::BIT::async::plcrash_dwarf_cfa_reg_rule_t*,无符号长 长*) + 625264 40 SwiftPOSMemberPortaliOS 0x100241ed0 xamarin_GetFolderPath + 1960 41 SwiftPOSMemberPortaliOS 0x100f90f38 WriteZStream + 13953772 42 libdyld.dylib 0x18275e8b8 0x18275c000 + 10424

全局跟踪缓冲区(倒计时秒数): 6148914687.764939 CFNetwork 0x00000001832c58e0 TCP 连接 0x12e7b2840 SSL 握手完成 6148914687.955328 CFNetwork 0x00000001832c57f0 TCP Conn 0x12e7b2840 开始 SSL 协商 6148914687.955688 CFNetwork 0x0000000183367e7c TCP 连接 0x12e7b2840 完成。 fd:5,错误:0 6148914687.956469 CFNetwork 0x00000001833693a8 TCP 连接 0x12e7b2840 事件 1。错误:0 6148914688.040974 CFNetwork 0x0000000183369480 TCP 连接 0x12e7b2840 已启动 6148914688.043079 CFNetwork 0x00000001833c3e5c 使用默认标识符创建默认 cookie 存储 6148914688.043079 CFNetwork 0x00000001833c3e28 CFHTTPCookieStorage 单例中的故障 6148914688.043085 CFNetwork 0x0000000183415e50 NSHTTPCookieStorage 单例故障

线程 0 名称:tid_c07 调度队列:com.apple.main-thread 线程 0 崩溃:0 libsystem_kernel.dylib 0x000000018287c11c 0x182860000 + 114972 1 libsystem_pthread.dylib 0x0000000182948ef8 0x182944000 + 20216 2 libsystem_c.dylib 0x00000001827eddc8 0x18278c000 + 400840 3 SwiftPOSMemberPortaliOS 0x000000010011c320 0x1000b4000 + 426784 4 核心基础 0x0000000182ce3138 0x182bb8000 + 1225016 5 libobjc.A.dylib 0x000000018234823c 0x182340000 + 33340 6 SwiftPOSMemberPortaliOS 0x000000010010a290 0x1000b4000 + 352912 7 libc++abi.dylib 0x000000018233af44 0x182320000 + 110404 8 libc++abi.dylib 0x000000018233a85c 0x182320000 + 108636 9 libobjc.A.dylib 0x0000000182348094 0x182340000 + 32916 10 核心基础 0x0000000182ce2a70 0x182bb8000 + 1223280 11 SwiftPOSMemberPortaliOS 0x0000000100f6f078 WriteZStream + 13814828 12 SwiftPOSMemberPortaliOS 0x0000000100f5f62c WriteZStream + 13750752 13 SwiftPOSMemberPortaliOS 0x0000000100f5f46c WriteZStream + 13750304 14 SwiftPOSMemberPortaliOS 0x0000000100f612e8 WriteZStream + 13758108 15 SwiftPOSMemberPortaliOS 0x00000001004f9e84 WriteZStream + 2849336 16 SwiftPOSMemberPortaliOS 0x000000010016bfbc plcrash::BIT::async::dwarf_cfa_state_iterator::next(unsigned int*, plcrash::BIT::async::plcrash_dwarf_cfa_reg_rule_t*,无符号长 长*) + 252664 17 SwiftPOSMemberPortaliOS 0x00000001001c2ae4 plcrash::BIT::async::dwarf_cfa_state_iterator::next(unsigned int*, plcrash::BIT::async::plcrash_dwarf_cfa_reg_rule_t*,无符号长 长*) + 607776 18 SwiftPOSMemberPortaliOS 0x00000001001c766c plcrash::BIT::async::dwarf_cfa_state_iterator::next(unsigned int*, plcrash::BIT::async::plcrash_dwarf_cfa_reg_rule_t*,无符号长 长*) + 627112 19 SwiftPOSMemberPortaliOS 0x00000001001c7264 plcrash::BIT::async::dwarf_cfa_state_iterator::next(unsigned int*, plcrash::BIT::async::plcrash_dwarf_cfa_reg_rule_t*,无符号长 长*) + 626080 20 SwiftPOSMemberPortaliOS 0x000000010015f214 plcrash::BIT::async::dwarf_cfa_state_iterator::next(unsigned int*, plcrash::BIT::async::plcrash_dwarf_cfa_reg_rule_t*,无符号长 长*) + 200016 21 SwiftPOSMemberPortaliOS 0x000000010015e8fc plcrash::BIT::async::dwarf_cfa_state_iterator::next(unsigned int*, plcrash::BIT::async::plcrash_dwarf_cfa_reg_rule_t*,无符号长 长*) + 197688 22 SwiftPOSMemberPortaliOS 0x0000000100157a54 plcrash::BIT::async::dwarf_cfa_state_iterator::next(unsigned int*, plcrash::BIT::async::plcrash_dwarf_cfa_reg_rule_t*,无符号长 长*) + 169360 23 SwiftPOSMemberPortaliOS 0x000000010052f388 WriteZStream + 3067708 24 SwiftPOSMemberPortaliOS 0x0000000100358aac WriteZStream + 1140320 25 SwiftPOSMemberPortaliOS 0x00000001003574b0 WriteZStream + 1134692 26 SwiftPOSMemberPortaliOS 0x000000010094e3e8 WriteZStream + 7389084 27 SwiftPOSMemberPortaliOS 0x000000010098b944 WriteZStream + 7640312 28 SwiftPOSMemberPortaliOS 0x00000001004f9e84 WriteZStream + 2849336 29 SwiftPOSMemberPortaliOS 0x000000010016bfbc plcrash::BIT::async::dwarf_cfa_state_iterator::next(unsigned int*, plcrash::BIT::async::plcrash_dwarf_cfa_reg_rule_t*,无符号长 长*) + 252664 30 SwiftPOSMemberPortaliOS 0x00000001001c2ae4 plcrash::BIT::async::dwarf_cfa_state_iterator::next(unsigned int*, plcrash::BIT::async::plcrash_dwarf_cfa_reg_rule_t*,无符号长 长*) + 607776 31 SwiftPOSMemberPortaliOS 0x0000000100f744cc WriteZStream + 13836416 32 SwiftPOSMemberPortaliOS 0x0000000100f74fc8 WriteZStream + 13839228 33 基础 0x00000001836b802c 0x1835c4000 + 999468 34 核心基础 0x0000000182c9909c 0x182bb8000 + 921756 35 核心基础 0x0000000182c98b30 0x182bb8000 + 920368 36 核心基础 0x0000000182c96830 0x182bb8000 + 911408 37 核心基础 0x0000000182bc0c50 0x182bb8000 + 35920 38 图形服务 0x00000001844a8088 0x18449c000 + 49288 39 UIKit 0x0000000187ea2088 0x187e24000 + 516232 40 SwiftPOSMemberPortaliOS 0x00000001009d0b64 WriteZStream + 7923480 41 SwiftPOSMemberPortaliOS 0x000000010093cb3c WriteZStream + 7317232 42 SwiftPOSMemberPortaliOS 0x000000010093cafc WriteZStream + 7317168 43 SwiftPOSMemberPortaliOS 0x00000001002436c4 WriteZStream + 4728 44 SwiftPOSMemberPortaliOS 0x00000001004f9e84 WriteZStream + 2849336 45 SwiftPOSMemberPortaliOS 0x000000010016bfbc plcrash::BIT::async::dwarf_cfa_state_iterator::next(unsigned int*, plcrash::BIT::async::plcrash_dwarf_cfa_reg_rule_t*,无符号长 长*) + 252664 46 SwiftPOSMemberPortaliOS 0x00000001001c2ae4 plcrash::BIT::async::dwarf_cfa_state_iterator::next(unsigned int*, plcrash::BIT::async::plcrash_dwarf_cfa_reg_rule_t*,无符号长 长*) + 607776 47 SwiftPOSMemberPortaliOS 0x00000001001c6f34 plcrash::BIT::async::dwarf_cfa_state_iterator::next(unsigned int*, plcrash::BIT::async::plcrash_dwarf_cfa_reg_rule_t*,无符号长 长*) + 625264 48 SwiftPOSMemberPortaliOS 0x0000000100241ed0 xamarin_GetFolderPath + 1960 49 SwiftPOSMemberPortaliOS 0x0000000100f90f38 WriteZStream + 13953772 50 libdyld.dylib 0x000000018275e8b8 0x18275c000 + 10424

【问题讨论】:

Exception Type: EXC_BAD_ACCESS (SIGABRT) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000 Triggered by Thread: 0 - 您在某些时候取消了对null 的引用。不幸的是,除此之外我什么都不知道 看起来一堆“你的”代码没有调试符号 - 我认为那是因为它实际上是 Xamarin 代码。您可以尝试对 Xamarin 库的调试版本进行符号化,以便在崩溃时找出您所在的 WriteZStream 的哪个部分。 我认为你是正确的@Jeeter 可能是因为对象为空。实际上,我只是与苹果支持成员交谈,并让他们通过 HockeyApp 崩溃日志发送,这比上面的日志有用得多。 if (response.Data != null) IEnumerable settings = response.Data.Settings; if (settings.Any(s => string.Equals(s.Name, "Title" ... etc 有多个这样的调用来检索设置,但我们实际上并没有检查“If response.Data.Settings != null"。 【参考方案1】:

感谢所有回答的人。我们找到了问题。

我们的 api 会话密钥是问题所在。我们这里没有将会话密钥过期时间转换为通用时间,所以在反序列化空的json响应后,它创建了一个新的数据类型实例,值为null。

【讨论】:

【参考方案2】:

我不是 iOS 堆栈跟踪方面的专家,但我认为这些部分可能是有用的线索:

xamarin_GetFolderPath NSHTTPCookieStorage 单例中的错误

可能值得询问 Apple 在错误发生之前他们执行了哪些操作顺序。可能是他们正在测试您尚未测试的代码路径。还有,iOS 9.3.3 才出几天,你确定你测试过这个版本吗?

【讨论】:

以上是关于iOS 应用程序在苹果应用程序审查中崩溃,但在本地完全无法重现的主要内容,如果未能解决你的问题,请参考以下文章

需要帮助:“错误的架构”导致应用在 iOS 7 中启动时崩溃,但在 iOS 8 中运行良好

Xcode 6 iPhone 唯一的应用程序在 iPad 上崩溃

ios 应用程序在调试模式下完美运行,但在发布时崩溃

由于 NSDictionary 自动释放,应用程序在 iOS7 中崩溃,但在 8 和 9 中没有

React App 在本地运行,但在 Heroku 上因错误代码=H10 而崩溃

当我们执行以下操作时,您的应用程序在运行 iOS 11.1 并连接到 IPv6 网络的 iPad 和 iPhone 上崩溃: