gpt4 book ai didi

objective-c - Objective-C应用程序崩溃 “message sent to deallocated instance 0x..”

转载 作者:行者123 更新时间:2023-12-03 16:23:10 25 4
gpt4 key购买 nike

我有一个表格 View ,其中包含textFields的单元格。

表中有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)

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

最佳答案

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

从您发布的堆栈中,您似乎正在尝试调用resignFirstResponderUITextField方法。

检查所有UITextField实例或放置更多源代码。

关于objective-c - Objective-C应用程序崩溃 “message sent to deallocated instance 0x..”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8060919/

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