-
-
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
Android device log shows reanimated related message every milisecond then crashes #1932
Comments
Issue validatorThe issue is valid! |
The app also crashes few seconds later. Edit: It doesn't seem to be directly related. I was able to see the two separate log anomalies logged independently of one another. The warning in the screenshot above does not seem to cause the app to crash. Also Flipper's Logs screen crashes because of the massive amount of logging, so I'm not sure yet what the actual crash is. I'll try to debug with Android Studio. |
Even Android Studio has problems keeping up with the amount of log spam:
|
After setting
Seems that the OS just force closes it because it doesn't respond for 5 seconds. |
Could you search for Something like: grep -r 'MessageQueue' --include='*.java' --exclude-dir='node_modules/react-native' . in your project root. |
Here's a repro: https://github.com/andreialecu/rnctv-react-native-bare-test/tree/android-reanimated-crash Notice that it only occurs on a physical Oppo A72 device (I don't have any other Android device to test). I wasn't able to get it to reproduce in the emulator. Might be related to #1912 which mentions Oppo as well. |
@jakub-gonet I can't find anything relevant from that search. It reproduces with the repository I linked in the previous comment, so you could run your own search in it. But there are no other native dependencies except reanimated in the project. Make sure to use the Attaching output below:
|
The only other similar type of log that I can find is in this pastebin from 2019: No idea what is logging it. I think it's related to doing sync work on the main thread, resulting in some sort of race condition. |
One note about the repro: It initially did excessive work, trying to load 1000 images. This resulted in the same issue just by itself. I pushed a commit to it to load less, then you can see the crash occur while swiping between tabs. It's possible that react-native-collapsible-tab-view does something it shouldn't, but I don't think it should produce a hang/crash. |
Probably this issue is related with #1923 |
@piaskowyk do you have any information on why you think that? I have just tried switching to reanimated |
Just a note: I'm definitely able to reproduce this on I ran gradle clean and everything. |
Thanks for info. I will check this and let you know when I will know what happened. |
So this is interesting, I switched from Hermes to JSC on 2.1.0 and tested the repro and the same logs have appeared, but this time the app wasn't force closed. It was responsive from time to time, but mostly it was hung. It would respond every few seconds or so for just one frame. It then suddenly stopped the logs and the app became responsive. Notice the OpenGLRenderer log immediately after. |
@piaskowyk just wondering, because you didn't mention it. Were you able to actually reproduce this issue with my repro? |
I am having the same issue on OnePlus device when switching between BottomTabs using react-navigation. When
App will hang and after few seconds crash. |
@piaskowyk if this helps, it appears that this happens more frequently when the main JS thread has a lot of work to do. In our app, we're using If we have a FlatList and each item formats a date, the bigger the list is, the faster this bug occurs with reanimated. It looks like it might be triggered by some race condition. Regardless, the repro I attached in my earlier comment does show the issue more consistently. In the real app it occurs more randomly. |
An update on this. After optimizing everything as much as possible and reducing JS thread cpu usage to very low levels this stopped happening even on the lower end device. I'll keep it open because the repro above still shows it. |
Since this issue is opened I have never reproduced this problem :/ I hope that the many changes we made resolved this issue. Let me close this one 🙏 |
Description
Been troubleshooting some Android performance issues and crashes, and I noticed in the device log (using Flipper), that there's a message being logged every milisecond:
Not sure if this is normal or what is causing it, but it mentions reanimated.
Expected behavior
No log spam.
Actual behavior & steps to reproduce
See screenshot above
Package versions
Affected platforms
The text was updated successfully, but these errors were encountered: