Skip to content

InputField keyboard left/right arrow buttons on landscape aren't always disabled properly. #8744

Closed

Description

@vision360deg

Steps to Reproduce

  1. Layout an InputField widget in your UI.
  2. Run the app on an iPhone Plus device and
  3. then select/tap on the inputField.
  4. Start typing and
  5. then rotate the device.
    As you can see at this point the left and right arrows (which only appears on the landscape keyboard) will not be disabled as they should (since not supported at the moment). Tapping on either arrow buttons will crash the app.

Logs

[        ] -[FlutterTextInputView selectedTextRange]: unrecognized selector sent to instance 0x7f89af40a510
[   +1 ms] [DEVICE LOG] Mar 13 16:38:01 aleph Runner[12354]: 2017-03-13 16:38:01.054 Runner[12354:3650370] -[FlutterTextInputView selectedTextRange]: unrecognized selector sent to instance 0x7f89af40a510
[        ] 2017-03-13 16:38:01.054 Runner[12354:3650370] -[FlutterTextInputView selectedTextRange]: unrecognized selector sent to instance 0x7f89af40a510
[        ] [SYS LOG] Mar 13 16:38:01 aleph diagnosticd[200]: Unexpected xpc type [<double: 0x7f8f44f06400>: 9223372036856862720.000000]
[ +190 ms] [DEVICE LOG] Mar 13 16:38:01 aleph Runner[12354]: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FlutterTextInputView selectedTextRange]: unrecognized selector sent to instance 0x7f89af40a510'
[        ] [DEVICE LOG]         *** First throw call stack:
[        ] [DEVICE LOG]         (
[        ] [DEVICE LOG]                 0   CoreFoundation                      0x000000010eec2d4b __exceptionPreprocess + 171
[        ] [DEVICE LOG]                 1   libobjc.A.dylib                     0x000000010e92421e objc_exception_throw + 48
[        ] [DEVICE LOG]                 2   CoreFoundation                      0x000000010ef32f04 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
[        ] [DEVICE LOG]                 3   CoreFoundation                      0x000000010ee48005 ___forwarding___ + 1013
[        ] [DEVICE LOG]                 4   CoreFoundation                      0x000000010ee47b88 _CF_forwarding_prep_0 + 120
[        ] [DEVICE LOG]                 5   UIKit                               0x000000010f8fa194 -[UIResponder(UITextInput_Internal) _moveLeft:withHistory:] + 56
[        ] [DEVICE LOG]                 6   UIKit                               0x000000010f5cae94 -[UIKeyboardImpl(UIKitInternal) moveCursorLeftShifted:] + 140
[        ] [DEVICE LOG]                 7   UIKit                               0x000000010f7ebaad -[UIKeyboardLayoutStar touchDownWithKey:atPoint:executionContext:] + 1520
[        ] [DEVICE LOG]                 8   UIKit                               0x000000010f7eb1ca -[UIKeyboardLayoutStar completeHitTestForTouchDown:executionContext:] + 1269
[        ] [DEVICE LOG]                 9   UIKit                               0x000000010fe36d27 -[UIKeyboardTaskExecutionContext returnExecutionToParentWithInfo:] + 278
[        ] [DEVICE LOG]                 10  UIKit                               0x000000010f7e1085 -[UIKeyboardLayoutStar performHitTestForTouchInfo:touchStage:executionContextPassingUIKBTree:] + 1950
[        ] [DEVICE LOG]                 11  UIKit                               0x000000010f7eab01 -[UIKeyboardLayoutStar touchDown:executionContext:] + 609
[        ] [DEVICE LOG]                 12  UIKit                               0x000000010f5d8a4c __47-[UIKeyboardLayout touchDownTaskForTouchState:]_block_invoke + 296
[   +1 ms] [DEVICE LOG]                 13  UIKit                               0x000000010fe3736b -[UIKeyboardTaskQueue continueExecutionOnMainThread] + 385
[        ] [DEVICE LOG]                 14  UIKit                               0x000000010f5d9dd2 -[UIKeyboardLayout touchesBegan:withEvent:] + 562
[        ] [DEVICE LOG]                 15  UIKit                               0x000000010f356285 -[UIWindow _sendTouchesForEvent:] + 2043
[        ] [DEVICE LOG]                 16  UIKit                               0x000000010f357c33 -[UIWindow sendEvent:] + 4011
[        ] [DEVICE LOG]                 17  UIKit                               0x000000010f3049ab -[UIApplication sendEvent:] + 371
[        ] [DEVICE LOG]                 18  UIKit                               0x000000010faf172d __dispatchPreprocessedEventFromEventQueue + 3248
[        ] [DEVICE LOG]                 19  UIKit                               0x000000010faea463 __handleEventQueue + 4879
[        ] [DEVICE LOG]                 20  CoreFoundation                      0x000000010ee67761 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
[        ] [DEVICE LOG]                 21  CoreFoundation                      0x000000010ee4c98c __CFRunLoopDoSources0 + 556
[        ] [DEVICE LOG]                 22  CoreFoundation                      0x000000010ee4be76 __CFRunLoopRun + 918
[        ] [DEVICE LOG]                 23  CoreFoundation                      0x000000010ee4b884 CFRunLoopRunSpecific + 420
[        ] [DEVICE LOG]                 24  GraphicsServices                    0x0000000112f8aa6f GSEventRunModal + 161
[        ] [DEVICE LOG]                 25  UIKit                               0x000000010f2e6c68 UIApplicationMain + 159
[        ] [DEVICE LOG]                 26  Runner                              0x000000010caf8f41 main + 80
[        ] [DEVICE LOG]                 27  libdyld.dylib                       0x000000011655768d start + 1
[        ] [DEVICE LOG]         )
[        ] [DEVICE LOG] Mar 13 16:38:01 aleph Runner[12354]: 2017-03-13 16:38:01.248 Runner[12354:3650370] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FlutterTextInputView selectedTextRange]: unrecognized selector sent to instance 0x7f89af40a510'
[        ] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FlutterTextInputView selectedTextRange]: unrecognized selector sent to instance 0x7f89af40a510'
[        ]      *** First throw call stack:
[        ]      (
[        ]              0   CoreFoundation                      0x000000010eec2d4b __exceptionPreprocess + 171
[        ]              1   libobjc.A.dylib                     0x000000010e92421e objc_exception_throw + 48
[        ]              2   CoreFoundation                      0x000000010ef32f04 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
[        ]              3   CoreFoundation                      0x000000010ee48005 ___forwarding___ + 1013
[        ]              4   CoreFoundation                      0x000000010ee47b88 _CF_forwarding_prep_0 + 120
[        ]              5   UIKit                               0x000000010f8fa194 -[UIResponder(UITextInput_Internal) _moveLeft:withHistory:] + 56
[        ]              6   UIKit                               0x000000010f5cae94 -[UIKeyboardImpl(UIKitInternal) moveCursorLeftShifted:] + 140
[        ]              7   UIKit                               0x000000010f7ebaad -[UIKeyboardLayoutStar touchDownWithKey:atPoint:executionContext:] + 1520
[        ]              8   UIKit                               0x000000010f7eb1ca -[UIKeyboardLayoutStar completeHitTestForTouchDown:executionContext:] + 1269
[        ]              9   UIKit                               0x000000010fe36d27 -[UIKeyboardTaskExecutionContext returnExecutionToParentWithInfo:] + 278
[        ]              10  UIKit                               0x000000010f7e1085 -[UIKeyboardLayoutStar performHitTestForTouchInfo:touchStage:executionContextPassingUIKBTree:] + 1950
[        ]              11  UIKit                               0x000000010f7eab01 -[UIKeyboardLayoutStar touchDown:executionContext:] + 609
[        ]              12  UIKit                               0x000000010f5d8a4c __47-[UIKeyboardLayout touchDownTaskForTouchState:]_block_invoke + 296
[        ]              13  UIKit                               0x000000010fe3736b -[UIKeyboardTaskQueue continueExecutionOnMainThread] + 385
[        ]              14  UIKit                               0x000000010f5d9dd2 -[UIKeyboardLayout touchesBegan:withEvent:] + 562
[        ]              15  UIKit                               0x000000010f356285 -[UIWindow _sendTouchesForEvent:] + 2043
[        ]              16  UIKit                               0x000000010f357c33 -[UIWindow sendEvent:] + 4011
[        ]              17  UIKit                               0x000000010f3049ab -[UIApplication sendEvent:] + 371
[        ]              18  UIKit                               0x000000010faf172d __dispatchPreprocessedEventFromEventQueue + 3248
[        ]              19  UIKit                               0x000000010faea463 __handleEventQueue + 4879
[        ]              20  CoreFoundation                      0x000000010ee67761 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
[        ]              21  CoreFoundation                      0x000000010ee4c98c __CFRunLoopDoSources0 + 556
[        ]              22  CoreFoundation                      0x000000010ee4be76 __CFRunLoopRun + 918
[        ]              23  CoreFoundation                      0x000000010ee4b884 CFRunLoopRunSpecific + 420
[        ]              24  GraphicsServices                    0x0000000112f8aa6f GSEventRunModal + 161
[        ]              25  UIKit                               0x000000010f2e6c68 UIApplicationMain + 159
[        ]              26  Runner                              0x000000010caf8f41 main + 80
[        ]              27  libdyld.dylib                       0x000000011655768d start + 1
[        ]      )
[        ] 2017-03-13 16:38:01.248 Runner[12354:3650370] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FlutterTextInputView selectedTextRange]: unrecognized selector sent to instance 0x7f89af40a510'
[        ] [DEVICE LOG] Mar 13 16:38:01 aleph Runner[12354]: *** First throw call stack:
[        ] *** First throw call stack:
[   +4 ms] Application finished.
[   +3 ms] DevFS: Deleted filesystem on the device (file:///Users/federico/Library/Developer/CoreSimulator/Devices/C010696E-20B0-4097-83C4-63803B3611E2/data/Containers/Data/Application/0FE721AE-1CBE-45F6-813D-303D0E1802C7/tmp/yook5NvPV/yoo/)
[   +9 ms] [DEVICE LOG] Mar 13 16:38:01 aleph Runner[12354]: (
[        ] (
[   +4 ms] [DEVICE LOG] Mar 13 16:38:01 aleph Runner[12354]:    0   CoreFoundation                      0x000000010eec2d4b __exceptionPreprocess + 171
[        ]      0   CoreFoundation                      0x000000010eec2d4b __exceptionPreprocess + 171
[   +2 ms] [DEVICE LOG] Mar 13 16:38:01 aleph Runner[12354]:    1   libobjc.A.dylib                     0x000000010e92421e objc_exception_throw + 48
[        ]      1   libobjc.A.dylib                     0x000000010e92421e objc_exception_throw + 48
[   +2 ms] [DEVICE LOG] Mar 13 16:38:01 aleph Runner[12354]:    2   CoreFoundation                      0x000000010ef32f04 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
[        ]      2   CoreFoundation                      0x000000010ef32f04 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
[   +5 ms] [DEVICE LOG] Mar 13 16:38:01 aleph Runner[12354]:    3   CoreFoundation                      0x000000010ee48005 ___forwarding___ + 1013
[        ] [DEVICE LOG] Mar 13 16:38:01 aleph Runner[12354]:    4   CoreFoundation                      0x000000010ee47b88 _CF_forwarding_prep_0 + 120
[        ] [DEVICE LOG] Mar 13 16:38:01 aleph Runner[12354]:    5   UIKit                               0x000000010f8fa194 -[UIResponder(UITextInput_Internal) _moveLeft:withHistory:] + 56
[        ] [DEVICE LOG] Mar 13 16:38:01 aleph Runner[12354]:    6   UIKit                               0x000000010f5cae94 -[UIKeyboardImpl(UIKitInternal) moveCursorLeftShifted:] + 140
[        ] [DEVICE LOG] Mar 13 16:38:01 aleph Runner[12354]:    7   UIKit                               0x000000010f7ebaad -[UIKeyboardLayoutStar touchDownWithKey:atPoint:executionContext:] + 1520
[        ] [DEVICE LOG] Mar 13 16:38:01 aleph Runner[12354]:    8   UIKit                               0x000000010f7eb1ca -[UIKeyboardLayoutStar completeHitTestForTouchDown:executionContext:] + 1269
[        ] [DEVICE LOG] Mar 13 16:38:01 aleph Runner[12354]:    9   UIKit                               0x000000010fe36d27 -[UIKeyboardTaskExecutionContext returnExecutionToParentWithInfo:] + 278
[        ] [DEVICE LOG] Mar 13 16:38:01 aleph Runner[12354]:    10  UIKit                               0x000000010f7e1085 -[UIKeyboardLayoutStar performHitTestForTouchInfo:touchStage:executionContextPassingUIKBTree:] + 1950
[        ] [DEVICE LOG] Mar 13 16:38:01 aleph Runner[12354]:    11  UIKit                               0x000000010f7eab01 -[UIKeyboardLayoutStar touchDown:executionContext:] + 609
[        ] [DEVICE LOG] Mar 13 16:38:01 aleph Runner[12354]:    12  UIKit                               0x000000010f5d8a4c __47-[UIKeyboardLayout touchDownTaskForTouchState:]_block_invoke + 296
[        ] [DEVICE LOG] Mar 13 16:38:01 aleph Runner[12354]:    13  UIKit                               0x000000010fe3736b -[UIKeyboardTaskQueue continueExecutionOnMainThread] + 385
[  +31 ms] [DEVICE LOG] Mar 13 16:38:01 aleph Runner[12354]:    14  UIKit                               0x000000010f5d9dd2 -[UIKeyboardLayout touchesBegan:withEvent:] + 562
[        ] [DEVICE LOG] Mar 13 16:38:01 aleph Runner[12354]:    15  UIKit                               0x000000010f356285 -[UIWindow _sendTouchesForEvent:] + 2043
[        ]      3   CoreFoundation                      0x000000010ee48005 ___forwarding___ + 1013
[        ]      4   CoreFoundation                      0x000000010ee47b88 _CF_forwarding_prep_0 + 120
[        ]      5   UIKit                               0x000000010f8fa194 -[UIResponder(UITextInput_Internal) _moveLeft:withHistory:] + 56
[        ]      6   UIKit                               0x000000010f5cae94 -[UIKeyboardImpl(UIKitInternal) moveCursorLeftShifted:] + 140
[        ]      7   UIKit                               0x000000010f7ebaad -[UIKeyboardLayoutStar touchDownWithKey:atPoint:executionContext:] + 1520
[        ]      8   UIKit                               0x000000010f7eb1ca -[UIKeyboardLayoutStar completeHitTestForTouchDown:executionContext:] + 1269
[        ]      9   UIKit                               0x000000010fe36d27 -[UIKeyboardTaskExecutionContext returnExecutionToParentWithInfo:] + 278
[        ]      10  UIKit                               0x000000010f7e1085 -[UIKeyboardLayoutStar performHitTestForTouchInfo:touchStage:executionContextPassingUIKBTree:] + 1950
[        ]      11  UIKit                               0x000000010f7eab01 -[UIKeyboardLayoutStar touchDown:executionContext:] + 609
[        ]      12  UIKit                               0x000000010f5d8a4c __47-[UIKeyboardLayout touchDownTaskForTouchState:]_block_invoke + 296
[        ]      13  UIKit                               0x000000010fe3736b -[UIKeyboardTaskQueue continueExecutionOnMainThread] + 385
[        ]      14  UIKit                               0x000000010f5d9dd2 -[UIKeyboardLayout touchesBegan:withEvent:] + 562
[        ]      15  UIKit                               0x000000010f356285 -[UIWindow _sendTouchesForEvent:] + 2043
[        ] [DEVICE LOG] Mar 13 16:38:01 aleph com.apple.CoreSimulator.SimDevice.C010696E-20B0-4097-83C4-63803B3611E2.launchd_sim[28391] (UIKitApplication:com.yourcompany.yoo[0x86fa][12354]): Service exited due to Abort trap: 6
[        ] [DEVICE LOG] Mar 13 16:38:01 aleph backboardd[28409]: [Common] Unable to get short BSD proc info for 12354: No such process
[        ] [DEVICE LOG] Mar 13 16:38:01 aleph backboardd[28409]: [Common] Unable to get proc info for 12354: No such process
[        ] [DEVICE LOG] Mar 13 16:38:01 aleph SpringBoard[28407]: [KeyboardArbiter] HW kbd: Failed to set (null) as keyboard focus
[        ] [SYS LOG] Mar 13 16:38:01 aleph com.apple.xpc.launchd[1] (com.apple.ReportCrash[22504]): Endpoint has been activated through legacy launch(3) APIs. Please switch to XPC or bootstrap_check_in(): com.apple.ReportCrash
[ +126 ms] [DEVICE LOG] Mar 13 16:38:01 --- last message repeated 1 time ---
[        ] [DEVICE LOG] Mar 13 16:38:01 aleph assertiond[28412]: notify_suspend_pid() failed with error 7
[  +72 ms] TimeoutException after 0:00:00.250000: Future not completed
[   +1 ms] 'flutter run' took 1357630ms.
[   +3 ms] exiting with code 0

Flutter Doctor

[✓] Flutter (on Mac OS, channel master)
• Flutter at /Users/federico/Development/code/Dart/flutter
• Framework revision a4c5829 (3 days ago), 2017-03-10 15:34:20
• Engine revision e0c702e
• Tools Dart version 1.23.0-dev.2.0

[✓] Android toolchain - develop for Android devices (Android SDK 25.0.2)
• Android SDK at /Users/federico/Library/Android/sdk
• Platform android-25, build-tools 25.0.2
• Java(TM) SE Runtime Environment (build 1.8.0_121-b13)

[✓] iOS toolchain - develop for iOS devices (Xcode 8.2.1)
• Xcode at /Users/federico/Development/Xcode.app/Contents/Developer
• Xcode 8.2.1, Build version 8C1002
• ios-deploy 1.9.1
• CocoaPods version 1.1.1

[✓] Android Studio (version 2.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Gradle version 2.14.1

[✓] IntelliJ IDEA Community Edition (version 2016.3.5)
• Dart plugin version 163.13137
• Flutter plugin version 0.1.11.2

[✓] Connected devices
• iPhone 7 Plus • C010696E-20B0-4097-83C4-63803B3611E2 • ios • iOS 10.2 (simulator)

Activity

  1. eseidelGoogle commented on Mar 14, 2017

    @eseidelGoogle
    Contributor

    I believe @alardizabal also ran into this just now.

  2. vision360deg commented on Mar 14, 2017

    @vision360deg
    Author

    @eseidelGoogle I think that's right. Also I think the crash itself is what is supposed to happen here, since the left/right keyboard buttons are supposed to stay disabled. That's my understanding compared to the InputField's behavior, in the case the keyboard shows up in landscape already.
    So the problem is really just to enforce those buttons to be disabled also after a rotation event happened.

  3. eseidelGoogle commented on Mar 23, 2017

    @eseidelGoogle
    Contributor

    There are a cluster of iOS Keyboard bugs many likely caused by us currently using the wrong API level to interface with the iOS Keyboard. I believe #4818 is the bug where the fix is likely to be tracked.

    FYI @cbracken @xster

  4. cbracken commented on Apr 7, 2017

    @cbracken
    Member

    I can confirm that my in-progress change fixes this crash.

  5. cbracken commented on Apr 12, 2017

    @cbracken
    Member

    Fixed by flutter-team-archive/engine#3586. Rather than disable the arrows, we get them working :)

  6. github-actions commented on Sep 5, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  7. locked as resolved and limited conversation to collaborators on Sep 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

a: text inputEntering text in a text field or keyboard related problemsc: crashStack traces logged to the consolecustomer: posse (eap)platform-iosiOS applications specifically

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions