Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-79316

When entering Japanese text in a QML TextField and then switching to a WebView text field it will cause a crash

    XMLWordPrintable

    Details

    • Platform/s:
      iOS/tvOS/watchOS
    • Commits:
      9ac156c90b92a981f70929e081c64083b14e9a57 (qt/qtbase/5.14) 6cddd0e8cf539fe5efa36d2b7429e6baaffaa809 (qt/qtbase/5.12)

      Description

      When entering Japanese text in a QML TextField and then switching to a WebView text field it will cause a crash. This is because textInputView in QIOSTextResponder is called and there is no focus window at this point. The following is the stack:

      #0	0x000000010101b600 in QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::operator->() const at /Users/andy/dev/qt5.12-ios/qtbase/src/corelib/tools/qscopedpointer.h:118
      #1	0x00000001022ec018 in decltype(fp.operator->()) qGetPtrHelper<QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> > >(QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> > const&) at /Users/andy/dev/qt5.12-ios/qtbase/src/corelib/global/qglobal.h:1038
      #2	0x0000000101759c04 in QWindow::d_func() const at /Users/andy/dev/qt5.12-ios/qtbase/src/gui/kernel/qwindow.h:98
      #3	0x000000010175a39c in QWindow::handle() const at /Users/andy/dev/qt5.12-ios/qtbase/src/gui/kernel/qwindow.cpp:1928
      #4	0x0000000100fed6cc in ::-[QIOSTextInputResponder textInputView]() at /Users/andy/dev/qt5.12-ios/qtbase/src/plugins/platforms/ios/qiostextresponder.mm:788
      #5	0x000000019c98b2c4 in -[UITextSelectionView textSelectionViewActivated:] ()
      #6	0x000000019865609c in __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ ()
      #7	0x00000001986560e4 in ___CFXRegistrationPost1_block_invoke ()
      #8	0x0000000198655444 in _CFXRegistrationPost1 ()
      #9	0x00000001986550fc in ___CFXNotificationPost_block_invoke ()
      #10	0x00000001985d143c in -[_CFXNotificationRegistrar find:object:observer:enumerator:] ()
      #11	0x0000000198654a4c in _CFXNotificationPost ()
      #12	0x00000001989b12d8 in -[NSNotificationCenter postNotificationName:object:userInfo:] ()
      #13	0x000000019c98a3a0 in -[UITextSelectionView activate] ()
      #14	0x000000019c976c2c in -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) activateSelection] ()
      #15	0x000000019fb8c2bc in -[WKContentView(WKInteraction) becomeFirstResponderForWebView] ()
      #16	0x000000019fb8c128 in -[WKWebView becomeFirstResponder] ()
      #17	0x000000019c978ed8 in -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) setFirstResponderIfNecessary] ()
      #18	0x000000019c960af0 in -[UITextNonEditableInteraction oneFingerTapInUneditable:] ()
      #19	0x000000019c2ffdc0 in -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:] ()
      #20	0x000000019c3083c0 in _UIGestureRecognizerSendTargetActions ()
      #21	0x000000019c305bb8 in _UIGestureRecognizerSendActions ()
      #22	0x000000019c305118 in -[UIGestureRecognizer _updateGestureForActiveEvents] ()
      #23	0x000000019c2f9128 in _UIGestureEnvironmentUpdate ()
      #24	0x000000019c2f88a0 in -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] ()
      #25	0x000000019c2f8664 in -[UIGestureEnvironment _updateForEvent:window:] ()
      #26	0x000000019c74308c in -[UIWindow sendEvent:] ()
      #27	0x0000000100fcef80 in ::-[QUIWindow sendEvent:](UIEvent *) at /Users/andy/dev/qt5.12-ios/qtbase/src/plugins/platforms/ios/qiosscreen.mm:207
      #28	0x000000019c71fae8 in -[UIApplication sendEvent:] ()
      #29	0x000000019c79723c in __dispatchPreprocessedEventFromEventQueue ()
      #30	0x000000019c799798 in __handleEventQueueInternal ()
      #31	0x000000019c79260c in __handleHIDEventFetcherDrain ()
      #32	0x00000001986787e0 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ ()
      #33	0x0000000198678738 in __CFRunLoopDoSource0 ()
      #34	0x0000000198677ed0 in __CFRunLoopDoSources0 ()
      #35	0x000000019867301c in __CFRunLoopRun ()
      #36	0x00000001986728bc in CFRunLoopRunSpecific ()
      #37	0x00000001a24d7328 in GSEventRunModal ()
      #38	0x000000019c7076d4 in UIApplicationMain ()
      #39	0x0000000100fc8328 in ::qt_main_wrapper(int, char **) at /Users/andy/dev/qt5.12-ios/qtbase/src/plugins/platforms/ios/qioseventdispatcher.mm:240
      #40	0x00000001984fd460 in start ()
      

      To reproduce, make sure you have the Japanese keyboard set, click on the arrow at the top to move to the QML TextField and type some Japanese characters in. Click on the back arrow near the top and then click inside the search field on the webpage.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            vestbo Tor Arne Vestbø
            Reporter:
            andysh Andy Shaw
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes