-
-
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
Inconsistent freezing on iOS #2244
Comments
Issue validatorThe issue is valid! |
Maybe my problem is related, but it only started happening with alpha3 not alpha2: |
i've crash cause of useAnimatedReaction. EXC_BAD_ACCESS |
This happens to me with 2.3.0-beta.2. Common pattern to reach the issue is when I open a modal and close it. After that the UI is all freezed up. Issue dissapears when downgrading to 2.3.0-alpha.2. |
@Sanglepp This might be completely separate issue, but I upgraded |
I have the same problem with 2.3.0-alpha.3 and above. I'm using Layout Animations. Could be related with this API? |
As stated here before by @effektsvk - this seems to be related to facebook/react-native#32329 This causes issues with all libraries that are using Reanimated 2 for animations, starting from RN Seems like it's something with the transition that keeps the native screen in memory, and on top of the main view, leading to an overlay that prevents touch events. @piaskowyk @Szymon20000 , I saw you were working on RN~66 support in #2462 - any idea what could be done to workaround this issue? Any plan for a fix? |
I can confirm that I also had this issue with "react-native": "0.65.1", |
Hey, just a small note, there's new |
I can confirm that updating to [email protected] fixes this issue. |
Anyone reporting this try this patch. You can edit these files directly from xcode in Development Pods directory. |
I can also confirm that 2.2.3 does work, while 2.3.0-beta.2 does not- is there a regression here? |
Any idea on how we can fix this for 2.3.x? |
@effektsvk Hey, so it works well with RN 0.66 and reanimated 2.2.3? |
@hukpavlo Yes, I didn't have any issues with those versions, and lot of others said that it's working fine for them as well in the RN thread (facebook/react-native#32329 (comment)) |
I am using [email protected], [email protected] and [email protected] and having the same issue from the sentry log
|
Hi all! Thanks for reporting and all your comments. I wanted to point out that "EXC_BAD_ACCESS" is a typical error message related to accessing corrupted/cleaned-up/out-of-scope memory and even thought a lot of errors do have that message in common there are likely unrelated to each other. We are commited to fixing all bugs that result in EXC_BAD_ACCESS error but we need to collect related causes under one issue and filter out the remaining ones. Since this issue was originally reported by @lucasjohnston and I saw some comments later on that 2.3 has fixes this problem for others wanted to ask if this problem still persist in 2.3 and after? I also suspect that @tankers746's issue is related as it has a very similar trace (tracing to StoreUser class). As for the remaining commenters I can't tell for sure if your crash is related and therefore ask you to share more details and possibly open a new issue if if you don't see |
Hi @kmagiera - I recently revisited my build and upgraded the package to 2.3 and observe exactly the same behaviour as before. Would be great to see some movement on this as there's been little progress on this issue (beyond other users reporting similar bugs) afaik. Let me know if there's anything I can provide to assist |
We're also seeing this issue with We have observed this both with and without Flipper added to the project (so probably unrelated to facebook/flipper#1399) |
I've trawled through a variety of issues trying to diagnose this (see #1284 #2775 #2327). Today I found the component causing trouble - an Animated Gradient I'd built a year back and forgotten about.
When using the component, typically after ~5mins of running or immediately when starting to run, the random XY coordinates generated become very small and it takes >50 attempts to find an angle diff big enough. Normally this loop completes after just 1 or 2 attempts. I think this is down to the way RN / iOS handles randomness. It seems this is what causes the app to freeze up – I don't get why, though. It might loop multiple times, but the console reports shows that my My expectation was that an infinitely loop would freeze, but a resolved loop would ultimately resolve itself even if there's some lag. I'd also expect the app to crash, or RN to report some sort of error. None of this happens. My guess is this being something to do with the way Anyway – to avoid this, I've just removed the loop. If the angle isn't big enough, we just add some arbitrary values to the XY coords and hope for the best. |
Xcode 14 beta 4 is reporting a "Hang Risk" from RCTWebSocket, which I've raised separately (facebook/react-native#34400). |
I dont know what is your code that produces this error, but i was facing the same issue when i was using Gesture Detectors. "react-native-gesture-handler": "^2.4.0" What didnt work: Code that made my app freeze (iOS, Android) const pangGesture = Gesture.Pan() By chaining runOnJS(true) to detector solved my issue. |
Had the same setup and the suggestion above worked for me. Yet to test other devices but mine is working with no issues. Thank you |
You are welcome :D |
@kostas64 , it looks like it works for me as well, thanks |
@MikhailVasiliev happy to hear that! |
Problem resolved since version 3.+, so I encourage to upgrade 🎉 |
Description
Apologies in advance for vagueness, pretty hard to debug this one.
For the past few weeks I've been experiencing random freezing of our app, where the app seemingly stops in its tracks with no crashing/stacktrace/error. Initially I thought this was due to excessive re-rendering or a memory leak, but after reworking our logic to background actions the random freezes continue.
Could well still be an error on our side, but struggling to see where/how.
I've tried to debug this myself with little joy (can't remotely debug with
reanimated
) - the only nuggets of information I've managed to link areEXC_BAD_ACCESS
exceptions which all seem to come from reanimated.For reference, we're using both react-native's
Animated
andreanimated
(in different parts of the app), and also frequently use Modalize which itself usesreanimated
.I found a previous issue that looks pretty similar to this but was fixed last year: #1284
Expected behavior
No freezes
Actual behavior & steps to reproduce
Unknown
Snack or minimal code example
Can't provide a replication unfortunately, but can provide some Sentry error traces from these exceptions.
Package versions
For reference
react-native-modalize
: ^2.0.8react-native-portalize
: ^1.0.7react-native-screens
: 2.17.1@react-navigation/native
: ^5.9.2@react-navigation/stack
: ^5.14.2Affected platforms
The text was updated successfully, but these errors were encountered: