gpt4 book ai didi

iphone - 在没有 NSURLConnections 的函数中 [NSURLConnection releaseDelegate] 崩溃,我该如何应对?

转载 作者:行者123 更新时间:2023-12-03 16:02:38 27 4
gpt4 key购买 nike

你好,
我正在试验一个非常恶性的崩溃,它在设备日志中以下列方式显示:

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x50000008
Crashed Thread: 0`

Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x33b24c98 objc_msgSend + 16
1 Foundation 0x3429465a _NSURLConnectionReleaseClient + 30
2 CFNetwork 0x355ac608 ClientContextHolder<CFURLConnectionClient_V4>::forget() + 20
3 CFNetwork 0x355ac5ea URLConnectionClient::releaseClientLocked() + 34
4 CFNetwork 0x355a0e9a URLConnectionClient::processEvents() + 170
5 CFNetwork 0x355a0de2 URLConnection::multiplexerClientPerform(RunLoopMultiplexer*) + 30
6 CFNetwork 0x355a0d54 MultiplexerSource::perform() + 120
7 CFNetwork 0x355a0cd2 MultiplexerSource::_perform(void*) + 2
8 CoreFoundation 0x3039ca72 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 6
9 CoreFoundation 0x3039e758 __CFRunLoopDoSources0 + 376
10 CoreFoundation 0x3039f4e4 __CFRunLoopRun + 224
11 CoreFoundation 0x3032febc CFRunLoopRunSpecific + 224
12 CoreFoundation 0x3032fdc4 CFRunLoopRunInMode + 52
13 GraphicsServices 0x35571418 GSEventRunModal + 108
14 GraphicsServices 0x355714c4 GSEventRun + 56
15 UIKit 0x358c7d62 -[UIApplication _run] + 398
16 UIKit 0x358c5800 UIApplicationMain + 664
17 inArrivo 0x000023ca main (main.m:14)
18 inArrivo 0x00002394 start + 32

启用 NSZombie 后,我在以下形式的编译器日志上也出现了崩溃:

2011-05-09 16:12:24.400 inArrivo[5019:707] * -[NSURLConnection releaseDelegate]: message sent to deallocated instance 0x5d61670



出现在应用程序主上,最后一个 NSLog 来自没有 url 连接的函数。此外,如果我从该函数中删除一些非常无辜的代码,则不会发生崩溃,当我在模拟器上运行完整的应用程序时也会发生同样的情况。

有人可以给我一些关于我可以做些什么来找到导致崩溃的代码的提示吗?正常的调试当然在这里没有什么帮助。

谢谢,
法布里齐奥·巴托洛穆奇

最佳答案

该消息表明 NSURLConnection 的委托(delegate)已被释放。我建议您检查委托(delegate)对象,看看您是否正在对其进行额外的发布。

关于iphone - 在没有 NSURLConnections 的函数中 [NSURLConnection releaseDelegate] 崩溃,我该如何应对?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5951647/

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