Skip to content

Fix EXC_BAD_ACCESS for animated - #54158

Closed
andrewdacenko wants to merge 1 commit into
react:mainfrom
andrewdacenko:export-D84638972
Closed

Fix EXC_BAD_ACCESS for animated#54158
andrewdacenko wants to merge 1 commit into
react:mainfrom
andrewdacenko:export-D84638972

Conversation

@andrewdacenko

Copy link
Copy Markdown
Contributor

Summary:
Changelog: [Internal]

Animated was capturing self directly in C++ std::function contexts. When capturing Objective-C objects in C++ lambdas, they aren't automatically retained. When these lambdas were invoked later (potentially after self was deallocated), accessing _onRender and other instance variables caused the crash.

Reviewed By: zeyap

Differential Revision: D84638972

Summary:
Changelog: [Internal]

Animated was capturing `self` directly in C++ std::function contexts. When capturing Objective-C objects in C++ lambdas, they aren't automatically retained. When these lambdas were invoked later (potentially after `self` was deallocated), accessing `_onRender` and other instance variables caused the crash.

Reviewed By: zeyap

Differential Revision: D84638972
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 14, 2025
@meta-codesync

meta-codesync Bot commented Oct 14, 2025

Copy link
Copy Markdown

@andrewdacenko has exported this pull request. If you are a Meta employee, you can view the originating Diff in D84638972.

@meta-codesync

meta-codesync Bot commented Oct 15, 2025

Copy link
Copy Markdown

This pull request has been merged in e79920c.

@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @andrewdacenko in e79920c

When will my fix make it into a release? | How to file a pick request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants