-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Solve the crash of Phones running Android 12 and Harmony 2 or later. #37927
Conversation
Hi @leixd1994! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
@@ -149,7 +148,7 @@ public long getBatchNumber() { | |||
} | |||
|
|||
private class ConcurrentOperationQueue { | |||
private final Queue<UIThreadOperation> mQueue = new ConcurrentLinkedQueue<>(); | |||
private final Queue<UIThreadOperation> mQueue = new LinkedBlockingQueue<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why exactly does it solve the crash?
Also, what kind of crash? Is there an issue reported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I don`t know why this change can fix this issue. Maybe I just proposed this issue and need to further check
Could you please provide more context about the actual crash, and why is your PR supposed to fix it? It's not immediately obvious to be that replacing What is the intent/justification here? |
Hi. Below is the details for the crash Output of npx react-native info System: |
Hey @leixd1994, Thanks for providing the details of the crash you observed. Did you test your fix before/after on the latest trunk of the React Native core code? Judging by the entries in the callstack you provided, the code that was executed is an old one, and it doesn't correspond to what is currently there in the trunk. It very well may be that the problem has been fixed since then. |
Summary: # Changelog: [Internal] - Was looking at some [crash report](facebook#37927) on Github and noticed that error message has a grammar error. Searching the code revealed three more, all in Animated. This calms down my OCD :) Differential Revision: D46792795 fbshipit-source-id: 753692032d976026c430c40d9bd16f6911870911
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please verify whether this really fixes anything (as from the looks at the crash report and the code change it really doesn't seem like it would), and please do it on the latest trunk code, as the reported crash appears from an old code version.
Summary: Pull Request resolved: facebook#37930 # Changelog: [Internal] - Was looking at some [crash report](facebook#37927) on Github and noticed that error message has a grammar error. Searching the code revealed three more, all in Animated. This calms down my OCD :) Reviewed By: sammy-SC Differential Revision: D46792795 fbshipit-source-id: de54fe79060edf79b76b0b2070b8dcebcd1bc998
Summary: Pull Request resolved: #37930 # Changelog: [Internal] - Was looking at some [crash report](#37927) on Github and noticed that error message has a grammar error. Searching the code revealed three more, all in Animated. This calms down my OCD :) Reviewed By: sammy-SC Differential Revision: D46792795 fbshipit-source-id: 5fcf78e38d5d1540d3699e81bbf4ba036fb5c74d
@rshest Do you think this can be an internal android bug Refer to this: https://issuetracker.google.com/issues/261481042 And the above change can be a fix? |
I am just reviewing this change, if the real root cause is ConcurrentLinkedQueue, on release 0.71.5 It is also used in MountItemDispatcher and SurfaceMountingManager. |
how to change ReactAndroid native source code when herms Enabled? |
You need to enable building from source in your repo. There is a section in soc "build from source" |
Summary:
Solve the crash of Phones running Android 12 and Harmony 2 or later.
Changelog: