Closed Bug 836924 Opened 7 years ago Closed 7 years ago

java.lang.NullPointerException: at org.mozilla.gecko.Tabs.getContentResolver(Tabs.java:212)

Categories

(Firefox for Android :: General, defect, critical)

19 Branch
ARM
Android
defect
Not set
critical

Tracking

()

RESOLVED FIXED
Firefox 21
Tracking Status
firefox19 --- wontfix
firefox20 --- fixed
firefox21 --- fixed

People

(Reporter: aaronmt, Assigned: mfinkle)

Details

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

Crash Data

Attachments

(3 files)

Attached file logcat.csv
Caused by: java.lang.NullPointerException
// 	at org.mozilla.gecko.Tabs.getContentResolver(Tabs.java:212)
// 	at org.mozilla.gecko.AwesomeBar.onCreate(AwesomeBar.java:80)
// 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1072)
// 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1816)

Caught via AppThwack during UI exerciser tests
https://appthwack.com/public/B7QGDGngRe

HTC Evo Design 4G (2.3.4)
Attached file Monkey log
Crash Signature: [@ java.lang.NullPointerException: org.mozilla.gecko.Tabs.getContentResolver(Tabs.java)]
Attached patch patchSplinter Review
Tabs has a content resolver, but it can be null until it's set. Let's stop using Tabs.getInstance().getContentResolver() outside of Tabs/Tab classes.

* MemoryMonitor already has a context, so use it.
* AwesomeBar _is_ a context, so use it.

This patch seems to work just fine in my testing. I could open the awesomebar and remove history & bookmarks without problems.
Assignee: nobody → mark.finkle
Attachment #715210 - Flags: review?(bnicholson)
Comment on attachment 715210 [details] [diff] [review]
patch

Nice, much better.
Attachment #715210 - Flags: review?(bnicholson) → review+
https://hg.mozilla.org/mozilla-central/rev/adf96501de91
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 21
Comment on attachment 715210 [details] [diff] [review]
patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): various
User impact if declined: slightly more crashes
Testing completed (on m-c, etc.): landed on m-c
Risk to taking this patch (and alternatives if risky): fairly low
String or UUID changes made by this patch: none
Attachment #715210 - Flags: approval-mozilla-beta?
Attachment #715210 - Flags: approval-mozilla-aurora?
Comment on attachment 715210 [details] [diff] [review]
patch

This already landed on FF21 before the merge to Aurora so no need to land there, go ahead with uplift to Beta.
Attachment #715210 - Flags: approval-mozilla-beta?
Attachment #715210 - Flags: approval-mozilla-beta+
Attachment #715210 - Flags: approval-mozilla-aurora?
Attachment #715210 - Flags: approval-mozilla-aurora-
tracking-fennec: ? → ---
You need to log in before you can comment on or make changes to this bug.