iOS App 仅在实时 IAP 购买初始化时崩溃

Posted

技术标签:

【中文标题】iOS App 仅在实时 IAP 购买初始化时崩溃【英文标题】:iOS App crashed on IAP purchase initialization only in live 【发布时间】:2014-04-25 10:10:58 【问题描述】:

ios 应用的生产版本在应用内购买启动期间崩溃。它适用于沙盒模式开发构建。从实时服务器(应用商店)下载的应用没有。我正在添加故障转储(屏蔽的应用程序 ID)。分析故障转储的任何帮助都会有所帮助。产品代码是在初次启动时从我们的服务器获取的。我们使用该信息在加载时从应用商店加载 IAP 产品信息。这是一个 phonegap 应用程序,使用j3k0 phonegap plugin。

Incident Identifier: E6C64063-B833-40FF-AB22-24C310FAC3D9
CrashReporter Key:   826cfd9d4e434d4472c6dcb2960b01cf134976e1
Hardware Model:      iPhone3,1
Process:             My Example Apps [252]
Path:                /var/mobile/Applications/35B2EB8E-91C5-4284-AE8C-252326CC9203/My Example Apps.app/My Example Apps
Identifier:          com.example.myexampleapps
Version:             6.0 (1.4.0)
Code Type:           ARM (Native)
Parent Process:      launchd [1]

Date/Time:           2014-04-25 15:19:18.955 +0530
OS Version:          iOS 7.1 (11D169)
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread:  0

Last Exception Backtrace:
0   CoreFoundation                  0x2f0f6fce __exceptionPreprocess + 126
1   libobjc.A.dylib                 0x398a3cca objc_exception_throw + 34
2   CoreFoundation                  0x2f0f6f10 +[NSException raise:format:] + 100
3   StoreKit                        0x318a3f9e -[SKPaymentQueue addPayment:] + 598
4   My Example Apps                 0x000ff9e0 0xcb000 + 215520
5   My Example Apps                 0x000ff69e 0xcb000 + 214686
6   My Example Apps                 0x000ff3bc 0xcb000 + 213948
7   My Example Apps                 0x000ff4ac 0xcb000 + 214188
8   My Example Apps                 0x000ff420 0xcb000 + 214048
9   Foundation                      0x2fadfc6e __NSThreadPerformPerform + 382
10  CoreFoundation                  0x2f0c2256 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 10
11  CoreFoundation                  0x2f0c1726 __CFRunLoopDoSources0 + 202
12  CoreFoundation                  0x2f0bff1a __CFRunLoopRun + 618
13  CoreFoundation                  0x2f02af4a CFRunLoopRunSpecific + 518
14  CoreFoundation                  0x2f02ad2e CFRunLoopRunInMode + 102
15  GraphicsServices                0x33f2f65e GSEventRunModal + 134
16  UIKit                           0x31976168 UIApplicationMain + 1132
17  My Example Apps                 0x000d0bb2 0xcb000 + 23474
18  My Example Apps                 0x000d0b8c 0xcb000 + 23436


Thread 0 Crashed:
0   libsystem_kernel.dylib          0x39e661f0 __pthread_kill + 8
1   libsystem_pthread.dylib         0x39ed0792 pthread_kill + 54
2   libsystem_c.dylib               0x39e16fd8 abort + 72
3   libc++abi.dylib                 0x39145cd2 abort_message + 70
4   libc++abi.dylib                 0x3915e6e0 default_terminate_handler() + 248
5   libobjc.A.dylib                 0x398a3f62 _objc_terminate() + 190
6   libc++abi.dylib                 0x3915c1c4 std::__terminate(void (*)()) + 76
7   libc++abi.dylib                 0x3915bd28 __cxa_rethrow + 96
8   libobjc.A.dylib                 0x398a3e12 objc_exception_rethrow + 38
9   CoreFoundation                  0x2f02afc0 CFRunLoopRunSpecific + 636
10  CoreFoundation                  0x2f02ad2e CFRunLoopRunInMode + 102
11  GraphicsServices                0x33f2f65e GSEventRunModal + 134
12  UIKit                           0x31976168 UIApplicationMain + 1132
13  My Example Apps                 0x000d0bb2 0xcb000 + 23474
14  My Example Apps                 0x000d0b8c 0xcb000 + 23436

Thread 1:
0   libsystem_kernel.dylib          0x39e53808 kevent64 + 24
1   libdispatch.dylib               0x39d9fde8 _dispatch_mgr_invoke + 228
2   libdispatch.dylib               0x39d8ef6e _dispatch_mgr_thread$VARIANT$up + 34

