Closed Bug 1117010 Opened 5 years ago Closed 5 years ago

Error reading ui.scrolling.fling_accel_base_multiplier prefs on startup

Categories

(Firefox for Android :: Toolbar, defect)

All
Android
defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 37

People

(Reporter: rnewman, Assigned: kats)

References

Details

Attachments

(1 file)

12-31 16:57:16.620 D/GeckoBrowser(  504): Error reading pref [ui.scrolling.fling_accel_interval]: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getCharPref]"  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: chrome://browser/content/browser.js :: handlePreferencesRequest :: line 1322"  data: no]
12-31 16:57:16.620 D/GeckoBrowser(  504): Error reading pref [ui.scrolling.fling_accel_base_multiplier]: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getCharPref]"  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: chrome://browser/content/browser.js :: handlePreferencesRequest :: line 1322"  data: no]
12-31 16:57:16.639 D/GeckoBrowser(  504): Error reading pref [ui.scrolling.fling_accel_supplemental_multiplier]: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getCharPref]"  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: chrome://browser/content/browser.js :: handlePreferencesRequest :: line 1322"  data: no]

These prefs look like they're accessed by code added in Bug 721421. Remember, accessing a pref that doesn't have a value results in an exception.
My bad, I should have remembered that setting default values in the Java code doesn't avoid this error. I'll throw up a patch.
Attached patch PatchSplinter Review
Building locally to test; will flag for review after.
Assignee: nobody → bugmail.mozilla
Attachment #8543273 - Flags: review?(rnewman) → review+
https://hg.mozilla.org/integration/fx-team/rev/d7a8038a1a26
Flags: in-testsuite-
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/d7a8038a1a26
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 37
Just noticed that these are float prefs, but you added them as strings:

121:        FLING_ACCEL_BASE_MULTIPLIER = getFloatPref(prefs, PREF_FLING_ACCEL_BASE_MULTIPLIER, 1000);

668:pref("ui.scrolling.fling_accel_base_multiplier", "1.0");

which causes:

01-11 20:30:05.558 W/GeckoPrefsHelper( 8115): Unhandled String value for pref [ui.scrolling.fling_accel_base_multiplier]
01-11 20:30:05.568 W/GeckoPrefsHelper( 8115): Unhandled String value for pref [ui.scrolling.fling_accel_supplemental_multiplier]

Wanna reopen, kats, or file a new bug?
Flags: needinfo?(bugmail.mozilla)
Sigh. I'll file a new bug as it will land on 38 and need uplifting. I hate how this pref code is inconsistent with the C++ pref code which uses strings for floats.
Flags: needinfo?(bugmail.mozilla)
You need to log in before you can comment on or make changes to this bug.