Closed Bug 829912 Opened 7 years ago Closed 7 years ago

java.lang.NullPointerException: at org.mozilla.gecko.GeckoInputConnection.notifyIMEEnabled(GeckoInputConnection.java)

Categories

(Firefox for Android :: Keyboards and IME, defect, critical)

19 Branch
ARM
Android
defect
Not set
critical

Tracking

()

RESOLVED FIXED
Firefox 21
Tracking Status
firefox18 --- unaffected
firefox19 --- fixed
firefox20 --- fixed
firefox21 --- fixed

People

(Reporter: scoobidiver, Assigned: cpeterson)

References

Details

(Keywords: crash, regression, Whiteboard: [native-crash])

Crash Data

Attachments

(1 file, 1 obsolete file)

There are 14 crashes in 19.0 and 20.0, including bp-aaff2963-135c-4265-b080-d9b542130112. It first showed up in 19.0a2/20121204.

java.lang.NullPointerException
	at org.mozilla.gecko.GeckoInputConnection.notifyIMEEnabled(GeckoInputConnection.java:518)
	at org.mozilla.gecko.GeckoEditable$4.run(GeckoEditable.java:563)
	at android.os.Handler.handleCallback(Handler.java:725)
	at android.os.Handler.dispatchMessage(Handler.java:92)
	at android.os.Looper.loop(Looper.java:137)
	at android.app.ActivityThread.main(ActivityThread.java:5039)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:511)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
	at dalvik.system.NativeStart.main(Native Method)

More reports at:
https://crash-stats.mozilla.com/report/list?signature=java.lang.NullPointerException%3A+at+org.mozilla.gecko.GeckoInputConnection.notifyIMEEnabled%28GeckoInputConnection.java%29
notifyIMEEnabled() can have null typeHint, modeHint, or actionHint parameters. This patch moves the null check to "fix up" the parameters before the widget checks from bug 730330.
Assignee: nobody → cpeterson
Status: NEW → ASSIGNED
Attachment #702090 - Flags: review?(nchen)
I suspect this is a regression from date/time picker bug 730330.
Blocks: 730330
Comment on attachment 702090 [details] [diff] [review]
null-check-notifyIMEEnabled.patch

Seems nicer to me to check typeHint != null within the if statement, or do
> "date".equals(typeHint)
instead of
> typeHint.equals("date")

But this works.
Attachment #702090 - Flags: review?(nchen) → review+
I incorporated your feedback to just check for null typeHint. This change is a lot simpler now (and we no longer modify our input parameters). <:)
Attachment #702090 - Attachment is obsolete: true
Attachment #702449 - Flags: review?(nchen)
Comment on attachment 702449 [details] [diff] [review]
null-check-notifyIMEEnabled-v2.patch

Awesome! Thanks for formatting it too; looks a lot nicer.
Attachment #702449 - Flags: review?(nchen) → review+
Comment on attachment 702449 [details] [diff] [review]
null-check-notifyIMEEnabled-v2.patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): date/time picker bug 730330
User impact if declined: This bug is about #30 topcrash for Aurora 20 and Beta 19, with about 50 crashes over the past 3 days.
Testing completed (on m-c, etc.): Tested locally.
Risk to taking this patch (and alternatives if risky): Very low risk. This patch is a simple null pointer check.
String or UUID changes made by this patch: None
Attachment #702449 - Flags: approval-mozilla-beta?
Attachment #702449 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/5969ce554320
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Comment on attachment 702449 [details] [diff] [review]
null-check-notifyIMEEnabled-v2.patch

low risk null pointer check, approving for branches.
Attachment #702449 - Flags: approval-mozilla-beta?
Attachment #702449 - Flags: approval-mozilla-beta+
Attachment #702449 - Flags: approval-mozilla-aurora?
Attachment #702449 - Flags: approval-mozilla-aurora+
I accidentally tried to reland a rebased version of this change to mozilla-aurora. The changeset ff6e15559f1d looks like an empty diff to some files I did not edit. 

https://hg.mozilla.org/releases/mozilla-aurora/rev/ff6e15559f1d
You need to log in before you can comment on or make changes to this bug.