Closed Bug 1673681 Opened 11 months ago Closed 10 months ago

ANR typing in a textbox on a Huawei phone

Categories

(GeckoView :: General, defect)

Unspecified
Android
defect

Tracking

(firefox84+ fixed, firefox85+ fixed)

RESOLVED FIXED
85 Branch
Tracking Status
firefox84 + fixed
firefox85 + fixed

People

(Reporter: kbrosnan, Assigned: m_kato)

Details

(Whiteboard: [geckoview:m85] )

Attachments

(1 file)

From github: https://github.com/mozilla-mobile/fenix/issues/16172.

Steps to reproduce

No step. It happens sometimes.

Expected behavior

Actual behavior

Device information

  • Android device: ?
    HuaWei STF-AL00
  • Fenix version: ?
    82

Here is logcat:
fenix.log

Change performed by the Move to Bugzilla add-on.

kbrosnan

Does this stop happening if you switch keyboard apps?

10-26 10:40:19.865  1337  1357 V WindowManager: addWindow: Window{137584f u0 Application Not Responding: org.mozilla.firefox} 
10-26 10:40:20.258 27728 27728 E AndroidRuntime: FATAL EXCEPTION: main
10-26 10:40:20.258 27728 27728 E AndroidRuntime: Process: org.mozilla.firefox, PID: 27728
10-26 10:40:20.258 27728 27728 E AndroidRuntime: java.lang.StackOverflowError: stack size 8MB
10-26 10:40:20.258 27728 27728 E AndroidRuntime: 	at java.util.concurrent.atomic.AtomicInteger.decrementAndGet(AtomicInteger.java:196)
10-26 10:40:20.258 27728 27728 E AndroidRuntime: 	at org.mozilla.geckoview.GeckoEditable$7.run(GeckoEditable.java:1)
10-26 10:40:20.258 27728 27728 E AndroidRuntime: 	at org.mozilla.gecko.util.ThreadUtils.runOnUiThread(ThreadUtils.java:2)
10-26 10:40:20.258 27728 27728 E AndroidRuntime: 	at org.mozilla.geckoview.GeckoEditable.toggleSoftInput(GeckoEditable.java:2)
10-26 10:40:20.258 27728 27728 E AndroidRuntime: 	at org.mozilla.geckoview.GeckoEditable.onCreateInputConnection(GeckoEditable.java:12)
10-26 10:40:20.258 27728 27728 E AndroidRuntime: 	at org.mozilla.geckoview.SessionTextInput.onCreateInputConnection(SessionTextInput.java:1)
10-26 10:40:20.258 27728 27728 E AndroidRuntime: 	at org.mozilla.geckoview.GeckoView.onCreateInputConnection(GeckoView.java:2)
10-26 10:40:20.258 27728 27728 E AndroidRuntime: 	at huawei.android.view.inputmethod.HwSecImmHelper.isPasswordInputType(HwSecImmHelper.java:142)
10-26 10:40:20.258 27728 27728 E AndroidRuntime: 	at huawei.android.view.inputmethod.HwSecImmHelper.hideSoftInputFromWindow(HwSecImmHelper.java:65)
10-26 10:40:20.258 27728 27728 E AndroidRuntime: 	at android.view.inputmethod.InputMethodManager.hideSoftInputFromWindow(InputMethodManager.java:1216)
10-26 10:40:20.258 27728 27728 E AndroidRuntime: 	at android.view.inputmethod.InputMethodManager.hideSoftInputFromWindow(InputMethodManager.java:1178)
10-26 10:40:20.258 27728 27728 E AndroidRuntime: 	at org.mozilla.geckoview.SessionTextInput$DefaultDelegate.hideSoftInput(SessionTextInput.java:4)
10-26 10:40:20.258 27728 27728 E AndroidRuntime: 	at org.mozilla.geckoview.GeckoEditable$7.run(GeckoEditable.java:9)
10-26 10:40:20.258 27728 27728 E AndroidRuntime: 	at org.mozilla.gecko.util.ThreadUtils.runOnUiThread(ThreadUtils.java:2)
10-26 10:40:20.258 27728 27728 E AndroidRuntime: 	at org.mozilla.geckoview.GeckoEditable.toggleSoftInput(GeckoEditable.java:2)
10-26 10:40:20.258 27728 27728 E AndroidRuntime: 	at org.mozilla.geckoview.GeckoEditable.onCreateInputConnection(GeckoEditable.java:12)
10-26 10:40:20.258 27728 27728 E AndroidRuntime: 	at org.mozilla.geckoview.SessionTextInput.onCreateInputConnection(SessionTextInput.java:1)
10-26 10:40:20.258 27728 27728 E AndroidRuntime: 	at org.mozilla.geckoview.GeckoView.onCreateInputConnection(GeckoView.java:2)
10-26 10:40:20.258 27728 27728 E AndroidRuntime: 	at huawei.android.view.inputmethod.HwSecImmHelper.isPasswordInputType(HwSecImmHelper.java:142)
10-26 10:40:20.258 27728 27728 E AndroidRuntime: 	at huawei.android.view.inputmethod.HwSecImmHelper.hideSoftInputFromWindow(HwSecImmHelper.java:65)
10-26 10:40:20.258 27728 27728 E AndroidRuntime: 	at android.view.inputmethod.InputMethodManager.hideSoftInputFromWindow(InputMethodManager.java:1216)
10-26 10:40:20.258 27728 27728 E AndroidRuntime: 	at android.view.inputmethod.InputMethodManager.hideSoftInputFromWindow(InputMethodManager.java:1178)
10-26 10:40:20.258 27728 27728 E AndroidRuntime: 	at org.mozilla.geckoview.SessionTextInput$DefaultDelegate.hideSoftInput(SessionTextInput.java:4)
10-26 10:40:20.258 27728 27728 E AndroidRuntime: 	at org.mozilla.geckoview.GeckoEditable$7.run(GeckoEditable.java:9)
REPEAT TO FILL 50000+ LINES OF LOG

