Closed
Bug 830557
Opened 12 years ago
Closed 12 years ago
java.lang.NullPointerException at com.android.internal.view.IInputMethodManager$Stub$Proxy.startInput(IInputMethodManager.java:359) startup crash during test
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 21
People
(Reporter: gbrown, Assigned: jchen)
References
Details
Crash Data
Attachments
(1 file)
1.62 KB,
patch
|
gbrown
:
review+
|
Details | Diff | Splinter Review |
Bug 722166 has many test startup crashes reported against it. Most of those logs have no stacks reported, or stacks that only show system libs; other logs have Java exceptions which have not been noticed. Comment 1443 contains:
philor
https://tbpl.mozilla.org/php/getParsedLog.php?id=18718702&tree=Mozilla-Inbound
Android Tegra 250 mozilla-inbound opt test robocop on 2013-01-11 08:49:01
slave: tegra-313
and that log shows a Java exception:
01-11 08:58:44.838 E/GeckoAppShell( 2300): >>> REPORTING UNCAUGHT EXCEPTION FROM THREAD 1 ("main")
01-11 08:58:44.838 E/GeckoAppShell( 2300): java.lang.NullPointerException
01-11 08:58:44.838 E/GeckoAppShell( 2300): at com.android.internal.view.IInputMethodManager$Stub$Proxy.startInput(IInputMethodManager.java:359)
01-11 08:58:44.838 E/GeckoAppShell( 2300): at android.view.inputmethod.InputMethodManager.startInputInner(InputMethodManager.java:979)
01-11 08:58:44.838 E/GeckoAppShell( 2300): at android.view.inputmethod.InputMethodManager.checkFocus(InputMethodManager.java:1114)
01-11 08:58:44.838 E/GeckoAppShell( 2300): at android.view.inputmethod.InputMethodManager.onWindowFocus(InputMethodManager.java:1143)
01-11 08:58:44.838 E/GeckoAppShell( 2300): at android.view.ViewRoot.handleMessage(ViewRoot.java:1928)
01-11 08:58:44.838 E/GeckoAppShell( 2300): at android.os.Handler.dispatchMessage(Handler.java:99)
01-11 08:58:44.838 E/GeckoAppShell( 2300): at android.os.Looper.loop(Looper.java:123)
01-11 08:58:44.838 E/GeckoAppShell( 2300): at android.app.ActivityThread.main(ActivityThread.java:4627)
01-11 08:58:44.838 E/GeckoAppShell( 2300): at java.lang.reflect.Method.invokeNative(Native Method)
01-11 08:58:44.838 E/GeckoAppShell( 2300): at java.lang.reflect.Method.invoke(Method.java:521)
01-11 08:58:44.838 E/GeckoAppShell( 2300): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
01-11 08:58:44.838 E/GeckoAppShell( 2300): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
01-11 08:58:44.838 E/GeckoAppShell( 2300): at dalvik.system.NativeStart.main(Native Method)
Reporter | ||
Comment 1•12 years ago
|
||
Bug 722166, comments 1437 and 1444 (and perhaps others) show very similar exceptions.
Updated•12 years ago
|
Crash Signature: [@ java.lang.NullPointerException at java.lang.NullPointerExceptioncom.android.internal.view.IInputMethodManager$Stub$Proxy.startInput(IInputMethodManager.java)]
Reporter | ||
Comment 2•12 years ago
|
||
These also affect Talos: https://bugzilla.mozilla.org/show_bug.cgi?id=686245#c1297
Reporter | ||
Comment 3•12 years ago
|
||
These crashes continue to cause test failures. Recent example: https://bugzilla.mozilla.org/show_bug.cgi?id=722166#c1454
Assignee | ||
Comment 4•12 years ago
|
||
I believe this is an Android bug. According to [1], the line where the exception occurred is
> _result = com.android.internal.view.InputBindResult.CREATOR.createFromParcel(_reply);
and the only way to have a NullPointerException is if CREATOR is null, but CREATOR is a pre-initialized final field in InputBindResult. So I'm tempted to think it's a bug in Dalvik, unless we start seeing this on Android 4.0 tests.
[1] http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.2.2_r1/com/android/internal/view/IInputMethodManager.java#359
Reporter | ||
Comment 5•12 years ago
|
||
The tegras are FRF91, or 2.2_r1.1, I believe...not sure if that makes any difference.
Reporter | ||
Updated•12 years ago
|
Crash Signature: [@ java.lang.NullPointerException at java.lang.NullPointerExceptioncom.android.internal.view.IInputMethodManager$Stub$Proxy.startInput(IInputMethodManager.java)] → [@ java.lang.NullPointerException at com.android.internal.view.IInputMethodManager$Stub$Proxy.startInput(IInputMethodManager.java)]
Reporter | ||
Updated•12 years ago
|
Summary: java.lang.NullPointerException 01-11 08:5java.lang.NullPointerException at com.android.internal.view.IInputMethodManager$Stub$Proxy.startInput(IInputMethodManager.java:359) startup crash during test → java.lang.NullPointerException at com.android.internal.view.IInputMethodManager$Stub$Proxy.startInput(IInputMethodManager.java:359) startup crash during test
Reporter | ||
Comment 6•12 years ago
|
||
(In reply to Geoff Brown [:gbrown] from comment #5)
> The tegras are FRF91, or 2.2_r1.1, I believe...not sure if that makes any
> difference.
It doesn't.
Reporter | ||
Comment 7•12 years ago
|
||
The mobile platform team brainstormed approaches to resolving this bug. Ideas:
- look at IInputMethodManager history to see if this bug was fixed in a future (after 2.2) Android version
- use special handling in the uncaught exception handler to continue (likely not possible) or signal tbpl to treat this as an infra problem and automatically restart the failed test
- patch / upgrade tegras
Also, this independent report was found: http://www.anddev.org/sdk-adt-emulator-problems-f16/strange-error-t53366.html. See also bug 782096.
Assignee | ||
Comment 8•12 years ago
|
||
We weren't able to test this patch on try, so I think we should just land it now and back out later if it doesn't fix the problem.
The theory is the class com.android.internal.view.InputBindResult is not being loaded correctly due to a bug in Dalvik. This patch preloads the class manually on start-up to avoid whatever condition that causes the bug. The fix targets Froyo and below only, so it's very low risk, and it otherwise has virtually no impact on start-up perf, etc.
Attachment #709783 -
Flags: review?(gbrown)
Reporter | ||
Comment 9•12 years ago
|
||
Comment on attachment 709783 [details] [diff] [review]
Fix startup crash by preloading class (v1)
Review of attachment 709783 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks for looking at this. I really hope it works!
nit/suggestion: Remove the "using froyo startup fix" logging and change the other log statements to be more explicit, like "froyo startup fix failed".
Attachment #709783 -
Flags: review?(gbrown) → review+
Assignee | ||
Comment 10•12 years ago
|
||
Assignee: nobody → nchen
Status: NEW → ASSIGNED
Flags: in-testsuite-
Hardware: x86 → ARM
Reporter | ||
Comment 11•12 years ago
|
||
Most tbpl test logcats do not include app startup, but the ts results do:
02-04 12:41:24.750 I/GeckoApp( 4736): froyo startup fix: com.android.internal.view.InputBindResult$1@484fdde0
Looks good so far.
Comment 12•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 21
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•