-
Notifications
You must be signed in to change notification settings - Fork 24k
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
SIGSEGV crash with ART library on Android #6760
Comments
I'm having this issue too. I started using react-native-art-svg to implement a radial progress/timer bar around a button; now after an inconsistent amount of time of that bar ticking away my app crashes on Android. Here's the console output for when my app crashes:
|
I've just confirmed that this issue still exists in v0.23.1 |
I am seeing a similar error message as well on Android:
The log output in the failing case: |
This issue still exists in v0.24.1 |
+1 |
As far as I recall, it does crash when debug mode is turned off - it just takes longer for the crash to happen. |
+1 |
1 similar comment
+1 |
Anyone have an idea for a workaround? Since there seems to be some kind of memory leak, is there a way we can manually call some kind of garbage collection? I need my app to be able to run all day, while it always crashes at best about every ~12 hours. |
+1 |
1 similar comment
+1 |
We see this too. A lot in debug mode. From the dumps, it looks like a crash on the JSC (JavaScriptCore) execution thread. I started thinking in terms of building a debug version of JSC to see if we could get more information. What I found wasn't entirely encouraging. The JSC build used in React Native seems to come from here: https://github.com/facebook/android-jsc and is only buildable with Buck out of the box. I also looked to see which version of JSC it was based on. In fetch_sources.sh it grabs: http://builds.nightly.webkit.org/files/trunk/src/WebKit-r174650.tar.bz2 I searched for that version here: https://webkit.org/nightly/archives/ and the timestamp on it is: October 14, 2014 1:09 PM GMT. I would suggest that the dependence of React Native for Android on an 18 month old (and counting) snapshot of JSC should be of some concern to us all. |
I'm continuing to experiment with this off to the side. I find that if I rebuild android-jsc with JIT compilation fully disabled and relink our app with it, it no longer crashes in debug mode on Android. This doesn't necessarily mean that JIT compilation is buggy I guess; it could just be that memory pressure is reduced slightly and/or it perturbs the timing of something enough to hide the problem. FWIW, the published android-jsc seems to use this compile time configuration of JavaScriptCore:
which I think gives us the Baseline JIT only. JSC has layered JIT solutions - see these: https://webkit.org/blog/3362/introducing-the-webkit-ftl-jit/ for example. Anyway, flipping to |
I was able to reproduce it consistently in our project. I get the same crash every time I'm making a call to a server and the response is NOT a 2xx response. It crashes for 4xx, 5xx and so on. However, when I tried to reproduce it in isolation, by creating a new project, the crash would not depend on the server's response. It would solely depend on how many components are being loaded. Also, FWIW, for me, the crash does not happen when I'm connected to the Chrome Debugger. Only happens if I'm not connected, which is bad because it happens in production. |
See my comment here: software-mansion/react-native-svg#38 (comment) |
For me this is still crashing in 0.28. Anyone else has this problem? |
+1 |
Yeah, not sure if this is related to ART for me anymore, but I do have 2 views overlaying one another when this happens, both containing ART code. |
Did anyone find any workaround or solution to this? I am facing the same issue. |
I am seeing the same problems using ReactNativeART on Android. (I am running react-native version 0.34, freshly generated app) I initially followed this tutorial (http://browniefed.com/blog/getting-react-art-running-on-react-native/), and got the example VectorWidget.js (from https://github.com/reactjs/react-art/blob/master/examples/vector-widget/VectorWidget.js) working fine on iOS. On Android however VectorWidget crashes almost immediately. It seems that performing an animation or transform more than about twice per second will crash the app. If I don't perform any animations or transforms it will not crash. This is the error I always see when the app crashes:
Occasionally I will see messages about stopping threads and garbage collection before the crash error:
When starting the app I always see lots of warnings, not sure if they are somehow related:
I am happy to post my application code if that will help. |
+1 I found that we were way more likely to see this issue if we were making a ton of Surfaces (eg. 30+). Though, it's unclear if the high number of Surfaces is the cause or is just increasing the likelihood of any single Surface intermittently crashing. And I found an anecdotal correlation between the crash happening and the js thread fps dropping below 10fps or so, but take that with a grain of salt. |
Do you use images / fresco? Sent from my iPhone
|
This comment in the shouldComponentUpdate() {
return false;
} to all my SVG components. Note this may not help you if you are animating your SVGs. |
After following @fab1an 's comments through a couple of repositories, it seems that this is actually the result of a bug in the fresco library, which React Native uses under the hood to render and animate SVG's - facebook/fresco#1363 (comment) |
I'm experiencing a lot of crashes since upgrading from react native 0.34.0 to 0.35.0 when working with Svg components (using react-native-svg). I've tried doing Also, if I try to narrow it down to a specific component (by removing the others) I can't reproduce the crash with specific components, and it seems like I need to have at least a few of them rendering for the app to crash (some minimum amount of components rendering otherwise it won't crash). If I return to react native 0.34.0 it doesn't seem to happen, or at least I haven't been able to make it crash on 0.34.0 yet. Anybody know of other solutions to this or at least how I can better debug it and get more detailed info from the crash? |
We are experiencing the same problems.
|
I put together a repo that reproduces the crash, just clone and When we run it with JS Dev Mode turned on in an Android emulator, or an older device (Galaxy Nexus) it crashes reliably after 3-20 clicks on the heart. With JS Dev Mode off, my fingers got tired before any crashes. Same on a modern flagship phone with JS Dev Mode on, seemingly no crashes. |
Still getting crashes in the test repo above with RN 0.37 |
+1 RN 0.34.1 |
+1 RN 0.38 |
Same problem here with RN 0.38.0 on Android 5. |
I have fixed this in my |
I threw away the react-native bridge WritableMap/WritableArray, replaced it with using only strings and saw much improved performance: #10504 |
We might have found the cause for this crash, see PR #11804. Can you check whether the proposed fix solves this crash? |
Having the same problem when i render a big amount of svg's. React-Native v0.31
For me adding: android:largeHeap="true" in the application in the AndroidManifest resolve the issue.
|
I'm not rendering anything special but after adding |
I am still meeting with this problem on 0.44.2. Today I upgrade the version of react-native from 0.41.2 to 0.44.2, along with the react module version to 16.0.0-alpha.6. The app runs well at first, but it suddenly starts crashing and can never get started. I have tried set
However, the release app runs well. :( |
+1 |
+1, just got this on |
Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally! If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:
If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution. |
Why is this closed while still happening? |
^^ See my comment. |
@hramos Which one? |
I mean, see the |
Still getting this issue |
Also have this. Using this library. As I see, there is no Animated, just ART |
The issue still persists! Any help would be appreciated. |
still get this issue, I have try 3 diff android emulator, on RN Version: crash logs:
|
This issue is somewhat intermittent, but I have managed to create a minimal example that will crash with some regularity. When the ART library is used to render a component it seems it will cause a crash on Android after it has rendered several times. This issue happens looks to have started with React Native 0.21 and only happens on Android.
Unfortunately the crash happens deep in libc and tracing the cause of the issue has been difficult. The code below reproduces the issue on Android. It will sometimes crash quite quickly (within seconds) and sometimes takes a bit longer (tens of seconds) with an error in the log like:
A/libc: Fatal signal 11 (SIGSEGV), code 2, fault addr 0x9fa40028 in tid 4388 (mqt_js)
I've noticed that when I use a more complex component that contains more ART elements, it crashes more quickly, suggesting a memory issue.
The text was updated successfully, but these errors were encountered: