Closed Bug 1845614 Opened 2 years ago Closed 2 years ago

Crash when MacAccessibility logging is enabled.

Categories

(Core :: Disability Access APIs, defect)

All
macOS
defect

Tracking

()

RESOLVED FIXED
118 Branch
Tracking Status
firefox118 --- fixed

People

(Reporter: eeejay, Assigned: eeejay)

Details

Attachments

(1 file)

STR:

Launch firefox with MOZ_LOG=MacAccessibility:5 and VoiceOver.

Firefox will quickly crash because we don't check if mGeckoAccessible is not null when logging.

Yayyy :) I ran into this awhile back and forgot to file a bug.

FWIW if you're running a debug build, you'll also fail MOZ_ASSERT(IsText() || IsHyperText()); pretty often when running fx w/ VO on.
This is in RemoteAccessible::GetCachedTextAttributes and accessible/mac/GeckoTextMarker.mm. I'm not sure if there's a bug on file for that ? but the patch I have locally that makes fx debug builds run w/ mac logging includes commenting out those two assertions

The one in RemoteAccessible::GetCachedTextAttributes also seems to be triggered with MOZ_LOG unset. So I think those assertions should be removed or examined, but they aren't related to logging.

Not great, but s4 because this is effectively a debugging only crash.

Severity: -- → S4

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

Yayyy :) I ran into this awhile back and forgot to file a bug.

FWIW if you're running a debug build, you'll also fail MOZ_ASSERT(IsText() || IsHyperText()); pretty often when running fx w/ VO on.
This is in RemoteAccessible::GetCachedTextAttributes and accessible/mac/GeckoTextMarker.mm. I'm not sure if there's a bug on file for that ? but the patch I have locally that makes fx debug builds run w/ mac logging includes commenting out those two assertions

So those assertions are actual bugs. I filed bug 1846312 and I'll attach a fix there.

Pushed by eisaacson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/98f16d6c17f8 Null check accessible before getting attributes. r=morgan
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch

I have reproduced this issue using Firefox 117.0a1 (2023.07.24) on macOS 12, launch Firefox with command: firefox -p -MOZ_LOG=MacAccessibility:5 and Voice Over on.
Testing on latest nightly 119.0a1 (2023.08.30) with command: firefox -p -MOZ_LOG=MacAccessibility:5 and Voice Over on, Firefox not crashed.
On Firefox 118.0b2 with the same command in the terminal and Voice Over on, Firefox still crashed quickly. It seems that on Fx 118.0b2 the issue is still present.

Flags: needinfo?(eitan)
Flags: needinfo?(eitan)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: