Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.2
-
None
-
Build with Qt5.15.2 and Android SDK 31
Run on Android 8.1.0
The IMEs are com.tencent.qqpinyin and com.sohu.inputmethod.sogou.xiaomi
Description
Hi there.
This issue happens if the cursor reaches the the bottom of the QPlainTextEdit. If the current line have N spaces left(see testcase1_1.jpg and testcase2_1.jpg), and I input N+1 or more characters in the IME(see testcase1_2.jpg and testcase2_2.jpg), the application will crash when I confirm the input.
This issue doesn't happen if I paste a piece of text with N+1 characters in it.
The traceback file shows that something might be wrong in QTextLine::naturalTextRect()
I've tested it on two different IMEs and got the same result.
Steps to reproduce:
- build an application on Android with a QPlainTextEdit in it, then run it.
- Keep typing something in the QPlainTextEdit until the cursor reaches the bottom.
- Type something and keep N spaces in the current line.
- Type N+1 characters in the IME
- confirm the input in the IME, then the application crashes.
I've created a minimal project with .pro.user file in it to reproduce this issue(see qtbug.zip). I hope it helps.