Skip to content

Fix SemanticsObject crash when bridge is nullptr#185293

Merged
auto-submit[bot] merged 6 commits into
flutter:masterfrom
LongCatIsLooong:a11y-bridge-crash
Apr 29, 2026
Merged

Fix SemanticsObject crash when bridge is nullptr#185293
auto-submit[bot] merged 6 commits into
flutter:masterfrom
LongCatIsLooong:a11y-bridge-crash

Conversation

@LongCatIsLooong

@LongCatIsLooong LongCatIsLooong commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

This should fix #174853 (I have not verified myself but the bridge availability check should prevent the potential null dereference).

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

@github-actions github-actions Bot added platform-ios iOS applications specifically engine flutter/engine related. See also e: labels. team-ios Owned by iOS platform team labels Apr 20, 2026
@LongCatIsLooong LongCatIsLooong added the CICD Run CI/CD label Apr 20, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 20, 2026
@LongCatIsLooong LongCatIsLooong added the CICD Run CI/CD label Apr 20, 2026
@LongCatIsLooong LongCatIsLooong marked this pull request as ready for review April 21, 2026 18:57
@LongCatIsLooong LongCatIsLooong requested a review from a team as a code owner April 21, 2026 18:57

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces safety checks in SemanticsObject to verify the accessibility bridge's status before accessing its view or calculating frames, preventing potential crashes when the bridge is no longer available. A corresponding unit test was added to validate these changes. Feedback was provided regarding a memory leak in the new test case where a mock bridge is allocated using 'new' but never deallocated.

@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 22, 2026
@LongCatIsLooong LongCatIsLooong added the CICD Run CI/CD label Apr 22, 2026
@vashworth vashworth requested a review from LouiseHsu April 23, 2026 21:25
@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 23, 2026

@LouiseHsu LouiseHsu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

google testing is super failing but otherwise the changes lgtm

@LongCatIsLooong

Copy link
Copy Markdown
Contributor Author

Let me try google-testing again

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Apr 28, 2026
@LongCatIsLooong LongCatIsLooong added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 29, 2026
@auto-submit auto-submit Bot added this pull request to the merge queue Apr 29, 2026
Merged via the queue into flutter:master with commit 9407190 Apr 29, 2026
200 of 201 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD engine flutter/engine related. See also e: labels. platform-ios iOS applications specifically team-ios Owned by iOS platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SemanticsObject+UIFocusSystem crashes in Add to App with local engine

2 participants