Closed Bug 633406 Opened 13 years ago Closed 13 years ago

Crash on startup after update

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(fennec2.0b5+)

VERIFIED FIXED
Tracking Status
fennec 2.0b5+ ---

People

(Reporter: wesj, Assigned: wesj)

Details

Attachments

(2 files, 1 obsolete file)

After updating, Fennec crashes on startup. I added some extra logging to dig deeper into the problem, but the new build doesn't crash.

Logcat:

FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.mozilla.fennec/org.mozilla.fennec.App}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
at android.app.ActivityThread.access$2300(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at org.mozilla.gecko.GeckoAppShell.getFreeSpace(GeckoAppShell.java:114)
at org.mozilla.gecko.GeckoApp.onCreate(GeckoApp.java:215)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
... 11 more
I have been crashing after an add-in install restart today. Might be related
Attached file Logcat
Whoops, left out a few lines in the above dump. Looks like we fail to create the cache directory?

We should be able to move on if we catch the error, and we can also check to make sure that getCacheDir returns something non-null. Patch coming...
Attachment #511589 - Flags: review?(blassey.bugs)
Attachment #511589 - Flags: review?(blassey.bugs)
Attached patch Patch v1 (obsolete) — Splinter Review
Assignee: nobody → wjohnston
Status: NEW → ASSIGNED
Attachment #511591 - Flags: review?(blassey.bugs)
Comment on attachment 511591 [details] [diff] [review]
Patch v1


>+            if (sFreeSpace == -1) {
>+                File cacheDir = getCacheDir();
>+                if (cacheDir != null) {
>+                    StatFs cacheStats = new StatFs(cacheDir.getPath());
>+                    sFreeSpace = cacheStats.getFreeBlocks() * 
>+                        cacheStats.getBlockSize();
>+                }
please print to the log if hte cacheDir is null, this really shouldn't happen, I'd like to know why that happens.
>+            }
>+        } catch (Exception e) {
>+            Log.e("GeckoAppShell", "exception while moving file: ", e);
copy and paste, huh? How about "exception when stat'ing cache dir"
Attachment #511591 - Flags: review?(blassey.bugs) → review+
Whoops. Sorry. Actually pressed undo too many times I think.

Patch for checkin. Does this have/need approval to land?
Attachment #511591 - Attachment is obsolete: true
Attachment #511885 - Flags: review+
tracking-fennec: --- → 2.0b5+
pushed:
http://hg.mozilla.org/mozilla-central/rev/edf89132ec20
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
VERIFIED FIXED on:

Build ID: Mozilla /5.0 (Android;Linux armv7l;rv:6.0a1) Gecko/20110524 Firefox/6.0a1 Fennec/6.0a1 

Device: HTC Desire Z (Android 2.2)
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: