UITextField 在类型上崩溃

发布于 2024-11-30 04:05:25 字数 1809 浏览 1 评论 0原文

我有一个从 xib 文件初始化的 UITextField 。由于某种原因,它在我输入的第二个键(或由于某种原因第一个数字)上崩溃。 编辑:忘了提及,它因 EXC_BAD_ACCESS 崩溃。 NSZombieEnabled=YES 不会改变任何东西。没有代码可显示,因为它只是 xib 文件。这是回溯:

#0  0x011d9000 in objc_assign_ivar ()
#1  0x031f2c34 in -[AppleSpell init] ()
#2  0x00384538 in -[UITextChecker _checker] ()
#3  0x00385de9 in -[UITextChecker checkSpellingOfString:startingAt:language:wrap:correction:] ()
#4  0x0c01f725 in TIInputManagerZephyr::lookup_spellcheck_candidates ()
#5  0x0c01f3f3 in TIInputManagerZephyr::lookup_static_dynamic_candidates ()
#6  0x0c01cb2b in TIInputManager::lookup ()
#7  0x0c01ce18 in TIInputManager::autocorrection ()
#8  0x0c03406b in -[TIKeyboardInputManagerZephyr autocorrection] ()
#9  0x0016cbe8 in -[UIKeyboardImpl generateCandidatesWithCompletions:] ()
#10 0x0016cc3b in -[UIKeyboardImpl generateCandidates] ()
#11 0x00179a23 in -[UIKeyboardImpl addInputString:fromVariantKey:] ()
#12 0x0017b71b in -[UIKeyboardImpl handleKeyEvent:] ()
#13 0x002a72ee in -[UIKeyboardLayoutStar sendStringAction:forKey:] ()
#14 0x002abd19 in -[UIKeyboardLayoutStar touchUp:] ()
#15 0x00188da2 in -[UIKeyboardLayout touchesEnded:withEvent:] ()
#16 0x00055ded in -[UIWindow _sendTouchesForEvent:] ()
#17 0x00036c37 in -[UIApplication sendEvent:] ()
#18 0x0003bf2e in _UIApplicationHandleEvent ()
#19 0x011ef992 in PurpleEventCallback ()
#20 0x00f97944 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
#21 0x00ef7cf7 in __CFRunLoopDoSource1 ()
#22 0x00ef4f83 in __CFRunLoopRun ()
#23 0x00ef4840 in CFRunLoopRunSpecific ()
#24 0x00ef4761 in CFRunLoopRunInMode ()
#25 0x011ee1c4 in GSEventRunModal ()
#26 0x011ee289 in GSEventRun ()
#27 0x0003fc93 in UIApplicationMain ()
#28 0x000026c9 in main (argc=1, argv=0xbffff678) at main.m:15

有人知道什么会导致此问题/如何解决它?

提前Tnx!

I have a UITextField initted from a xib file. For some reason, it crashes on the second key I type ( or the first number, for some reason ).
EDIT: forgot to mention, it crashes with an EXC_BAD_ACCESS. NSZombieEnabled=YES doesn't change anything. there's no code to show, as it's only the xib file. This is the backtrack:

#0  0x011d9000 in objc_assign_ivar ()
#1  0x031f2c34 in -[AppleSpell init] ()
#2  0x00384538 in -[UITextChecker _checker] ()
#3  0x00385de9 in -[UITextChecker checkSpellingOfString:startingAt:language:wrap:correction:] ()
#4  0x0c01f725 in TIInputManagerZephyr::lookup_spellcheck_candidates ()
#5  0x0c01f3f3 in TIInputManagerZephyr::lookup_static_dynamic_candidates ()
#6  0x0c01cb2b in TIInputManager::lookup ()
#7  0x0c01ce18 in TIInputManager::autocorrection ()
#8  0x0c03406b in -[TIKeyboardInputManagerZephyr autocorrection] ()
#9  0x0016cbe8 in -[UIKeyboardImpl generateCandidatesWithCompletions:] ()
#10 0x0016cc3b in -[UIKeyboardImpl generateCandidates] ()
#11 0x00179a23 in -[UIKeyboardImpl addInputString:fromVariantKey:] ()
#12 0x0017b71b in -[UIKeyboardImpl handleKeyEvent:] ()
#13 0x002a72ee in -[UIKeyboardLayoutStar sendStringAction:forKey:] ()
#14 0x002abd19 in -[UIKeyboardLayoutStar touchUp:] ()
#15 0x00188da2 in -[UIKeyboardLayout touchesEnded:withEvent:] ()
#16 0x00055ded in -[UIWindow _sendTouchesForEvent:] ()
#17 0x00036c37 in -[UIApplication sendEvent:] ()
#18 0x0003bf2e in _UIApplicationHandleEvent ()
#19 0x011ef992 in PurpleEventCallback ()
#20 0x00f97944 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
#21 0x00ef7cf7 in __CFRunLoopDoSource1 ()
#22 0x00ef4f83 in __CFRunLoopRun ()
#23 0x00ef4840 in CFRunLoopRunSpecific ()
#24 0x00ef4761 in CFRunLoopRunInMode ()
#25 0x011ee1c4 in GSEventRunModal ()
#26 0x011ee289 in GSEventRun ()
#27 0x0003fc93 in UIApplicationMain ()
#28 0x000026c9 in main (argc=1, argv=0xbffff678) at main.m:15

Does anybody know what can cause this/how to fix it?

Tnx in advance!

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

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

发布评论

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

评论(1

久光 2024-12-07 04:05:25

您需要提供更多信息。这是唯一使您的应用程序崩溃的字段吗?它一直都是这样的吗?

也就是说,看起来是自动完成功能让你崩溃了。尝试禁用该字段的自动完成(IIRC,Interface Builder 中有一个选项)。

You need to provide more information. Is that the only field crashing your app? Has it always behaved like this?

That said, it looks like it's the autocompletion that's crashing on you. Try disabling autocomplete for that field (IIRC, there's an option for that in Interface Builder).

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