react-native icon indicating copy to clipboard operation
react-native copied to clipboard

fix app crashing when reloads overlap

Open coado opened this issue 1 year ago • 5 comments

Summary:

Regarding the issue where the app sometimes crashes due to race condition when two reloads overlap in unfortunate way. This PR fixes it in some way by introducing throttling on reload command. For now I set it to 700ms as I was still able to reproduce it on 500-550ms for provided repro in the issue. The problem may still happen for bigger apps where reload may take more time to finish.

Changelog:

[GENERAL] [FIXED] - throttle reload command

Test Plan:

I've tested on provided repro and a smaller app trying to brake it.

coado avatar Sep 10 '24 12:09 coado

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar Sep 17 '24 08:09 facebook-github-bot

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar Sep 18 '24 10:09 facebook-github-bot

@coado Apologies for my wobble in reviewing this yesterday, see new reply comment 🙏🏻

huntie avatar Sep 18 '24 10:09 huntie

@coado Apologies for my wobble in reviewing this yesterday, see new reply comment 🙏🏻

It's all good! I've changed it back to throttle 😁

coado avatar Sep 18 '24 13:09 coado

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar Sep 18 '24 13:09 facebook-github-bot

@cipolleschi merged this pull request in facebook/react-native@42bad68220d288ef2436609ee50ad993c239b362.

facebook-github-bot avatar Sep 18 '24 14:09 facebook-github-bot

This pull request was successfully merged by @coado in 42bad68220d288ef2436609ee50ad993c239b362

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

react-native-bot avatar Sep 18 '24 14:09 react-native-bot