-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Fix deadlock in REANodesManager (removes synchronous UI updates) #3194
Fix deadlock in REANodesManager (removes synchronous UI updates) #3194
Conversation
Any updates on this? @piaskowyk @jakub-gonet |
I can confirm that this PR does solve the issue for me. I have tested it by using patch-package, I just do not have write access else I would have reviewed it myself. |
Last Update ↓ It seems work, I found the patch WORKs on those npm versions: "react-native": "0.68.2",
"react-native-reanimated": "~2.8.0" I guess, there're some bugs on communitation between JS thread and UI thread if you use BUT, just upgrade Old Comment ↓ thx the work for this PR by @cltnschlosser, but I must say it's a pity this patch didn't resolve my problem: my npm versions: "react-native": "0.67.4",
"react-native-reanimated": "~2.8.0", // it's 2.8.0 on my machine I applied the patch, but I can still crash due to concurrency issue on multiple-thread, which is same as the version without patch: I will subscribe the change of this PR, looking forward the progress by @cltnschlosser or anyone else, thx a lot again. |
@richardo2016x I think that’s unrelated (#2327). But since you can reproduce it, can you find what mutex is throwing the exception and what the invalid argument being passed is? |
@cltnschlosser You're right, my screenshot in previous comment is related to #2327, one old, legacy bug. I spent some hours find out where the mutex lock error happend, but I can just track to I can reproduce it on On the other hand, I'm not so sure that whether one sample on Thx a lot again 👍 this patch inspired me how to debug/tuning |
This reverts commit 4bec24cc673129d2fea05dcd93249b5a4782031b.
ec7449c
to
6d1f6e5
Compare
@piaskowyk @jakub-gonet When can this pull request be reviewed? We have been using |
Heads up
This is my first attempt to dig in to reanimated, and I'm also new to react-native. So I'd appreciate extra scrutiny and explanation of any concerns.
Description
Fixes #3180
Would fix #2285 by removing the mounting code
Changes
Removes synchronous UI updates in REANodesManager (Added by #1215, to fix #1123). In a second commit here I added to the examples that were specified in that pull request and issue. I was unable to reproduce the issue on my device (iPhone 11 Pro). It's possible that I'm missing something or other conditions have improved the performance issues that were seen before. Would love feedback from @Szymon20000 and/or @kyle-ssg since they originally experienced and fixed #1123.
If we wanted to synchronously perform these updates in a more thread safe way, React-core would need to be updated to include something like the following. This would block the UIManager queue and execute on the main queue. Instead of the current approach of blocking the main queue to execute on the UIManager queue. Blocking the main queue is the current dangerous operation.
Test code and steps to reproduce
Included a second commit (which should likely be removed or cleaned up) with some test screens.
Checklist