Last Comment Bug 782096 - java.lang.NullPointerException: at android.os.Parcel.readException(Parcel.java) on Galaxy Tab 7.7" (GT-P6800) with Honeycomb
: java.lang.NullPointerException: at android.os.Parcel.readException(Parcel.jav...
Status: RESOLVED FIXED
[native-crash][startupcrash]
: crash
Product: Firefox for Android
Classification: Client Software
Component: Keyboards and IME (show other bugs)
: 15 Branch
: ARM Android
: -- critical (vote)
: Firefox 18
Assigned To: Chris Peterson [:cpeterson]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-12 00:27 PDT by Scoobidiver (away)
Modified: 2013-01-03 10:18 PST (History)
5 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
wontfix
fixed
fixed
fixed
-


Attachments
catch-NPE.patch (2.27 KB, patch)
2012-08-30 11:33 PDT, Chris Peterson [:cpeterson]
snorp: review+
lukasblakk+bugs: approval‑mozilla‑aurora+
lukasblakk+bugs: approval‑mozilla‑beta+
Details | Diff | Review

Description Scoobidiver (away) 2012-08-12 00:27:58 PDT
There are 65 crashes in 15.0 Beta, including bp-c2304ebc-8734-4ed8-8c28-6f76f2120811.

java.lang.NullPointerException
	at android.os.Parcel.readException(Parcel.java:1327)
	at android.os.Parcel.readException(Parcel.java:1275)
	at com.android.internal.view.IInputMethodManager$Stub$Proxy.hideSoftInput(IInputMethodManager.java:606)
	at android.view.inputmethod.InputMethodManager.hideSoftInputFromWindow(InputMethodManager.java:857)
	at android.view.inputmethod.InputMethodManager.hideSoftInputFromWindow(InputMethodManager.java:829)
	at org.mozilla.gecko.AwesomeBar$6.onFocusChange(AwesomeBar.java:241)
	at android.view.View.onFocusChanged(View.java:3419)
	at android.widget.TextView.onFocusChanged(TextView.java:7614)
	at android.widget.EditText.onFocusChanged(EditText.java:136)
	at android.view.View.unFocus(View.java:3347)
	at android.view.ViewGroup.unFocus(ViewGroup.java:630)
	at android.view.ViewGroup.requestChildFocus(ViewGroup.java:512)
	at android.view.ViewGroup.requestChildFocus(ViewGroup.java:518)
	at android.view.ViewGroup.requestChildFocus(ViewGroup.java:518)
	at android.view.ViewGroup.requestChildFocus(ViewGroup.java:518)
	at android.view.ViewGroup.requestChildFocus(ViewGroup.java:518)
	at android.view.View.handleFocusGainInternal(View.java:3239)
	at android.view.View.requestFocus(View.java:4460)
	at android.view.View.requestFocus(View.java:4410)
	at android.view.View.requestFocus(View.java:4388)
	at android.widget.TabHost.onTouchModeChanged(TabHost.java:204)
	at android.view.ViewTreeObserver.dispatchOnTouchModeChanged(ViewTreeObserver.java:606)
	at android.view.ViewRoot.ensureTouchModeLocally(ViewRoot.java:2331)
	at android.view.ViewRoot.ensureTouchMode(ViewRoot.java:2315)
	at android.view.View.requestFocusFromTouch(View.java:4485)
	at org.mozilla.gecko.AwesomeBar.onKeyDown(AwesomeBar.java:471)
	at android.view.KeyEvent.dispatch(KeyEvent.java:2540)
	at android.app.Activity.dispatchKeyEvent(Activity.java:2280)
	at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:1819)
	at android.view.ViewRoot.deliverKeyEventPostIme(ViewRoot.java:2963)
	at android.view.ViewRoot.handleMessage(ViewRoot.java:2234)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:132)
	at android.app.ActivityThread.main(ActivityThread.java:4123)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:491)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
	at dalvik.system.NativeStart.main(Native Method)

More reports at:
https://crash-stats.mozilla.com/report/list?signature=java.lang.NullPointerException%3A+at+android.os.Parcel.readException%28Parcel.java%29
Comment 1 Chris Peterson [:cpeterson] 2012-08-29 16:38:40 PDT
Curiously, these hideSoftInputFromWindow() crashes are all Galaxy Tab users running Android 3.2 (Honeycomb). 

The NPE is [re]thrown by Parcel.readException(), which means the original NPE was thrown from InputMethodManagerService's hideSoftInput(). I wonder if there was a bug in Honeycomb's InputMethodManagerService that was fixed in ICS? Our client should not be able to trigger NPEs in the service!
Comment 2 Chris Peterson [:cpeterson] 2012-08-30 11:33:51 PDT
Created attachment 656966 [details] [diff] [review]
catch-NPE.patch

Catch unexpected NullPointerException from InputMethodManagerService.
Comment 3 Chris Peterson [:cpeterson] 2012-09-04 14:25:50 PDT
(In reply to Chris Peterson (:cpeterson) from comment #2)
> Created attachment 656966 [details] [diff] [review]
> catch-NPE.patch
> 
> Catch unexpected NullPointerException from InputMethodManagerService.

snorp, have you had a chance to review my fix for this InputMethodManagerService NullPointerException we discussed in last week's Bug Deep Dive meeting?
Comment 4 James Willcox (:snorp) (jwillcox@mozilla.com) 2012-09-05 09:57:08 PDT
Comment on attachment 656966 [details] [diff] [review]
catch-NPE.patch

Review of attachment 656966 [details] [diff] [review]:
-----------------------------------------------------------------

Gross, but looks good.
Comment 5 Chris Peterson [:cpeterson] 2012-09-05 16:06:25 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/41cf3c361d9d
Comment 6 Ryan VanderMeulen [:RyanVM] 2012-09-05 19:36:10 PDT
https://hg.mozilla.org/mozilla-central/rev/41cf3c361d9d
Comment 7 Chris Peterson [:cpeterson] 2012-09-06 16:06:33 PDT
Comment on attachment 656966 [details] [diff] [review]
catch-NPE.patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): N/A
User impact if declined: Intermittent crashes for some Honeycomb tablet users. I suspect this is a bug in Honeycomb that was fixed in ICS+.
Testing completed (on m-c, etc.): Tested locally, BUT this is an intermittent bug I have not repro'd myself.
Risk to taking this patch (and alternatives if risky): Low risk. The code change simply catches a NullPointerException from Google code instead of crashing.
String or UUID changes made by this patch: N/A
Comment 8 Lukas Blakk [:lsblakk] use ?needinfo 2012-09-07 15:05:38 PDT
Comment on attachment 656966 [details] [diff] [review]
catch-NPE.patch

mobile-only, low risk, still early in beta - we can take this to branches.
Comment 9 Chris Peterson [:cpeterson] 2012-09-07 15:27:00 PDT
https://hg.mozilla.org/releases/mozilla-aurora/rev/61502f07b33c
Comment 10 Chris Peterson [:cpeterson] 2012-09-07 15:27:25 PDT
https://hg.mozilla.org/releases/mozilla-beta/rev/e34089cb1120
Comment 11 Kevin Brosnan [:kbrosnan] 2013-01-02 11:48:06 PST
This is still crashing at about the same rate as mentioned in comment 0.
Comment 12 Mark Finkle (:mfinkle) (use needinfo?) 2013-01-03 10:18:14 PST
Let's open a new bug for this. The patch was landed and pushed all the way to beta.

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