Closed Bug 773943 Opened 13 years ago Closed 13 years ago

java.lang.NullPointerException: at org.mozilla.gecko.GeckoApp.getTempDirectory(GeckoApp.java)

Categories

(Firefox for Android Graveyard :: General, defect)

16 Branch
ARM
Android
defect
Not set
critical

Tracking

(firefox16 fixed)

RESOLVED FIXED
Firefox 17
Tracking Status
firefox16 --- fixed

People

(Reporter: scoobidiver, Assigned: rkd)

References

Details

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

Crash Data

Attachments

(1 file)

There's one crash in 16.0a1/20120712: bp-5350a1f7-14f1-418b-9bdf-7c17c2120713. java.lang.NullPointerException at org.mozilla.gecko.GeckoApp.getTempDirectory(GeckoApp.java:2314) at org.mozilla.gecko.GeckoApp.deleteTempFiles(GeckoApp.java:2320) at org.mozilla.gecko.GeckoApp.onDestroy(GeckoApp.java:2292) at org.mozilla.gecko.BrowserApp.onDestroy(BrowserApp.java:215) at android.app.Activity.performDestroy(Activity.java:4629) at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1082) at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3111) at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3142) at android.app.ActivityThread.access$1200(ActivityThread.java:127) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1192) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4507) 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:790) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557) 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.GeckoApp.getTempDirectory%28GeckoApp.java%29
Looks like this was introduced by bug 769438 and bug 772651: getExternalFilesDir can return null.
Assignee: nobody → blyakher.a
Bug 772888 is also related (caused by getExternalFilesDir returning null) but the patch on there won't fix this, I think, because it's a different call.
According to the Android ref, getExternalFilesDir returns null if external storage is not currently mounted so it could not ensure the path exists; you will need to call this method again when it is available. This patch checks for nulls and responds appropriately, but it might be better to either retry accessing this directory upon failure (at least once) or to use a different storage directory altogether.
Attachment #642697 - Flags: review?(snorp)
Attachment #642697 - Flags: feedback?(blassey.bugs)
Attachment #642697 - Flags: review?(snorp) → review+
Attachment #642697 - Flags: feedback?(blassey.bugs) → feedback+
Comment on attachment 642697 [details] [diff] [review] fix null pointer exception from accessing getExternalFilesDir Bug caused by (feature/regressing bug #): 769438 and 772651 User impact if declined: Fixed a null-pointer exception that can cause a crash for image sharing Testing completed (on m-c, etc.): m-c (https://tbpl.mozilla.org/?tree=Try&rev=3a2e534d5539) Risk to taking this patch (and alternatives if risky): Risk is minimal String or UUID changes made by this patch: None
Attachment #642697 - Flags: checkin?(blassey.bugs)
Attachment #642697 - Flags: approval-mozilla-aurora?
Blocks: 769438, 772651
Keywords: regression
Version: Trunk → Firefox 16
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 17
Attachment #642697 - Flags: checkin?(blassey.bugs)
Comment on attachment 642697 [details] [diff] [review] fix null pointer exception from accessing getExternalFilesDir [Triage Comment] Minimal risk, fixes a low-volume crash regression in 16, and can be backed out if this causes any worse regressions. Approved for Aurora 16.
Attachment #642697 - Flags: approval-mozilla-aurora? → 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.

Attachment

General

Created:
Updated:
Size: