TextInputTest crash on iphone5.0/ipad5.0 simulator, win32 ok.

:slight_smile:
2011-11-18 22:51:36.795 iphone[1889:10103] * Terminating app due to uncaught exception ‘NSRangeException’, reason: ’~~: index beyond bounds ’
* First throw call stack:
terminate called throwing an exception[Switching to process 1889 thread 0x10103]
sharedlibrary apply-load-rules all
Current language: auto; currently objective-c++
Warning: the current language does not match this frame.


this is the log.
:
{
if
{
becomeFirstResponder];
}
else
{
resignFirstResponder];
}
}
— crash stack —
#28 0x009c3878 in~~[UIResponder becomeFirstResponder] ()
#29 0x00117331 in cocos2d::CCEGLView::setIMEKeyboardState(bool) at /Users/dbdongbo/Documents/cocos2d-1.0.1-x-0.9.2/cocos2dx/platform/ios/CCEGLView_ios.mm:128
#30 0x00090b7c in cocos2d::CCTextFieldTTF::attachWithIME() ()
#31 0x0008f0c9 in KeyboardNotificationLayer::ccTouchEnded(cocos2d::CCTouch**, cocos2d::CCEvent**) ()
#32 0x00149ca7 in cocos2d::CCTouchDispatcher::touches(cocos2d::CCSet**, cocos2d::CCEvent**, unsigned int) ()
#33 0x0014a130 in cocos2d::CCTouchDispatcher::touchesEnded(cocos2d::CCSet**, cocos2d::CCEvent**) ()
#34 0x0011720e in cocos2d::CCEGLView::touchesEnded(cocos2d::CCSet*) ()
#35 0x0011edba in ~~
#36 0x00900002 in~~[UIWindow sendTouchesForEvent:]
#37 0x0090020a in ~~
#38 0x008e660c in~~
#39 0x008d9d52 in
UIApplicationHandleEvent ()
#40 0x0281e8f6 in PurpleEventCallback ()
#41 0x01d7131a in CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION ()
#42 0x01cccd07 in CFRunLoopDoSource1
#43 0x01ccae93 in
CFRunLoopRun ()
#44 0x01cca750 in CFRunLoopRunSpecific ()
#45 0x01cca671 in CFRunLoopRunInMode ()
#46 0x0281d0c3 in GSEventRunModal ()
#47 0x0281d188 in GSEventRun ()
#48 0x008d7c29 in UIApplicationMain ()
#49 0x00002315 in main at /Users/dbdongbo/Documents/cocos2d-1.0.1-x-0.9.2/tests/test.ios/main.m:14

I cannot reproduce this crash on the last source (from github)
My env is Xcode4.2, iphone simulator5.0.