Thread 2 name:  com.apple.NSURLConnectionLoader
Thread 2:
0   libsystem_kernel.dylib          0x39e53a58 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x39e53854 mach_msg + 44
2   CoreFoundation                  0x2f0c1896 __CFRunLoopServiceMachPort + 150
3   CoreFoundation                  0x2f0bffbc __CFRunLoopRun + 780
4   CoreFoundation                  0x2f02af4a CFRunLoopRunSpecific + 518
5   CoreFoundation                  0x2f02ad2e CFRunLoopRunInMode + 102
6   Foundation                      0x2fa6a082 +[NSURLConnection(Loader) _resourceLoadLoop:] + 314
7   Foundation                      0x2fadfa5a __NSThread__main__ + 1058
8   libsystem_pthread.dylib         0x39ecf916 _pthread_body + 138
9   libsystem_pthread.dylib         0x39ecf886 _pthread_start + 98
10  libsystem_pthread.dylib         0x39ecdaa0 thread_start + 4

Thread 3:
0   libsystem_kernel.dylib          0x39e66c70 __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x39ecdbda _pthread_wqthread + 306
2   libsystem_pthread.dylib         0x39ecda94 start_wqthread + 4

Thread 4 name:  WebThread
Thread 4:
0   libsystem_kernel.dylib          0x39e53a58 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x39e53854 mach_msg + 44
2   CoreFoundation                  0x2f0c1896 __CFRunLoopServiceMachPort + 150
3   CoreFoundation                  0x2f0bffbc __CFRunLoopRun + 780
4   CoreFoundation                  0x2f02af4a CFRunLoopRunSpecific + 518
5   CoreFoundation                  0x2f02ad2e CFRunLoopRunInMode + 102
6   WebCore                         0x372bf38e RunWebThread(void*) + 414
7   libsystem_pthread.dylib         0x39ecf916 _pthread_body + 138
8   libsystem_pthread.dylib         0x39ecf886 _pthread_start + 98
9   libsystem_pthread.dylib         0x39ecdaa0 thread_start + 4

Thread 5 name:  javascriptCore::BlockFree
Thread 5:
0   libsystem_kernel.dylib          0x39e65f2c __psynch_cvwait + 24
1   libsystem_pthread.dylib         0x39ecef22 _pthread_cond_wait + 518
2   libsystem_pthread.dylib         0x39ecfd60 pthread_cond_wait + 36
3   JavaScriptCore                  0x30057ee4 JSC::BlockAllocator::blockFreeingThreadMain() + 204
4   JavaScriptCore                  0x30055538 WTF::wtfThreadEntryPoint(void*) + 12
5   libsystem_pthread.dylib         0x39ecf916 _pthread_body + 138
6   libsystem_pthread.dylib         0x39ecf886 _pthread_start + 98
7   libsystem_pthread.dylib         0x39ecdaa0 thread_start + 4

Thread 6 name:  WebCore: CFNetwork Loader
Thread 6:
0   libsystem_kernel.dylib          0x39e53a58 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x39e53854 mach_msg + 44
2   CoreFoundation                  0x2f0c1896 __CFRunLoopServiceMachPort + 150
3   CoreFoundation                  0x2f0bffbc __CFRunLoopRun + 780
4   CoreFoundation                  0x2f02af4a CFRunLoopRunSpecific + 518
5   CoreFoundation                  0x2f02ad2e CFRunLoopRunInMode + 102
6   WebCore                         0x37307dba WebCore::runLoaderThread(void*) + 250
7   JavaScriptCore                  0x30055538 WTF::wtfThreadEntryPoint(void*) + 12
8   libsystem_pthread.dylib         0x39ecf916 _pthread_body + 138
9   libsystem_pthread.dylib         0x39ecf886 _pthread_start + 98
10  libsystem_pthread.dylib         0x39ecdaa0 thread_start + 4

Thread 7 name:  WebCore: LocalStorage
Thread 7:
0   libsystem_kernel.dylib          0x39e65f2c __psynch_cvwait + 24
1   libsystem_pthread.dylib         0x39ecef22 _pthread_cond_wait + 518
2   libsystem_pthread.dylib         0x39ecfd60 pthread_cond_wait + 36
3   JavaScriptCore                  0x30058012 WTF::ThreadCondition::timedWait(WTF::Mutex&, double) + 58
4   WebCore                         0x373f21a4 WTF::PassOwnPtr<WTF::Function<void ()> > WTF::MessageQueue<WTF::Function<void ()> >::waitForMessageFilteredWithTimeout<bool (WTF::Function<void ()>*)>(WTF::MessageQueueWaitResult&, bool (&)(WTF::Function<void ()>*), double) + 104
5   WebCore                         0x373f212a WebCore::StorageThread::threadEntryPoint() + 162
6   JavaScriptCore                  0x30055538 WTF::wtfThreadEntryPoint(void*) + 12
7   libsystem_pthread.dylib         0x39ecf916 _pthread_body + 138
8   libsystem_pthread.dylib         0x39ecf886 _pthread_start + 98
9   libsystem_pthread.dylib         0x39ecdaa0 thread_start + 4

