Closed Bug 1234934 Opened 9 years ago Closed 9 years ago

ZoomedView: (NullPointerException) Attempt to invoke method a null object reference

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(firefox44 unaffected, firefox45 fixed, firefox46 fixed, fennec45+)

RESOLVED FIXED
Firefox 46
Tracking Status
firefox44 --- unaffected
firefox45 --- fixed
firefox46 --- fixed
fennec 45+ ---

People

(Reporter: sebastian, Assigned: domivinc)

References

Details

Attachments

(1 file, 1 obsolete file)

This seems to happen on startup: > 12-23 13:00:54.297 10811-10827/org.mozilla.fennec_sebastian E/GeckoPrefsHelper﹕ Handler for preference [ui.zoomedview.simplified] threw exception > java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setVisibility(int)' on a null object reference > at org.mozilla.gecko.ZoomedView$4.prefValue(ZoomedView.java:513) > at org.mozilla.gecko.PrefsHelper$1.handleMessage(PrefsHelper.java:103) > at org.mozilla.gecko.EventDispatcher.dispatchEvent(EventDispatcher.java:325) > at org.mozilla.gecko.EventDispatcher.dispatchEvent(EventDispatcher.java:248) > at org.mozilla.gecko.GeckoAppShell.handleGeckoMessage(GeckoAppShell.java:2276) > at org.mozilla.gecko.mozglue.GeckoLoader.nativeRun(Native Method) > at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:437)
Dominique, any ideas?
Blocks: zoomedview
Flags: needinfo?(domivinc)
Margaret, the preferences listeners are trying to update the zoomed view UI but onFinishInflate is not yet completed. I moved all the UI updates in a new method and added a test before the UI updates. I put Michael as reviewer but if you want to make it I can change the commit message.
Flags: needinfo?(domivinc)
Attachment #8701870 - Flags: review?(michael.l.comella)
Assignee: nobody → domivinc
Comment on attachment 8701870 [details] [diff] [review] patch-24122015 1-Bug_1234934___Update_the_zoomed_view_UI_only_when_the_view_inflation_is_completed__r_mcomella.patch Review of attachment 8701870 [details] [diff] [review]: ----------------------------------------------------------------- r+ w/ nits. ::: mobile/android/base/java/org/mozilla/gecko/ZoomedView.java @@ +505,5 @@ > } > > + private void updateUI() { > + // onFinishInflate is not yet completed, the update of the UI will be done later > + if (changeZoomFactorButton == null) nit: We always put braces around ifs, even for single statement branches. @@ +512,5 @@ > + changeZoomFactorButton.setVisibility(View.INVISIBLE); > + } else { > + changeZoomFactorButton.setVisibility(View.VISIBLE); > + } > + setTextInZoomFactorButton(zoomFactor); Don't we only need to do this if `(!isSimplifiedUI)`?
Attachment #8701870 - Flags: review?(michael.l.comella) → review+
Thanks for the quick turn-around time, Dominique!
Keywords: checkin-needed
Michael, the target milestone of this bug should probably be updated to 45 in order to push this change with the other zoomed view changes.
Flags: needinfo?(michael.l.comella)
(In reply to Dominique Vincent [:domivinc] from comment #7) > Michael, the target milestone of this bug should probably be updated to 45 > in order to push this change with the other zoomed view changes. Gotcha – matching 45, when zoomed view started riding the trains (bug 1196146). Thanks for being on top of this. :) btw, target milestone is which branch the patch initially lands in, while "tracking fennec" is used to mark which version it should land in. We have a few dashboards [1] (essentially just bugzilla queries for these flags) that we check during our Thursday triage meetings to ensure the appropriate patches are uplifted to the correct versions. [1]: https://wiki.mozilla.org/Mobile/Triage#Android
tracking-fennec: --- → 45+
Flags: needinfo?(michael.l.comella)
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 46
Dominique, can you request approval for uplift to Aurora?
Flags: needinfo?(domivinc)
Comment on attachment 8702696 [details] [diff] [review] patch-29122015 1-Bug_1234934___Update_the_zoomed_view_UI_only_when_the_view_inflation_is_completed__r_mcomella.patch Approval Request Comment [Feature/regressing bug #]: Zoomed view initialization on startup [User impact if declined]: Preference settings of the zoomed view not always applied correctly [Describe test coverage new/current, TreeHerder]: Manual test [Risks and why]: low, changes are limited to the zoomed view and should not have side-effect on other things. [String/UUID change made/needed]:None
Flags: needinfo?(domivinc)
Attachment #8702696 - Flags: approval-mozilla-aurora?
Comment on attachment 8702696 [details] [diff] [review] patch-29122015 1-Bug_1234934___Update_the_zoomed_view_UI_only_when_the_view_inflation_is_completed__r_mcomella.patch Fix an error on startup, taking it.
Attachment #8702696 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
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: