Details
Description
This issue can be reproduced with qtwebbrowser ( http://code.qt.io/cgit/qt-apps/qtwebbrowser.git/ ) or with the attached example ( we-keyboard.tgz ).
Steps to reproduce:
- Start browser and load www.google.com
- Start to type something into the input field
- Click/Touch in the middle of the text
- Hide keyboard
Then the virtual keyboard asserts because the length of the surrounding text ( http://doc.qt.io/qt-5/qt.html#InputMethodQuery-enum ) is less then the current cursor position. (when hiding the virtual keyboard the cursor seems to be set to the end of the text)
The assert is:
ASSERT: "uint(i) < uint(size())" in file /home/stampho/work/Qt/qt5-512-dev/qtbase/include/QtCore/../../../../qt5-512-src/qtbase/src/corelib/tools/qstring.h, line 933
Received signal 6
#0 0x7fce44638d28 base::debug::StackTrace::StackTrace()
#1 0x7fce44635c8f base::debug::StackTrace::StackTrace()
#2 0x7fce4463795c base::debug::(anonymous namespace)::StackDumpSignalHandler()
#3 0x7fce3d7a90a0 <unknown>
#4 0x7fce3ca5b76b gsignal
#5 0x7fce3ca5cfb1 abort
#6 0x7fce3dccdd0a qt_message_fatal()
#7 0x7fce3dcce96b QMessageLogger::fatal()
#8 0x7fce3dcc7275 qt_assert()
#9 0x7fce34160448 QtVirtualKeyboard::HunspellInputMethod::reselect()
#10 0x7fce3229c6a7 QtVirtualKeyboard::InputEngine::reselect()
#11 0x7fce322987e1 QtVirtualKeyboard::InputContext::update()
#12 0x7fce322944bb QtVirtualKeyboard::PlatformInputContext::update()
#13 0x7fce3ea1890e QInputMethod::update()
#14 0x7fce4f3e4975 QtWebEngineCore::RenderWidgetHostViewQtDelegateQuick::inputMethodStateChanged()
#15 0x7fce404d1901 QtWebEngineCore::RenderWidgetHostViewQt::OnUpdateTextInputStateCalled()
#16 0x7fce43e5894e content::TextInputManager::NotifyObserversAboutInputStateUpdate()
#17 0x7fce43e5743c content::TextInputManager::UpdateTextInputState()
#18 0x7fce43e3d1d6 content::RenderWidgetHostViewBase::TextInputStateChanged()
#19 0x7fce43e11ab1 content::RenderWidgetHostImpl::OnTextInputStateChanged()
#20 0x7fce43e26781 _ZN4base20DispatchToMethodImplIPN7content20RenderWidgetHostImplEMS2_FvRKNS1_14TextInputStateEESt5tupleIJS4_EEJLm0EEEEvRKT_T0_OT1_St16integer_sequenceImJXspT2_EEE
#21 0x7fce43e2281a _ZN4base16DispatchToMethodIPN7content20RenderWidgetHostImplEMS2_FvRKNS1_14TextInputStateEESt5tupleIJS4_EEEEvRKT_T0_OT1_
#22 0x7fce43e1eaed _ZN3IPC16DispatchToMethodIN7content20RenderWidgetHostImplEMS2_FvRKNS1_14TextInputStateEEvSt5tupleIJS3_EEEEvPT_T0_PT1_OT2_
#23 0x7fce43e1a5ee _ZN3IPC8MessageTI38ViewHostMsg_TextInputStateChanged_MetaSt5tupleIJN7content14TextInputStateEEEvE8DispatchINS3_20RenderWidgetHostImplES8_vMS8_FvRKS4_EEEbPKNS_7MessageEPT_PT0_PT1_T2_
#24 0x7fce43e0a621 content::RenderWidgetHostImpl::OnMessageReceived()
#25 0x7fce43d94712 content::RenderProcessHostImpl::OnMessageReceived()
#26 0x7fce44ecbc05 IPC::ChannelProxy::Context::OnDispatchMessage()
#27 0x7fce44ed1c39 _ZN4base8internal13FunctorTraitsIMN3IPC12ChannelProxy7ContextEFvRKNS2_7MessageEEvE6InvokeIRK13scoped_refptrIS4_EJS7_EEEvS9_OT_DpOT0_
#28 0x7fce44ed1413 _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIRKMN3IPC12ChannelProxy7ContextEFvRKNS4_7MessageEEJRK13scoped_refptrIS6_ES9_EEEvOT_DpOT0_
#29 0x7fce44ecfc94 _ZN4base8internal7InvokerINS0_9BindStateIMN3IPC12ChannelProxy7ContextEFvRKNS3_7MessageEEJ13scoped_refptrIS5_ES6_EEEFvvEE7RunImplIRKSA_RKSt5tupleIJSC_S6_EEJLm0ELm1EEEEvOT_OT0_St16integer_sequenceImJXspT1_EEE
#30 0x7fce44eceff0 _ZN4base8internal7InvokerINS0_9BindStateIMN3IPC12ChannelProxy7ContextEFvRKNS3_7MessageEEJ13scoped_refptrIS5_ES6_EEEFvvEE3RunEPNS0_13BindStateBaseE
#31 0x7fce40540804 _ZNO4base12OnceCallbackIFvvEE3RunEv
#32 0x7fce44639583 base::debug::TaskAnnotator::RunTask()
#33 0x7fce44692d18 base::internal::IncomingTaskQueue::RunTask()
#34 0x7fce4469b501 base::MessageLoop::RunTask()
#35 0x7fce4469b674 base::MessageLoop::DeferOrRunPendingTask()
#36 0x7fce4469b9a3 base::MessageLoop::DoWork()
#37 0x7fce4047ef76 QtWebEngineCore::(anonymous namespace)::MessagePumpForUIQt::customEvent()
#38 0x7fce3ded4f9a QObject::event()
#39 0x7fce3dea218a QCoreApplicationPrivate::notify_helper()
#40 0x7fce3dea2253 doNotify()
#41 0x7fce3dea23aa QCoreApplication::notify()
#42 0x7fce3e9f7b5a QGuiApplication::notify()
#43 0x7fce3dea22e7 QCoreApplication::notifyInternal2()
#44 0x7fce3dea2542 QCoreApplication::sendEvent()
#45 0x7fce3dea8709 QCoreApplicationPrivate::sendPostedEvents()
#46 0x7fce3dea8d8e QCoreApplication::sendPostedEvents()
#47 0x7fce3df0538c postEventSourceDispatch()
#48 0x7fce35b51d97 g_main_context_dispatch
#49 0x7fce35b51fd0 <unknown>
#50 0x7fce35b5205c g_main_context_iteration
#51 0x7fce3df04c96 QEventDispatcherGlib::processEvents()
#52 0x7fce34348fe7 QPAEventDispatcherGlib::processEvents()
#53 0x7fce3dea01f9 QEventLoop::processEvents()
#54 0x7fce3dea0651 QEventLoop::exec()
#55 0x7fce3deaa75e QCoreApplication::exec()
#56 0x7fce3e9f25ea QGuiApplication::exec()
#57 0x000000401488 main
#58 0x7fce3ca46ae7 __libc_start_main
#59 0x00000040123a _start
r8: 0000000000000000 r9: 00007ffed737e970 r10: 0000000000000008 r11: 0000000000000246
r12: 0000000000000005 r13: 0000000000000004 r14: 000000000049cef0 r15: 0000000000744838
di: 0000000000000002 si: 00007ffed737e970 bp: 00007ffed737ebd8 bx: 0000000000000006
dx: 0000000000000000 ax: 0000000000000000 cx: 00007fce3ca5b76b sp: 00007ffed737e970
ip: 00007fce3ca5b76b efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000
trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
Calling _exit(1). Core file will not be generated.
Some other related issues:
- The background of the composition text is black thus not readable
- Sometimes virtual keyboard pastes the part of the text into the field when leaving focus
Attachments
Issue Links
- is duplicated by
-
QTBUG-73211 Virtual Keyboard capitalization doesn't work with QtWebEngine
- Closed
- relates to
-
QTBUG-71995 Virtual keyboard's text prediction doesn't work with WebEngine
- Reported
-
QTBUG-70289 [REG 5.11 -> 5.12] QtVirtualKeyboard's composition background is black
- Closed
-
QTBUG-59999 Support free text selection and copy/paste by touch events
- Closed
For Gerrit Dashboard: QTBUG-70158 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
246203,3 | Fix input method update | 5.12 | qt/qtwebengine | Status: MERGED | -2 | 0 |
246387,4 | Disable text prediction for input | 5.12 | qt/qtwebengine | Status: MERGED | +2 | 0 |