makotokato

This seems to be huawei only issue.

@zoumi
What software keyboard do you use?

zoumi

@makotokato Thanks, I will try another input APP.
If you want to dig out the bug, you can test with this http://www.ucbug.com/shouji/44155.html (my version is 8.2.6.244).

The step to reproduce:

  1. Open bing.com
  2. Input something in the search box
  3. Click the button to start searching --->fenix hangs
Summary: [Bug]App hangs and exit without any tip. → ANR typing in a textbox on a Huawei phone
Assignee: nobody → m_kato
Whiteboard: [geckoview:m85]

Originally, this issue was bug 1283739. But I guess that this might be
regression by bug 1464096.

Actually, reentrant code seems to be broken now, so I make it simple.

Pushed by m_kato@ga2.so-net.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/f2903ccdb6ed
Software keyboard show/dimiss shouldn't be reentrant. r=geckoview-reviewers,agi
Status: NEW → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch

Hi we Beijing office have found that this bug has caused a lot of crashes since we release fenix of 84 in China.
Maybe you can see the DAU drop down in this query: https://sql.telemetry.mozilla.org/queries/77088#192035
Temporarily we use a local building GeckoView with this fix as a work around, but we really hope uplift this fix to 84 branch.

Flags: needinfo?(m_kato)
Flags: needinfo?(aryx.bugmail)

Comment on attachment 9188230 [details]
Bug 1673681 - Software keyboard show/dimiss shouldn't be reentrant.

Beta/Release Uplift Approval Request

  • User impact if declined: This is requested from Beijing/China office.

When taking/losting focus to/from password field on Huawei device, Fenix will be no response forever.

  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This situation is on Huawei device only and this fixes reentrant guard correctly.
  • String changes made/needed: none
Flags: needinfo?(m_kato)
Attachment #9188230 - Flags: approval-mozilla-release?
Flags: needinfo?(m_kato)

Comment on attachment 9188230 [details]
Bug 1673681 - Software keyboard show/dimiss shouldn't be reentrant.

Unfortunate that we didn't have this on the radar in time for the 84.1.3 release, but this sounds bad enough to warrant getting to users as soon as we can. Approved for Fenix 84.1.4.

Flags: needinfo?(m_kato)
Flags: needinfo?(aryx.bugmail)
Attachment #9188230 - Flags: approval-mozilla-release? → approval-mozilla-release+

(In reply to Stefan Arentz | :st3fan | ⏰ EST | he/him from comment #9)

Could this bug be related to https://github.com/mozilla-mobile/fenix/issues/12982 ?

I don't know. Original bug and this bug are on Huawei device and this is dead lock issue.

You need to log in before you can comment on or make changes to this bug.