Closed Bug 1844213 Opened 2 years ago Closed 2 years ago

Crash in [@ PrefWrapper::WantValueKind] (Should not access the preference 'accessibility.tabfocus' in the Content Processes)

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

defect

Tracking

()

RESOLVED FIXED
117 Branch
Accessibility Severity s2
Tracking Status
firefox-esr102 --- unaffected
firefox-esr115 --- wontfix
firefox115 --- wontfix
firefox116 --- fixed
firefox117 --- fixed

People

(Reporter: RyanVM, Assigned: morgan)

References

Details

(Keywords: access, crash, topcrash)

Crash Data

Attachments

(1 file, 1 obsolete file)

Crash report: https://crash-stats.mozilla.org/report/index/8e136ed1-bb4e-43c9-8318-25ab10230717

MOZ_CRASH Reason: Should not access the preference 'accessibility.tabfocus' in the Content Processes

Top 10 frames of crashing thread:

0  XUL  PrefWrapper::WantValueKind const  modules/libpref/Preferences.cpp
1  XUL  PrefWrapper::GetValue const  modules/libpref/Preferences.cpp:1246
1  XUL  mozilla::Internals::GetPrefValue<int*&>  modules/libpref/Preferences.cpp:4685
2  XUL  mozilla::Preferences::GetInt  modules/libpref/Preferences.cpp:5042
2  XUL  nsXPLookAndFeel::GetIntValue  widget/nsXPLookAndFeel.cpp:1044
2  XUL  mozilla::LookAndFeel::GetInt  widget/nsXPLookAndFeel.cpp:1502
3  XUL  nsFocusManager::DetermineElementToMoveFocus  dom/base/nsFocusManager.cpp:3355
4  XUL  mozilla::IsNextFocusableElementTextControl  dom/events/IMEStateManager.cpp:1514
4  XUL  mozilla::GetActionHint  dom/events/IMEStateManager.cpp:1632
4  XUL  mozilla::IMEStateManager::SetIMEState  dom/events/IMEStateManager.cpp:1745

If I understand the pref blocking code correctly, it shouldn't block preferences that are listed in all.js. accessibility.tabfocus is listed in all.js, but only for non-Windows platforms. For Mac, it's deliberately left undefined as a signal to use the OS setting by default. So, I think a user has set this in about:config and now it's crashing.

Note that in bug 1628476, this preference has been exposed in about:Preferences, but that's only in 117. This crash occurred on 116 beta. Still, I'm surprised we've never seen this before now.

Ideally, there should probably be a value for this pref (-1 or something) which means "use the OS setting" and that should be the default value for Mac. However, there's probably an easier way to fix this, which is to add accessibility.tabfocus to the allow list.

dveditz, does this seem reasonable to you? (Tagging you since tjr is out of office.)

Moving this to DOM because even though this is related to accessibility, it is not related to accessibility APIs, but rather tab key handling.

Component: Disability Access APIs → DOM: UI Events & Focus Handling
Flags: needinfo?(dveditz)
See Also: → 1628476
Accessibility Severity: --- → s2
Keywords: access

The bug is linked to a topcrash signature, which matches the following criterion:

  • Top 5 desktop browser crashes on Mac on beta

For more information, please visit BugBot documentation.

Keywords: topcrash
Assignee: nobody → mreschenberg
Status: NEW → ASSIGNED
Attachment #9345291 - Attachment description: WIP: Bug 1844213 - Implement ability to hide steps indicator in about welcome → Bug 1844213 - Implement ability to hide steps indicator in about welcome r=aminomancer

Comment on attachment 9345291 [details]
Bug 1844213 - Implement ability to hide steps indicator in about welcome r=aminomancer

Revision D184346 was moved to bug 1844212. Setting attachment 9345291 [details] to obsolete.

Attachment #9345291 - Attachment is obsolete: true
Pushed by tritter@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4418d5fd439b Add accessibility.tabfocus to the dynamic pref override list r=Jamie
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch

:morgan do you want to consider this for uplift if the opportunity arises in 116?

Flags: needinfo?(mreschenberg)

(In reply to Dianna Smith [:diannaS] from comment #8)

:morgan do you want to consider this for uplift if the opportunity arises in 116?

yes :) will request

Flags: needinfo?(mreschenberg)

Comment on attachment 9344711 [details]
Bug 1844213: Add accessibility.tabfocus to the dynamic pref override list r?Jamie

Beta/Release Uplift Approval Request

  • User impact if declined: Users will continue to experience this crash
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: In about:preferences, attempt to check/uncheck the Keyboard navigation setting at the bottom of the page
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This change adds this pref to an allow list, which is the root of this crash.
  • String changes made/needed:
  • Is Android affected?: No
Attachment #9344711 - Flags: approval-mozilla-beta?
Flags: qe-verify+

Comment on attachment 9344711 [details]
Bug 1844213: Add accessibility.tabfocus to the dynamic pref override list r?Jamie

