Closed Bug 878416 Opened 9 years ago Closed 9 years ago

java.lang.NullPointerException: at org.mozilla.gecko.CameraImageResultHandler.onActivityResult(CameraImageResultHandler.java)

Categories

(Firefox for Android Graveyard :: General, defect)

24 Branch
ARM
Android
defect
Not set
critical

Tracking

(firefox23 unaffected, firefox24+ fixed, firefox25 fixed, firefox26 fixed, fennec24+)

RESOLVED FIXED
Firefox 26
Tracking Status
firefox23 --- unaffected
firefox24 + fixed
firefox25 --- fixed
firefox26 --- fixed
fennec 24+ ---

People

(Reporter: scoobidiver, Assigned: wesj)

Details

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

Crash Data

Attachments

(1 file)

There's one crash in 24.0a1/20130531: bp-59a34f28-1299-483b-b288-b573e2130531.

It might be related to bug 878415.

java.lang.NullPointerException
	at org.mozilla.gecko.CameraImageResultHandler.onActivityResult(CameraImageResultHandler.java:38)
	at org.mozilla.gecko.ActivityHandlerHelper.handleActivityResult(ActivityHandlerHelper.java:340)
	at org.mozilla.gecko.GeckoApp.onActivityResult(GeckoApp.java:2128)
	at org.mozilla.gecko.BrowserApp.onActivityResult(BrowserApp.java:843)
	at android.app.Activity.dispatchActivityResult(Activity.java:5293)
	at android.app.ActivityThread.deliverResults(ActivityThread.java:3315)
	at android.app.ActivityThread.handleSendResult(ActivityThread.java:3362)
	at android.app.ActivityThread.access$1100(ActivityThread.java:141)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1282)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:137)
	at android.app.ActivityThread.main(ActivityThread.java:5041)
	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.CameraImageResultHandler.onActivityResult%28CameraImageResultHandler.java%29
Hit by two users so a regression. The regression range is:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=f66d956d188e&tochange=3c6f2394995d
Keywords: regression
Version: Trunk → Firefox 24
It's #4 crasher in 24.0a2 and #26 in 25.0a1.
tracking-fennec: --- → ?
Keywords: topcrash
Assignee: nobody → wjohnston
tracking-fennec: ? → 24+
Attached patch resultSplinter Review
I've had you review this before. We expect this will be null sometimes. Just forgot the check.

Callers can instantiate us with either a queue (which they then poll until we return a result), or with this callback interface.
Attachment #779252 - Flags: review?(liuche)
Comment on attachment 779252 [details] [diff] [review]
result

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

::: mobile/android/base/CameraImageResultHandler.java
@@ +43,5 @@
>  
>          File file = new File(Environment.getExternalStorageDirectory(), sImageName);
>          sImageName = "";
>  
> +        if (mFilePickerResult != null) {

What's the Fennec style for single-line ifs? I've seen it mostly no brackets in a lot of places (although I personally do prefer the brackets).
Attachment #779252 - Flags: review?(liuche) → review+
is this ready for checkin?
Still #4 top crasher in 24.0a2 soon 24.0b1.
Patch in limbo. Is this the right fix?
Flags: needinfo?(wjohnston)
Just needs to land (everywhere now...):
https://hg.mozilla.org/integration/fx-team/rev/74d364de5fbb

I'll ping for Aurora and Beta (24b) approval.
Flags: needinfo?(wjohnston)
Comment on attachment 779252 [details] [diff] [review]
result

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 874689
User impact if declined: Crashes
Testing completed (on m-c, etc.): Landed in fx-team right now
Risk to taking this patch (and alternatives if risky): Very low risk. Just a bunch of null checks before using an object. Backout of the regressing patch is likely to cause more problems than this.
String or IDL/UUID changes made by this patch: None
Attachment #779252 - Flags: approval-mozilla-beta?
Attachment #779252 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/74d364de5fbb
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
Comment on attachment 779252 [details] [diff] [review]
result

low risk patch which helps fix a top-crasher.Approving for aurora and beta.
Attachment #779252 - Flags: approval-mozilla-beta?
Attachment #779252 - Flags: approval-mozilla-beta+
Attachment #779252 - Flags: approval-mozilla-aurora?
Attachment #779252 - Flags: approval-mozilla-aurora+
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.