Last Comment Bug 777505 - java.lang.NullPointerException: at org.mozilla.gecko.GeckoInputConnection.getInputMethodManager(
: java.lang.NullPointerException: at org.mozilla.gecko.GeckoInputConnection.get...
: crash
Product: Firefox for Android
Classification: Client Software
Component: Keyboards and IME (show other bugs)
: Trunk
: All Linux
-- critical (vote)
: Firefox 17
Assigned To: Kartikaya Gupta (
: Jim Chen [:jchen] [:darchons]
Depends on:
Blocks: 769269 774205
  Show dependency treegraph
Reported: 2012-07-25 14:17 PDT by Scoobidiver (away)
Modified: 2012-09-06 07:11 PDT (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch (1.14 KB, patch)
2012-07-26 07:40 PDT, Kartikaya Gupta (
cpeterson: review+
akeybl: approval‑mozilla‑aurora+
akeybl: approval‑mozilla‑beta+
Details | Diff | Splinter Review

Description User image Scoobidiver (away) 2012-07-25 14:17:50 PDT
There's one crash in 17.0a1/20120725: bp-15c2b18d-00c9-4290-bdcf-c5a5a2120725.

	at org.mozilla.gecko.GeckoInputConnection.getInputMethodManager(
	at org.mozilla.gecko.GeckoInputConnection.access$100(
	at org.mozilla.gecko.GeckoInputConnection$
	at android.os.Handler.handleCallback(
	at android.os.Handler.dispatchMessage(
	at android.os.Looper.loop(
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(
	at dalvik.system.NativeStart.main(Native Method)

More reports at:
Comment 1 User image Kartikaya Gupta ( 2012-07-26 07:40:58 PDT
Created attachment 646137 [details] [diff] [review]

Missed this in my last patch, apparently getInputMethodManager can be called in a runnable as well.
Comment 2 User image Chris Peterson [:cpeterson] 2012-07-26 10:39:50 PDT
Comment on attachment 646137 [details] [diff] [review]

Do you know which Runnable is calling getInputMethodManager() here? Can it handle a null return? Not all of GeckoInputConnection's calls to getInputMethodManager() handle null returns (which is appropriate for code paths that can only run when we have a View and Context).
Comment 3 User image Kartikaya Gupta ( 2012-07-26 10:53:19 PDT
In this case it's the runnable in notifyIMEChange, according to the stack trace. I looked through all of the calls to getInputMethodManager and all of the ones in runnables seem to handle null returns.
Comment 4 User image Kartikaya Gupta ( 2012-07-26 10:55:26 PDT
Comment 6 User image Kartikaya Gupta ( 2012-07-27 09:43:05 PDT
Comment on attachment 646137 [details] [diff] [review]

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 774205 (this patch is a follow-up to the patch on that bug, also currently pending aurora approval)
User impact if declined: possible crash
Testing completed (on m-c, etc.): on m-c
Risk to taking this patch (and alternatives if risky): mobile only, low risk
String or UUID changes made by this patch: none
Comment 8 User image Cristian Nicolae (:xti) 2012-09-06 07:11:10 PDT
Last crash date is 2012-07-25 and there are no crash reports since then. It seems that this issue was fixed on all branches. Closing bug as verified fixed.

Device: Galaxy Note
OS: Android 4.0.4

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