0
當我在文本字段中輸入'(撇號)時,我的應用程序崩潰。任何人都可以請告訴解決方案的問題。下面是它崩潰的地方UITextField在輸入撇號(')時崩潰應用程序
hotelTextfield.text = [hotelList objectAtIndex:indexPath.row];
我在文本字段中輸入了其他字符串,但沒有引起任何問題。但是,每當我進入一些',它崩潰。 請找到棧回溯墜機
Program received signal: 「EXC_BAD_ACCESS」.
(gdb) bt
#0 0x31ec3ebc in objc_msgSend()
#1 0x31ec5b3c in objc_setProperty()
#2 0x0000e720 in -[AvailabilityVC setHotelList:] (self=0x11fbe0, _cmd=0x1f700, _value=0x31ec3f28) at /Users/amitkumar_gupta/Documents/Projects/5StarHotels/Classes/AvailabilityVC.m:29
#3 0x0000c6c8 in -[AvailabilityVC textFieldDidChange:] (self=0x11fbe0, _cmd=0x1f8e7, aNotification=0x1858a0) at /Users/amitkumar_gupta/Documents/Projects/5StarHotels/Classes/AvailabilityVC.m:248
#4 0x308ff5d8 in _nsnote_callback()
#5 0x30de3510 in _CFXNotificationPostNotification()
#6 0x308fd1b2 in -[NSNotificationCenter postNotificationName:object:userInfo:]()
#7 0x308ff518 in -[NSNotificationCenter postNotificationName:object:]()
#8 0x336b27f4 in -[UITextField fieldEditorDidChange:]()
#9 0x335eecb4 in -[UIFieldEditor webViewDidChange:]()
#10 0x308ff5d8 in _nsnote_callback()
#11 0x30de3510 in _CFXNotificationPostNotification()
#12 0x308fd1b2 in -[NSNotificationCenter postNotificationName:object:userInfo:]()
#13 0x30da38e4 in __invoking___()
#14 0x30df757a in -[NSInvocation invoke]()
#15 0x311ca134 in SendDelegateMessage()
#16 0x3069cb30 in WebEditorClient::respondToChangedContents()
#17 0x3123c01c in WebCore::Editor::respondToChangedContents()
#18 0x3123a914 in WebCore::Editor::appliedEditing()
#19 0x3123a740 in WebCore::TypingCommand::typingAddedToOpenCommand()
#20 0x3122aa10 in WebCore::TypingCommand::insertTextRunWithoutNewlines()
#21 0x3122a954 in WebCore::TypingCommand::insertText()
#22 0x3122947c in WebCore::TypingCommand::insertText()
#23 0x31228bd4 in WebCore::Editor::insertTextWithoutSendingTextEvent()
#24 0x31228818 in WebCore::EventHandler::defaultTextInputEventHandler()
#25 0x311f776c in WebCore::EventTargetNode::defaultEventHandler()
#26 0x311f7358 in WebCore::EventTargetNode::dispatchGenericEvent()
#27 0x311f6cf8 in WebCore::EventTargetNode::dispatchEvent()
#28 0x312284fc in WebCore::EventHandler::handleTextInputEvent()
#29 0x312283e0 in WebCore::Editor::insertText()
#30 0x3069bab8 in -[WebHTMLView(WebNSTextInputSupport) insertText:]()
#31 0x30defa14 in -[NSObject performSelector:withObject:]()
#32 0x31228280 in -[WAKResponder tryToPerform:with:]()
#33 0x3069b3d0 in -[WebView(WebViewEditingActions) _performResponderOperation:with:]()
#34 0x3069b350 in -[WebView(WebViewEditingActions) insertText:]()
#35 0x3368dd2c in -[UIWebDocumentView insertText:]()
#36 0x3368d7b0 in -[UIKeyboardImpl addInputString:fromVariantKey:]()
#37 0x3368ca88 in -[UIKeyboardImpl handleStringInput:fromVariantKey:]()
#38 0x3368c81c in -[UIKeyboardLayoutStar sendStringAction:forKey:]()
#39 0x3368b8f0 in -[UIKeyboardLayoutStar touchUp:withPathInfo:]()
#40 0x3368732c in -[UIKeyboardLayout handleHandEvent:]()
#41 0x3368b414 in -[UIKeyboardLayout touchesEnded:withEvent:]()
#42 0x33604900 in -[UIWindow _sendTouchesForEvent:]()
#43 0x33603f94 in -[UIWindow sendEvent:]()
#44 0x335ff790 in -[UIApplication sendEvent:]()
#45 0x335ff094 in _UIApplicationHandleEvent()
#46 0x332e8990 in PurpleEventCallback()
#47 0x30de952a in CFRunLoopRunSpecific()
#48 0x30de8c1e in CFRunLoopRunInMode()
#49 0x332e7374 in GSEventRunModal()
#50 0x335adc30 in -[UIApplication _run]()
#51 0x335ac230 in UIApplicationMain()
#52 0x00002550 in main (argc=1, argv=0x2ffff540) at /Users/amitkumar_gupta/Documents/Projects/5StarHotels/main.m:13
(gdb)
沒有一段代碼,我們不能做太多! :/ – vfn 2010-09-17 06:49:16
解決方案的第一步是提供有關故障的詳細信息。這個論壇上的人都是開發者,不是千里眼 – 2010-09-17 06:49:20
其實我已經將我的問題總結爲根。無論如何,我編輯它爲任何人的幫助。 – 2010-09-17 07:08:53