Last Comment Bug 706984 - NullPointerException @ getProfileDir(GeckoApp.java:705) on startup (thrown but caught)
: NullPointerException @ getProfileDir(GeckoApp.java:705) on startup (thrown bu...
Status: RESOLVED FIXED
:
Product: Firefox for Android
Classification: Client Software
Component: General (show other bugs)
: unspecified
: ARM Android
: P3 normal (vote)
: ---
Assigned To: Chris Peterson [:cpeterson]
:
Mentors:
: 707519 709520 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-01 14:28 PST by Chris Peterson [:cpeterson]
Modified: 2012-01-09 11:17 PST (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed
11+


Attachments
check-profile-directory.patch (1.16 KB, patch)
2011-12-09 16:39 PST, Chris Peterson [:cpeterson]
dougt: review+
Details | Diff | Review

Description Chris Peterson [:cpeterson] 2011-12-01 14:28:56 PST
Fennec throws the following NullPointerException on startup because 

12-01 13:09:40.415: I/GeckoAddons(6017): error reading json file
12-01 13:09:40.415: I/GeckoAddons(6017): java.lang.NullPointerException
12-01 13:09:40.415: I/GeckoAddons(6017): 	at org.mozilla.gecko.GeckoApp.getProfileDir(GeckoApp.java:705)
12-01 13:09:40.415: I/GeckoAddons(6017): 	at org.mozilla.gecko.AboutHomeContent.getProfileRecommendedAddonsStream(AboutHomeContent.java:157)
12-01 13:09:40.415: I/GeckoAddons(6017): 	at org.mozilla.gecko.AboutHomeContent.getRecommendedAddonsStream(AboutHomeContent.java:171)
12-01 13:09:40.415: I/GeckoAddons(6017): 	at org.mozilla.gecko.AboutHomeContent$4.run(AboutHomeContent.java:185)
12-01 13:09:40.415: I/GeckoAddons(6017): 	at android.os.Handler.handleCallback(Handler.java:587)
12-01 13:09:40.415: I/GeckoAddons(6017): 	at android.os.Handler.dispatchMessage(Handler.java:92)
12-01 13:09:40.415: I/GeckoAddons(6017): 	at android.os.Looper.loop(Looper.java:130)
12-01 13:09:40.415: I/GeckoAddons(6017): 	at org.mozilla.gecko.GeckoAppShell$LooperThread.run(GeckoAppShell.java:153)

This code was added by changeset:

changeset:   81469:66f5729d323c
user:        Brad Lassey <blassey@mozilla.com>
date:        Wed Nov 30 21:28:05 2011 -0500
files:       mobile/android/base/GeckoApp.java mobile/android/base/GeckoAppShell.java
description:
bug 706393 - Add API to GeckoApp to get profile dir r=mfinkle
Comment 1 Chris Peterson [:cpeterson] 2011-12-01 14:40:46 PST
Note that the NullPointerException is caught and does not crash the app.
Comment 2 Aaron Train [:aaronmt] 2011-12-01 17:57:02 PST
Woops disregard above
Comment 3 Aaron Train [:aaronmt] 2011-12-05 09:39:34 PST
*** Bug 707519 has been marked as a duplicate of this bug. ***
Comment 4 Chris Peterson [:cpeterson] 2011-12-09 16:39:10 PST
Created attachment 580585 [details] [diff] [review]
check-profile-directory.patch

Check whether the profile directory exists before enumerating its contents. The profile directory may have been deleted or not created yet.
Comment 5 Mark Finkle (:mfinkle) (use needinfo?) 2011-12-10 14:37:20 PST
*** Bug 709520 has been marked as a duplicate of this bug. ***
Comment 6 Mark Finkle (:mfinkle) (use needinfo?) 2011-12-11 18:02:04 PST
https://hg.mozilla.org/mozilla-central/rev/71dfb2adaf0f

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