Closed Bug 731372 Opened 12 years ago Closed 12 years ago

java.lang.NullPointerException: at org.mozilla.gecko.GeckoApp$SessionSnapshotRunnable.run(GeckoApp.java:598)

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
critical

Tracking

(blocking-fennec1.0 +)

RESOLVED FIXED
Firefox 13
Tracking Status
blocking-fennec1.0 --- +

People

(Reporter: bnicholson, Assigned: bnicholson)

Details

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

Crash Data

Attachments

(1 file, 1 obsolete file)

02-28 11:49:28.224 29910 29919 E AndroidRuntime: FATAL EXCEPTION: GeckoBackgroundThread
02-28 11:49:28.224 29910 29919 E AndroidRuntime: java.lang.NullPointerException
02-28 11:49:28.224 29910 29919 E AndroidRuntime: 	at org.mozilla.gecko.GeckoApp$SessionSnapshotRunnable.run(GeckoApp.java:598)
02-28 11:49:28.224 29910 29919 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:587)
02-28 11:49:28.224 29910 29919 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:92)
02-28 11:49:28.224 29910 29919 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:130)
02-28 11:49:28.224 29910 29919 E AndroidRuntime: 	at org.mozilla.gecko.GeckoBackgroundThread.run(GeckoBackgroundThread.java:31)
02-28 11:49:28.224   508   873 W ActivityManager:   Force finishing activity org.mozilla.fennec_brian/.App

STR:
1) Open Fennec. Stay at about:home
2) Click the Android home button
3) Run oom-fennec
4) Open Fennec

This will often (not always) crash and close Fennec.
Assignee: nobody → bnicholson
blocking-fennec1.0: --- → ?
Attached patch patch (obsolete) — Splinter Review
Adds extra null checks. This particular crash was caused by mLastSnapshotUri being null, which it *always* is the first time we run the SessionSnapshotRunnable.
Attachment #601377 - Flags: review?(blassey.bugs)
Attached patch patch v2Splinter Review
Refactored to simplify checks and remove unnecessary null checks as suggested by kats.
Attachment #601377 - Attachment is obsolete: true
Attachment #601402 - Flags: review?(blassey.bugs)
Attachment #601377 - Flags: review?(blassey.bugs)
Crash Signature: [@ java.lang.NullPointerException: at org.mozilla.gecko.GeckoApp$SessionSnapshotRunnable.run(GeckoApp.java) ]
Keywords: crash
Whiteboard: [native-crash]
Comment on attachment 601402 [details] [diff] [review]
patch v2

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

::: mobile/android/base/GeckoApp.java
@@ +593,3 @@
>                  if (viewportJSON.equals(mLastViewport) &&
> +                    lastHistoryEntry.mTitle.equals(mLastTitle) &&
> +                    lastHistoryEntry.mUri.equals(mLastSnapshotUri))

can lastHistoryEntry, lastHistoryEntry.mTitle or lastHistoryEntry.mUri be null?
Attachment #601402 - Flags: review?(blassey.bugs) → review+
(In reply to Brad Lassey [:blassey] from comment #3)
>
> can lastHistoryEntry, lastHistoryEntry.mTitle or lastHistoryEntry.mUri be
> null?

No; we check lastHistoryEntry == null a few lines above, and the HistoryEntry comments for mUri and mTitle say "must never be null".
(In reply to Brian Nicholson (:bnicholson) from comment #5)
> http://hg.mozilla.org/integration/mozilla-inbound/rev/967583dbaa67

Ignore this, wrong link. Corrected inbound link:
http://hg.mozilla.org/integration/mozilla-inbound/rev/ea603d53c3b8
https://hg.mozilla.org/mozilla-central/rev/ea603d53c3b8
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 13
blocking-fennec1.0: ? → +
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: