{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/6760","repository_url":"https://api.github.com/repos/facebook/react-native","labels_url":"https://api.github.com/repos/facebook/react-native/issues/6760/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/6760/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/6760/events","html_url":"https://github.com/facebook/react-native/issues/6760","id":145183066,"number":6760,"title":"SIGSEGV crash with ART library on Android","user":{"login":"mpatric","id":292417,"avatar_url":"https://avatars.githubusercontent.com/u/292417?v=3","gravatar_id":"","url":"https://api.github.com/users/mpatric","html_url":"https://github.com/mpatric","followers_url":"https://api.github.com/users/mpatric/followers","following_url":"https://api.github.com/users/mpatric/following{/other_user}","gists_url":"https://api.github.com/users/mpatric/gists{/gist_id}","starred_url":"https://api.github.com/users/mpatric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpatric/subscriptions","organizations_url":"https://api.github.com/users/mpatric/orgs","repos_url":"https://api.github.com/users/mpatric/repos","events_url":"https://api.github.com/users/mpatric/events{/privacy}","received_events_url":"https://api.github.com/users/mpatric/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/react-native/labels/Android","name":"Android","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-04-01T13:39:06Z","updated_at":"2016-05-11T03:33:57Z","closed_at":null,"body":"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.\r\n\r\nUnfortunately 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:\r\n\r\nA/libc: Fatal signal 11 (SIGSEGV), code 2, fault addr 0x9fa40028 in tid 4388 (mqt_js)\r\n\r\n```js\r\nimport React, { Text, View } from 'react-native';\r\nconst { Surface, Group, Shape } = React.ART;\r\n\r\nconst Smiley = React.createClass({\r\n  render() {\r\n    return (\r\n      <Surface width={32} height={32}>\r\n        <Group scaleX={1} scaleY={1} rotation={this.props.rotation} originX={16} originY={16} opacity={this.props.opacity}>\r\n          <Group>\r\n            <Shape fill=\"#222\" d=\"M16 .004 c-8.837 0 -16 7.164 -16 16 0 8.837 7.163 16 16 16 s16 -7.163 16 -16 c0 -8.836 -7.163 -16 -16 -16 z m0 29 c-7.16 0 -12.985 -5.832 -12.985 -13 s5.825 -13 12.985 -13 c7.16 0 12.985 5.832 12.985 13 s-5.825 13 -12.985 13 z\"/>\r\n            <Shape fill=\"#222\" d=\"M7.932 12.77 A2.513 2.5 0 1 0 12.958 12.77 A2.513 2.5 0 1 0 7.932 12.77 z\"/>\r\n            <Shape fill=\"#222\" d=\"M18.872 12.77 A2.513 2.5 0 1 0 23.898000000000003 12.77 A2.513 2.5 0 1 0 18.872 12.77 z\"/>\r\n            <Shape fill=\"#222\" d=\"M24.054 18.39 a1.006 1.006 0 0 0 -.85 .01 c-.005 .004 -.01 .003 -.015 .006 l-.98 .506 c-.62 .278 -1.4 .664 -2.43 .992 -1.04 .328 -2.53 .503 -4.09 .575 -1.56 -.08 -3.05 -.25 -4.09 -.58 -1.04 -.33 -1.82 -.72 -2.43 -.99 l-.97 -.51 -.02 -.01 a1 1 0 0 0 -.85 -.01 .992 .992 0 0 0 -.5 1.32 c1.59 3.502 4.93 5.79 8.58 5.946 .05 .01 .5 .01 .552 0 3.65 -.16 6.99 -2.444 8.582 -5.946 a1 1 0 0 0 -.503 -1.322 z\"/>\r\n          </Group>\r\n        </Group>\r\n      </Surface>\r\n    );\r\n  },\r\n});\r\n\r\nclass CrashTestDummy extends React.Component {\r\n  constructor(props) {\r\n    super(props);\r\n    this.state = {\r\n      count: 0,\r\n    };\r\n  }\r\n\r\n  componentDidMount() {\r\n    setInterval(() => { this.state && this.setState({count: this.state.count + 1}) }, 20);\r\n  }\r\n\r\n  render() {\r\n    return (\r\n      <View style={{flex: 1, justifyContent: \"center\", alignItems: \"center\"}}>\r\n        <Text>\r\n          Count: {this.state.count}\r\n        </Text>\r\n        <Smiley/>\r\n      </View>\r\n    );\r\n  }\r\n}\r\n\r\nReact.AppRegistry.registerComponent('CrashTestDummy', () => CrashTestDummy);\r\n```\r\n\r\nI've noticed that when I use a more complex component that contains more ART elements, it crashes more quickly, suggesting a memory issue.\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/218353211","html_url":"https://github.com/facebook/react-native/issues/6760#issuecomment-218353211","issue_url":"https://api.github.com/repos/facebook/react-native/issues/6760","id":218353211,"user":{"login":"kevinejohn","id":355490,"avatar_url":"https://avatars.githubusercontent.com/u/355490?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinejohn","html_url":"https://github.com/kevinejohn","followers_url":"https://api.github.com/users/kevinejohn/followers","following_url":"https://api.github.com/users/kevinejohn/following{/other_user}","gists_url":"https://api.github.com/users/kevinejohn/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinejohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinejohn/subscriptions","organizations_url":"https://api.github.com/users/kevinejohn/orgs","repos_url":"https://api.github.com/users/kevinejohn/repos","events_url":"https://api.github.com/users/kevinejohn/events{/privacy}","received_events_url":"https://api.github.com/users/kevinejohn/received_events","type":"User","site_admin":false},"created_at":"2016-05-11T03:33:57Z","updated_at":"2016-05-11T03:33:57Z","body":"+1"}}