Switching flag because we are in RC Week :)

Attachment #9344711 - Flags: approval-mozilla-beta? → approval-mozilla-release?
QA Whiteboard: [qa-triaged]

Hello! I tried to reproduce the issue with Firefox 117.0a1 (2023-07-18) on macOS 12.6 and 13.4 ARM by checking and unchecking the Use the tab key to move focus between form controls and links option from about:preferences > Browsing area but with no luck. I have also tried Firefox 116.0b5 but I don't have the Use the tab key to move focus between form controls and links option available.
Is there something that needs to be done first to successfully reproduce the issue by checking and unchecking the above option with Firefox 117.0a1 (2023-07-18)? Or this only reproduces on 116.0b5? If so how can I have the option displayed there as well in about:preferences? Thank you in advance!

Flags: needinfo?(mreschenberg)

(In reply to Alexandru Trif, Desktop QA [:atrif] from comment #13)

Hello! I tried to reproduce the issue with Firefox 117.0a1 (2023-07-18) on macOS 12.6 and 13.4 ARM by checking and unchecking the Use the tab key to move focus between form controls and links option from about:preferences > Browsing area but with no luck. I have also tried Firefox 116.0b5 but I don't have the Use the tab key to move focus between form controls and links option available.
Is there something that needs to be done first to successfully reproduce the issue by checking and unchecking the above option with Firefox 117.0a1 (2023-07-18)? Or this only reproduces on 116.0b5? If so how can I have the option displayed there as well in about:preferences? Thank you in advance!

This pref didn't exist prior to the regressing bug, so it won't be in preferences in older builds.

Can you try toggling the preference, loading this test case, and tabbing through the controls?

data:text/html,<button>button</button><a href="mozilla.org">link</a><select><option>a</option><option>b</option></select>

Also, make sure you have System Settings > Keyboard > Keyboard Navigation turned off in macOS system settings

Flags: needinfo?(mreschenberg)

(In reply to Morgan Reschenberg [:morgan] from comment #14)

This pref didn't exist prior to the regressing bug, so it won't be in preferences in older builds.

Can you try toggling the preference, loading this test case, and tabbing through the controls?

data:text/html,<button>button</button><a href="mozilla.org">link</a><select><option>a</option><option>b</option></select>

Also, make sure you have System Settings > Keyboard > Keyboard Navigation turned off in macOS system settings

Hello! I tried reproducing the issue while having Keyboard Navigation turned off in the macOS system settings and Use the tab key to move focus between form controls and links enabled in about preferences by using the tab key to navigate on the above test case multiple times but the issue does not reproduce. The testing was performed with Firefox 117.0a1 (2023-07-18) on macOS 12 and macOS 13 ARM.
If there are other scenarios that we can try please let us know. Thank you!

Flags: needinfo?(mreschenberg)

Comment on attachment 9344711 [details]
Bug 1844213: Add accessibility.tabfocus to the dynamic pref override list r?Jamie

Approved for 116.0rc2

Attachment #9344711 - Flags: approval-mozilla-release? → approval-mozilla-release+

(In reply to Alexandru Trif, Desktop QA [:atrif] from comment #15)

(In reply to Morgan Reschenberg [:morgan] from comment #14)

This pref didn't exist prior to the regressing bug, so it won't be in preferences in older builds.

Can you try toggling the preference, loading this test case, and tabbing through the controls?

data:text/html,<button>button</button><a href="mozilla.org">link</a><select><option>a</option><option>b</option></select>

Also, make sure you have System Settings > Keyboard > Keyboard Navigation turned off in macOS system settings

Hello! I tried reproducing the issue while having Keyboard Navigation turned off in the macOS system settings and Use the tab key to move focus between form controls and links enabled in about preferences by using the tab key to navigate on the above test case multiple times but the issue does not reproduce. The testing was performed with Firefox 117.0a1 (2023-07-18) on macOS 12 and macOS 13 ARM.
If there are other scenarios that we can try please let us know. Thank you!

Hmm, I'm not sure what else to try... We can watch the crash volume and see if it dissipates since this can't be verified manually

Flags: needinfo?(mreschenberg)

(In reply to Morgan Reschenberg [:morgan] from comment #18)

Hmm, I'm not sure what else to try... We can watch the crash volume and see if it dissipates since this can't be verified manually

Thank you for your help! I'm going to remove the qe+ flag since there is nothing actionable for QA.

QA Whiteboard: [qa-triaged]
Flags: qe-verify+

For Mac, it's deliberately left undefined [...]. So, I think a user has set this in about:config and now it's crashing.

And they created a string pref (user_pref("accessibility.tabfocus", "3");) instead of an integer value as expected. Only a string value should trigger this MOZ_CRASH. That was also the problem in bug 1843197

Flags: needinfo?(dveditz)
See Also: → 1843197

That's why testing via the UI was not able to reproduce the problem: the preferences UI correctly creates an integer pref.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: