Objective-C 应用程序崩溃“消息发送到已释放的实例 0x..”;

发布于 2024-12-14 07:39:18 字数 1489 浏览 2 评论 0原文

我有一个表格视图,其中包含包含文本字段的单元格。

表中有超过 20 行。

当我在文本字段中输入某些内容并在我的应用程序崩溃后滚动时,我收到此错误。

message sent to deallocated instance 
#0  0x00f5e09b in objc_msgSend ()
#1  0x040cfb5a in dyld_stub_strlcat ()
#2  0x001190d6 in -[UIResponder resignFirstResponder] ()
#3  0x000e097f in -[UITextField resignFirstResponder] ()
#4  0x00119293 in -[UIResponder becomeFirstResponder] ()
#5  0x002e1961 in -[UITextInteractionAssistant setFirstResponderIfNecessary] ()
#6  0x002e45e2 in -[UITextInteractionAssistant oneFingerTap:] ()
#7  0x002db4f2 in -[UIGestureRecognizer _updateGestureWithEvent:] ()
#8  0x002d74fe in -[UIGestureRecognizer _delayedUpdateGesture] ()
#9  0x002ddafc in _UIGestureRecognizerUpdateObserver ()
#10 0x002ddce1 in _UIGestureRecognizerUpdateGesturesFromSendEvent ()
#11 0x0007132a in -[UIWindow _sendGesturesForEvent:] ()
#12 0x0006cca3 in -[UIWindow sendEvent:] ()
#13 0x0004fc37 in -[UIApplication sendEvent:] ()
#14 0x00054f2e in _UIApplicationHandleEvent ()
#15 0x01031992 in PurpleEventCallback ()
#16 0x00dd9944 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
#17 0x00d39cf7 in __CFRunLoopDoSource1 ()
#18 0x00d36f83 in __CFRunLoopRun ()
#19 0x00d36840 in CFRunLoopRunSpecific ()
#20 0x00d36761 in CFRunLoopRunInMode ()
#21 0x010301c4 in GSEventRunModal ()
#22 0x01030289 in GSEventRun ()
#23 0x00058c93 in UIApplicationMain ()
#24 0x00001cd9 in main (argc=1, argv=0xbffff058) at main.m:14
(gdb) 

我将不胜感激任何人可以提供的帮助。

i have a table view with cells containing textFields in it.

there are more than 20 rows in table.

when i'm entering something into text fields and scrolling after sometime my app is crashed i'm getting this error.

message sent to deallocated instance 
#0  0x00f5e09b in objc_msgSend ()
#1  0x040cfb5a in dyld_stub_strlcat ()
#2  0x001190d6 in -[UIResponder resignFirstResponder] ()
#3  0x000e097f in -[UITextField resignFirstResponder] ()
#4  0x00119293 in -[UIResponder becomeFirstResponder] ()
#5  0x002e1961 in -[UITextInteractionAssistant setFirstResponderIfNecessary] ()
#6  0x002e45e2 in -[UITextInteractionAssistant oneFingerTap:] ()
#7  0x002db4f2 in -[UIGestureRecognizer _updateGestureWithEvent:] ()
#8  0x002d74fe in -[UIGestureRecognizer _delayedUpdateGesture] ()
#9  0x002ddafc in _UIGestureRecognizerUpdateObserver ()
#10 0x002ddce1 in _UIGestureRecognizerUpdateGesturesFromSendEvent ()
#11 0x0007132a in -[UIWindow _sendGesturesForEvent:] ()
#12 0x0006cca3 in -[UIWindow sendEvent:] ()
#13 0x0004fc37 in -[UIApplication sendEvent:] ()
#14 0x00054f2e in _UIApplicationHandleEvent ()
#15 0x01031992 in PurpleEventCallback ()
#16 0x00dd9944 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
#17 0x00d39cf7 in __CFRunLoopDoSource1 ()
#18 0x00d36f83 in __CFRunLoopRun ()
#19 0x00d36840 in CFRunLoopRunSpecific ()
#20 0x00d36761 in CFRunLoopRunInMode ()
#21 0x010301c4 in GSEventRunModal ()
#22 0x01030289 in GSEventRun ()
#23 0x00058c93 in UIApplicationMain ()
#24 0x00001cd9 in main (argc=1, argv=0xbffff058) at main.m:14
(gdb) 

I would appreciate any help anyone can offer.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

垂暮老矣 2024-12-21 07:39:18

当您尝试访问已释放的对象时会发生此错误。

从您发布的堆栈来看,您似乎正在尝试调用 UITextField 的方法 resignFirstResponder

检查所有 UITextField 实例或添加更多源代码。

This error occurs when you are trying to access released object.

From your posted stack it seems that you are trying to call method resignFirstResponder of UITextField.

Check all your UITextField instances or put some more source code.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文