-
Notifications
You must be signed in to change notification settings - Fork 4.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
Drag and drop blocks: Crashes on iOS related to JSI #41686
Comments
👋 @fluiddot! Is this in progress perhaps? Asking so we move the status accordingly. Thanks! |
@hypest Nope, this task hasn't been tackled yet. However, it would be great if we could take a look sooner than later, as it's causing some of the top 5 crashes in the WordPress-iOS app. Actually, I'm thinking to focus on this over other tasks I'm currently working on related to integration tests, wdyt? |
Thanks Carlos! Yeah, makes sense to focus on this since this is a crash situation. 👍 |
I performed a deeper analysis of the crashes in an effort to better identify the culprit:
|
In relation to the previous comment, my plan is to go ahead with the fix provided in this PR on both platforms, which hopefully could help to address the crashes 🤞. |
That's a great idea, I think that by adding the |
Looks like the C++ side of Reanimated differs by platform, so the fix that was already released for Android might require extra work and potentially won't provide a solution. In fact, after applying the fix related to using a weak pointer, on iOS, we've managed to reproduce the crash
Interestingly enough, this issue can't be reproduced on production, although, per the stack trace and error message looks very similar to the ones that are listed in this issue's description. @geriux and I have tried to track down the culprit, but couldn't manage to find a specific part that is causing the crash. Our gut feeling is that Reanimated is affected by some kind of race condition during the Reanimated native module deallocation, which ultimately produces an exception on random occasions. Looks like this type of crash is also encountered by other users of the library, here are some examples:
At this point, we could try upgrading the library to a newer version although we haven't found any specific entry in the new version changelogs for these issues. Alternatively, as mentioned in this comment, it might be worth trying to enable Hermes on iOS, in case it helps in addressing the issue. |
@fluiddot |
Hey @arinjay. 👋🏻 We have not yet enabled Hermes for iOS. We hope to in the future, but I do not believe we have set a schedule for that work at this time. |
FYI I created wordpress-mobile/gutenberg-mobile#5862 to track this issue individually. |
We are still receiving events related to this crash in the last versions. In fact, it's one of the top 5 crashes on iOS. We've tried different avenues to debug it but the lack of reproduction steps made it difficult to identify the culprit. For this reason, I'd advocate keeping the |
Description
On WP-iOS
19.9.0.0
, we identified a crash caused byreact-native-reanimated
and JSI when opening and closing the editor several times. This issue was hard to reproduce, as it looked like that only happened on specific devices and/or OS versions, but we managed to reproduce it almost consistently and released a hotfix (WP-iOS19.9.1.0
) to address it (reference).However, after releasing the hotfix, we noticed that we're still getting crashes related to JSI, although the number is quite lower than the original issue. There's no clue yet about what's causing the crash, so we'd need to investigate it further.
Crash reports
EXC_BAD_ACCESS
(NOTE: This event is grouping non-related events, so when checking the stack trace verify that is related toPostPostViewController
)NSt3__112system_errorE
N8facebook3jsi7JSErrorE
JSCRuntime destroyed with a dangling API object
UPDATE: We have identified another issue with Reanimated on Android that might be related to this one:
Step-by-step reproduction instructions
We haven't found yet a way to reproduce it, hence no reproduction instructions can be provided.
Expected behaviour
We shouldn't get crash reports related to the
react-native-reanimated
library or JSI.Actual behaviour
We are receiving crash reports related to
react-native-reanimated
and JSI.Screenshots or screen recording (optional)
N/A
WordPress information
Device information
The text was updated successfully, but these errors were encountered: