gpt4 book ai didi

iOS 崩溃报告 SKProductsRequest

转载 作者:技术小花猫 更新时间:2023-10-29 10:58:07 28 4
gpt4 key购买 nike

有人可以证实我的想法,即由于 SKProductsRequestDelegate 仍在分配,但代码本身并未分配,因此会生成以下崩溃报告吗?即 VC 已关闭?

StoreKit: __34-[SKProductsRequest _handleReply:]_block_invoke + 442

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x41682340
Triggered by Thread: 0

Thread 0 Crashed:
0 libobjc.A.dylib 0x38d19626 objc_msgSend + 6
1 StoreKit 0x30c4784a __34-[SKProductsRequest _handleReply:]_block_invoke + 442
2 libdispatch.dylib 0x391f7830 _dispatch_call_block_and_release + 8
3 libdispatch.dylib 0x391f781c _dispatch_client_callout + 20
4 libdispatch.dylib 0x391fe49a _dispatch_main_queue_callback_4CF$VARIANT$mp + 274
5 CoreFoundation 0x2e45f89c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 4
6 CoreFoundation 0x2e45e170 __CFRunLoopRun + 1296
7 CoreFoundation 0x2e3c8eba CFRunLoopRunSpecific + 518
8 CoreFoundation 0x2e3c8c9e CFRunLoopRunInMode + 102
9 GraphicsServices 0x3332265e GSEventRunModal + 134
10 UIKit 0x30d15148 UIApplicationMain + 1132
11 BaseApp 0x00035aea 0x2c000 + 39658
12 libdyld.dylib 0x3921cab4 start + 0

如果我的想法是正确的,我可以通过调用来解决这个问题:-

request.delegate = nil;
[request cancel];
request = nil;

如果我错了,有人可以为我提供更多信息吗?

谢谢。

最佳答案

引用,我添加以下代码确实解决了这个问题。

request.delegate = nil;
[request cancel];
request = nil;

关于iOS 崩溃报告 SKProductsRequest,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24675528/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com