Thread 8 name:  com.apple.CFSocket.private
Thread 8:
0   libsystem_kernel.dylib          0x39e66434 __select + 20
1   CoreFoundation                  0x2f0c5758 __CFSocketManager + 480
2   libsystem_pthread.dylib         0x39ecf916 _pthread_body + 138
3   libsystem_pthread.dylib         0x39ecf886 _pthread_start + 98
4   libsystem_pthread.dylib         0x39ecdaa0 thread_start + 4

Thread 0 crashed with ARM Thread State (32-bit):
    r0: 0x00000000    r1: 0x00000000      r2: 0x00000000      r3: 0x39e09aa9
    r4: 0x00000006    r5: 0x3bbcf18c      r6: 0x00000000      r7: 0x27d38594
    r8: 0x184ad620    r9: 0x00000001     r10: 0x00000000     r11: 0x184ad590
    ip: 0x00000148    sp: 0x27d38588      lr: 0x39ed0797      pc: 0x39e661f0
  cpsr: 0x00000010

Binary Images:
0xcb000 - 0x116fff My Example Apps armv7  <5a7198333e0d3757befb8e445708f9cc> /var/mobile/Applications/35B2EB8E-91C5-4284-AE8C-252326CC9203/My Example Apps.app/My Example Apps
0x2be1f000 - 0x2be3ffff dyld armv7  <651a31c39f71311f965f8ac44de02c88> /usr/lib/dyld
0x2ddb6000 - 0x2de9efff RawCamera armv7  <8f62f266f7d539a5a388221dfe90db50> /System/Library/CoreServices/RawCamera.bundle/RawCamera
0x2deb7000 - 0x2df84fff IMGSGX535GLDriver armv7  <425beeed20553dd5bac0e7e9e8506f1d> /System/Library/Extensions/IMGSGX535GLDriver.bundle/IMGSGX535GLDriver
0x2df8e000 - 0x2e090fff AVFoundation armv7  <e6f4e322434733c2a6d074bdc226b08d> /System/Library/Frameworks/AVFoundation.framework/AVFoundation
0x2e091000 - 0x2e0b9fff libAVFAudio.dylib armv7  <0bae9ec49a9637c696edf86d86a32db6> /System/Library/Frameworks/AVFoundation.framework/libAVFAudio.dylib
0x2e0ba000 - 0x2e0bafff Accelerate armv7  <0424978b39f037a7b3bf9aad5b34a5b3> /System/Library/Frameworks/Accelerate.framework/Accelerate
0x2e0c4000 - 0x2e290fff vImage armv7  <c4834965bdc638fcb1082f53a7721f42> /System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/vImage
0x2e291000 - 0x2e36afff libBLAS.dylib armv7  <cfc693306499378c9c09851259cf3563> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libBLAS.dylib
0x2e36b000 - 0x2e621fff libLAPACK.dylib armv7  <65970a4fea383446b0b4b87e634b8dfd> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libLAPACK.dylib
0x2e622000 - 0x2e690fff libvDSP.dylib armv7  <174c13fd605a39efbb7f1314a6d1fdbe> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libvDSP.dylib
0x2e691000 - 0x2e6a2fff libvMisc.dylib armv7  <5a8317adbade34a9b415e44ab8c64eb6> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libvMisc.dylib
0x2e6a3000 - 0x2e6a3fff vecLib armv7  <7b2718a5a22c36e6ab943b2e4bea9123> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/vecLib
0x2e6a4000 - 0x2e6c4fff Accounts armv7  <0b9bb1f3e9393a64b396871da25800ad> /System/Library/Frameworks/Accounts.framework/Accounts
0x2e6c6000 - 0x2e72dfff AddressBook armv7  <18927033ac4834f3a482884bb5dfd0eb> /System/Library/Frameworks/AddressBook.framework/AddressBook
0x2e72e000 - 0x2e844fff AddressBookUI armv7  <0a50c4941a29367a9ed8bb713630e79b> 
....

谢谢。

【问题讨论】:

您是否忘记将购买提交给苹果?此异常可能是由于尝试购买“load()”方法未成功加载的产品所致。 您好,我在应用内产品部分处于“等待屏幕截图”状态。是这个原因吗? @jeko 对,错过了。谢谢。您可以将其添加为答案,以便我接受吗? 【参考方案1】:

此异常可能是由于尝试购买的产品未通过“load()”方法成功加载造成的。

在您的情况下,最可能的原因是您忘记将购买连同申请一起提交给苹果。

【讨论】:

以上是关于iOS App 仅在实时 IAP 购买初始化时崩溃的主要内容,如果未能解决你的问题,请参考以下文章

IAP - 无法连接到iTunes Store - 仅在Apple审核期间

Apple内购(IAP)恢复购买产品在网络问题导致超时情况下的处理

Apple内购(IAP)恢复购买产品在网络问题导致超时情况下的处理

Apple内购(IAP)恢复购买产品在网络问题导致超时情况下的处理

如何调试 iPhone 应用程序崩溃日志。仅在 App Store 购买的版本中崩溃,而不是在开发中

如何使用 Amazon IAP API 验证购买