Closed Bug 780239 Opened 13 years ago Closed 13 years ago

Android's InputMethodManager calls GeckoInputConnection.finishComposingText() on the wrong thread when dismissing "Add Search Engine" dialog

Categories

(Firefox for Android Graveyard :: General, defect, P4)

ARM
Android
defect

Tracking

(firefox17 wontfix, firefox18 fixed)

RESOLVED FIXED
Firefox 18
Tracking Status
firefox17 --- wontfix
firefox18 --- fixed

People

(Reporter: cpeterson, Assigned: cpeterson)

References

Details

STR: 1. Compile a local build with GeckoInputConnection.DEBUG = true; 2. Load a page with a text form 3. Long-press the text form and select "Add Search Engine" from the popup menu 4. Dismiss the "Add Search Engine" dialog 5. Watch logcat AR: Big warning about android.view.inputmethod.InputMethodManager.checkFocus() calling GeckoInputConnection.finishComposingText() on Gecko's background thread, not the UI thread! This is a corner cause because Android calls finishComposingText() from the UI thread when actually editing text. E/GeckoAppShell(10895): >>> REPORTING UNCAUGHT EXCEPTION FROM THREAD 10 ("GeckoBackgroundThread") E/GeckoAppShell(10895): java.lang.IllegalThreadStateException: Expected thread 1 ("main"), but running on thread 10 ("GeckoBackgroundThread) E/GeckoAppShell(10895): at org.mozilla.gecko.GeckoApp.assertOnThread(GeckoApp.java:2995) E/GeckoAppShell(10895): at org.mozilla.gecko.GeckoApp.assertOnUiThread(GeckoApp.java:2982) E/GeckoAppShell(10895): at org.mozilla.gecko.GeckoInputConnection$DebugGeckoInputConnection.finishComposingText(GeckoInputConnection.java:1315) E/GeckoAppShell(10895): at android.view.inputmethod.InputMethodManager.checkFocus(InputMethodManager.java:1183) E/GeckoAppShell(10895): at android.view.inputmethod.InputMethodManager.onWindowFocus(InputMethodManager.java:1215) E/GeckoAppShell(10895): at android.view.ViewRoot.handleMessage(ViewRoot.java:2115) E/GeckoAppShell(10895): at android.os.Handler.dispatchMessage(Handler.java:99) E/GeckoAppShell(10895): at android.os.Looper.loop(Looper.java:130) E/GeckoAppShell(10895): at org.mozilla.gecko.GeckoBackgroundThread.run(GeckoBackgroundThread.java:31)
Depends on: 730330
Status: NEW → ASSIGNED
Target Milestone: --- → Firefox 18
Fix landed as per bug 730330 comment 62
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.