Closed
Bug 849254
Opened 12 years ago
Closed 12 years ago
java.lang.NullPointerException: at org.mozilla.gecko.BrowserApp.setToolbarHeight(BrowserApp.java)
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox21 unaffected, firefox22 fixed)
RESOLVED
FIXED
Firefox 22
Tracking | Status | |
---|---|---|
firefox21 | --- | unaffected |
firefox22 | --- | fixed |
People
(Reporter: scoobidiver, Assigned: cwiiis)
References
Details
(Keywords: crash, regression, Whiteboard: [native-crash])
Crash Data
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
kats
:
review+
|
Details | Diff | Splinter Review |
It has been hit several times at startup in 22.0a1/20130308 by a single user. Here is a crash report: bp-9876f544-35c0-4a7f-8eb2-eb1a82130308.
Based on the stack trace, it's a regression from bug 716403 whose the patch landed in that build.
java.lang.NullPointerException
at org.mozilla.gecko.BrowserApp.setToolbarHeight(BrowserApp.java:488)
at org.mozilla.gecko.BrowserToolbarLayout.refreshMargins(BrowserToolbarLayout.java:62)
at org.mozilla.gecko.BrowserApp.showAboutHome(BrowserApp.java:965)
at org.mozilla.gecko.BrowserApp.onTabChanged(BrowserApp.java:117)
at org.mozilla.gecko.Tabs$5.run(Tabs.java:450)
at android.app.Activity.runOnUiThread(Activity.java:4185)
at org.mozilla.gecko.Tabs.notifyListeners(Tabs.java:440)
at org.mozilla.gecko.Tabs.notifyListeners(Tabs.java:436)
at org.mozilla.gecko.Tabs$3.run(Tabs.java:165)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
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:787)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)
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.BrowserApp.setToolbarHeight%28BrowserApp.java%29
Reporter | ||
Comment 1•12 years ago
|
||
Hit by a second user.
Reporter | ||
Updated•12 years ago
|
Whiteboard: [native-crash][startupcrash] → [native-crash]
Assignee | ||
Comment 2•12 years ago
|
||
Assignee: nobody → chrislord.net
Status: NEW → ASSIGNED
Attachment #723428 -
Flags: review?(bugmail.mozilla)
Comment 3•12 years ago
|
||
Comment on attachment 723428 [details] [diff] [review]
Fix NPE when setting toolbar height
Review of attachment 723428 [details] [diff] [review]:
-----------------------------------------------------------------
I think moving the call to refreshMargins() into the AboutHomeRunnable should be sufficient to fix this bug; the rest of it is not needed and makes reading the code more confusing.
::: mobile/android/base/BrowserApp.java
@@ +486,5 @@
> // about:home widget directly - this is to avoid resizing the
> // LayerView, which can cause visible artifacts.
> + if (mAboutHomeContent != null) {
> + mAboutHomeContent.setPadding(0, aVisibleHeight, 0, 0);
> + }
This should be unnecessary after moving the call to refreshMargins() into the AboutHomeRunnable.
@@ +491,4 @@
> } else {
> + if (mToolbarSpacer != null) {
> + mToolbarSpacer.setPadding(0, aVisibleHeight, 0, 0);
> + }
mToolbarSpacer gets initialized in onCreate, so it should never be null here
@@ +496,5 @@
> aHeight = aVisibleHeight = 0;
> } else {
> + if (mToolbarSpacer != null) {
> + mToolbarSpacer.setPadding(0, 0, 0, 0);
> + }
Ditto
Attachment #723428 -
Flags: review?(bugmail.mozilla) → review-
Assignee | ||
Comment 4•12 years ago
|
||
Done as suggested. You're right, I was just being extra-safe.
Attachment #723428 -
Attachment is obsolete: true
Attachment #723463 -
Flags: review?(bugmail.mozilla)
Updated•12 years ago
|
Attachment #723463 -
Flags: review?(bugmail.mozilla) → review+
Assignee | ||
Comment 5•12 years ago
|
||
Pushed to inbound: https://hg.mozilla.org/integration/mozilla-inbound/rev/cecc73dc627a
Comment 6•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 22
Reporter | ||
Updated•12 years ago
|
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•