{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/21982","repository_url":"https://api.github.com/repos/facebook/react-native","labels_url":"https://api.github.com/repos/facebook/react-native/issues/21982/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/21982/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/21982/events","html_url":"https://github.com/facebook/react-native/issues/21982","id":374777946,"node_id":"MDU6SXNzdWUzNzQ3Nzc5NDY=","number":21982,"title":"Crash on Android using Image component","user":{"login":"alacret","id":918895,"node_id":"MDQ6VXNlcjkxODg5NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/918895?v=4","gravatar_id":"","url":"https://api.github.com/users/alacret","html_url":"https://github.com/alacret","followers_url":"https://api.github.com/users/alacret/followers","following_url":"https://api.github.com/users/alacret/following{/other_user}","gists_url":"https://api.github.com/users/alacret/gists{/gist_id}","starred_url":"https://api.github.com/users/alacret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alacret/subscriptions","organizations_url":"https://api.github.com/users/alacret/orgs","repos_url":"https://api.github.com/users/alacret/repos","events_url":"https://api.github.com/users/alacret/events{/privacy}","received_events_url":"https://api.github.com/users/alacret/received_events","type":"User","site_admin":false},"labels":[{"id":1056126664,"node_id":"MDU6TGFiZWwxMDU2MTI2NjY0","url":"https://api.github.com/repos/facebook/react-native/labels/%F0%9F%94%B6Components","name":"🔶Components","color":"fef2c0","default":false},{"id":870851515,"node_id":"MDU6TGFiZWw4NzA4NTE1MTU=","url":"https://api.github.com/repos/facebook/react-native/labels/%F0%9F%94%B7Android","name":"🔷Android","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-10-28T17:30:51Z","updated_at":"2018-12-18T03:05:23Z","closed_at":null,"author_association":"NONE","body":"<!-- Requirements: please go through this checklist before opening a new issue -->\r\n  - [ X ] Review the documentation: https://facebook.github.io/react-native\r\n  - [ X ] Search for existing issues: https://github.com/facebook/react-native/issues\r\n  - [ X ] Use the latest React Native release: https://github.com/facebook/react-native/releases\r\n\r\n## Environment\r\n```\r\n  React Native Environment Info:\r\n    System:\r\n      OS: macOS 10.14.1\r\n      CPU: x64 Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz\r\n      Memory: 59.21 MB / 16.00 GB\r\n      Shell: 2.7.0 - /usr/local/bin/fish\r\n    Binaries:\r\n      Node: 9.7.1 - /usr/local/bin/node\r\n      Yarn: 1.5.1 - /usr/local/bin/yarn\r\n      npm: 6.4.1 - /usr/local/bin/npm\r\n      Watchman: 4.9.0 - /usr/local/bin/watchman\r\n    SDKs:\r\n      iOS SDK:\r\n        Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0\r\n    IDEs:\r\n      Android Studio: 3.2 AI-181.5540.7.32.5014246\r\n      Xcode: 10.0/10A255 - /usr/bin/xcodebuild\r\n    npmPackages:\r\n      react: 16.4.1 => 16.4.1 \r\n      react-native: ^0.57.2 => 0.57.2 \r\n    npmGlobalPackages:\r\n      create-react-native-app: 1.0.0\r\n      react-native-cli: 2.0.1\r\n```\r\n\r\n## Description\r\nWhen loading more than 9 `Image` containers from URLS the App crashes on Android.\r\n\r\nI have a chat list, with the JSX that look lite this:\r\n\r\n```\r\n        return (\r\n            <ScrollView style={styles.viewContainer}\r\n                        keyboardDismissMode={\"on-drag\"}\r\n                        keyboardShouldPersistTaps={\"always\"}\r\n            >\r\n                {this.state.chats.map((item, i) =>\r\n                    <TouchableOpacity key={i} onPress={() => this.showChat(item.id, item.id_user, item.user)}>\r\n                        <View style={styles.viewMsg}>\r\n                            <Img style={styles.imgProfileItem}\r\n                                   src={item.image_profile}\r\n                            />\r\n                            <View style={styles.viewTexts}>\r\n                                <Text style={styles.textUser}>{item.user}</Text>\r\n                                <Text\r\n                                    style={styles.textChat}>{item.message ? item.message : strings('chat.write')}</Text>\r\n                            </View>\r\n                        </View>\r\n                    </TouchableOpacity>\r\n                )}\r\n            </ScrollView>\r\n        );\r\n```\r\n\r\n\r\n\r\nWhen the API returns more than 9 results for the chat list the App crashes when i scroll to the bottom. \r\n The crash it's not instantenuos: \r\n\r\nI) I scroll down\r\nII) All the images are there showing properly\r\nIII) 3-4 seconds later the app crashes\r\n\r\nThe reason why i say 9, it's because i try slicing the list of data from 1 and up until start to crash.\r\n\r\nHere i sliced the results until 9 elements and it works fine, if i put one more element then the crash happends:\r\n\r\n![screenshot_20181029-012514](https://user-images.githubusercontent.com/918895/47619489-a2cbc880-dab5-11e8-884e-2a59abe48931.png)\r\n![screenshot_20181029-012520](https://user-images.githubusercontent.com/918895/47619490-a52e2280-dab5-11e8-807b-72d2c631b1f8.png)\r\n\r\n\r\nA test that i'm making for an specific user brings 14 results, so:\r\n\r\n- If i remove the `Image` component it works fine without the crash.\r\n- I test this with the 0.57.1 release and then again with the 0.57.4 release, with the same result\r\n- i try to use the FlatList first, then when started to crash, i switch to the Scroll View with a .map implementation but still makes the crash\r\n- I try removeing the Touchable also, the same result\r\n- I try using different images urls and the same result\r\n- I try using one single image URL for all the elements of the list and it works fine, so one assumption that i'm making is that the crashes happens when in the screen there is more than 9 `Image` components loading with different Urls\r\n- When i was trying the 9 chats limit, i change the order of the images urls, and change them for some other images urls in different scenarios to make sure that it wasn't one the images that it was causing the crash.\r\n- I try creating a component that transforms the URL into a base64 string, so i start using that component with the same result, when i put 8 or less elements it works fine, but from 9 and more start crashing\r\n\r\nI can't really see a crash in the Android logcat. I will post here the errors messagues that i can spot around the moment of the crash.\r\n\r\nAndroid logcat with the filters:  `weed*|react*|exception* ` (`weed` is part of the bundle name)\r\n\r\n```\r\n10-29 01:19:19.128 232-7587/? I/BufferQueueProducer: [co.fourgeeks.weedmatch/co.fourgeeks.weedmatch.MainActivity](this:0xb28c3c00,id:35,api:1,p:10869,c:232) queueBuffer: fps=27.39 dur=1131.83 max=138.69 min=13.99\r\n10-29 01:19:19.568 10869-10869/co.fourgeeks.weedmatch D/ViewRootImpl: ViewPostImeInputStage processPointer 0\r\n10-29 01:19:19.688 10869-10869/co.fourgeeks.weedmatch D/ViewRootImpl: ViewPostImeInputStage processPointer 1\r\n10-29 01:19:19.728 2122-2417/? E/ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ id=14, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ]\r\n10-29 01:19:19.928 2122-2122/? W/InputMethodManagerService: Session failed to close due to remote exception\r\n    android.os.DeadObjectException\r\n        at android.os.BinderProxy.transactNative(Native Method)\r\n        at android.os.BinderProxy.transact(Binder.java:503)\r\n        at com.android.internal.view.IInputMethodSession$Stub$Proxy.finishSession(IInputMethodSession.java:327)\r\n        at com.android.server.InputMethodManagerService.finishSessionLocked(InputMethodManagerService.java:2498)\r\n        at com.android.server.InputMethodManagerService.clearClientSessionLocked(InputMethodManagerService.java:2489)\r\n        at com.android.server.InputMethodManagerService.clearCurMethodLocked(InputMethodManagerService.java:2515)\r\n        at com.android.server.InputMethodManagerService.onServiceDisconnected(InputMethodManagerService.java:2534)\r\n        at android.app.LoadedApk$ServiceDispatcher.doDeath(LoadedApk.java:1349)\r\n        at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1363)\r\n        at android.os.Handler.handleCallback(Handler.java:739)\r\n        at android.os.Handler.dispatchMessage(Handler.java:95)\r\n        at android.os.Looper.loop(Looper.java:148)\r\n        at com.android.server.SystemServer.run(SystemServer.java:536)\r\n        at com.android.server.SystemServer.main(SystemServer.java:385)\r\n        at java.lang.reflect.Method.invoke(Native Method)\r\n        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)\r\n        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)\r\n10-29 01:19:20.088 2122-2980/? W/ActivityManager: Exception when unbinding service com.samsung.android.beaconmanager/.BeaconService\r\n    android.os.DeadObjectException\r\n        at android.os.BinderProxy.transactNative(Native Method)\r\n        at android.os.BinderProxy.transact(Binder.java:503)\r\n        at android.app.ApplicationThreadProxy.scheduleUnbindService(ApplicationThreadNative.java:1273)\r\n        at com.android.server.am.ActiveServices.removeConnectionLocked(ActiveServices.java:2194)\r\n        at com.android.server.am.ActiveServices.killServicesLocked(ActiveServices.java:2557)\r\n        at com.android.server.am.ActivityManagerService.cleanUpApplicationRecordLocked(ActivityManagerService.java:22342)\r\n        at com.android.server.am.ActivityManagerService.handleAppDiedLocked(ActivityManagerService.java:7697)\r\n        at com.android.server.am.ActivityManagerService.appDiedLocked(ActivityManagerService.java:7942)\r\n        at com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied(ActivityManagerService.java:1945)\r\n        at android.os.BinderProxy.sendDeathNotice(Binder.java:558)\r\n10-29 01:19:20.098 2122-2417/? E/ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ id=12, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ]\r\n10-29 01:19:20.158 232-253/? I/BufferQueueProducer: [co.fourgeeks.weedmatch/co.fourgeeks.weedmatch.MainActivity](this:0xb28c3c00,id:35,api:1,p:10869,c:232) queueBuffer: fps=7.82 dur=1023.59 max=175.49 min=90.38\r\n10-29 01:19:20.328 10869-10923/co.fourgeeks.weedmatch D/libc-netbsd: [getaddrinfo]: netid=0; mark=0\r\n10-29 01:19:20.338 10869-10923/co.fourgeeks.weedmatch D/libc-netbsd: [getaddrinfo]: ai_addrlen=0; ai_canonname=(null); ai_flags=4; ai_family=0\r\n10-29 01:19:20.358 10869-11646/co.fourgeeks.weedmatch D/libc-netbsd: [getaddrinfo]: netid=0; mark=0\r\n10-29 01:19:20.358 10869-11646/co.fourgeeks.weedmatch D/libc-netbsd: [getaddrinfo]: ai_addrlen=0; ai_canonname=(null); ai_flags=4; ai_family=0\r\n10-29 01:19:20.468 10869-11646/co.fourgeeks.weedmatch D/libc-netbsd: [getaddrinfo]: netid=0; mark=0\r\n10-29 01:19:20.468 10869-10923/co.fourgeeks.weedmatch D/libc-netbsd: [getaddrinfo]: netid=0; mark=0\r\n10-29 01:19:20.468 10869-11646/co.fourgeeks.weedmatch D/libc-netbsd: [getaddrinfo]: ai_addrlen=0; ai_canonname=(null); ai_flags=1024; ai_family=0\r\n10-29 01:19:20.468 10869-10923/co.fourgeeks.weedmatch D/libc-netbsd: [getaddrinfo]: ai_addrlen=0; ai_canonname=(null); ai_flags=1024; ai_family=0\r\n10-29 01:19:20.838 2122-2159/? D/SyncManager: failed sync operation alacret@gmail.com u0 (com.google), com.android.contacts, PERIODIC, currentRunTime 101525, reason: Periodic, SyncResult: stats [ numIoExceptions: 1]\r\n10-29 01:19:20.948 232-253/? I/BufferQueueProducer: [co.fourgeeks.weedmatch/co.fourgeeks.weedmatch.MainActivity](this:0xb28c3c00,id:35,api:1,p:-1,c:232) disconnect(P): api 1\r\n10-29 01:19:20.948 232-253/? I/BufferQueueConsumer: [co.fourgeeks.weedmatch/co.fourgeeks.weedmatch.MainActivity](this:0xb28c3c00,id:35,api:1,p:-1,c:232) getReleasedBuffers: returning mask 0xffffffffffffffff\r\n10-29 01:19:20.948 2122-7142/? I/ActivityManager: Process co.fourgeeks.weedmatch (pid 10869)(adj 0) has died(103,58)\r\n10-29 01:19:20.948 2122-7142/? D/ActivityManager: removeProcessNameLocked mProcessNames.remove pid=10869 ,hash=189510471 ,name=co.fourgeeks.weedmatch\r\n10-29 01:19:20.958 2122-2514/? I/WindowState: WIN DEATH: Window{b097f07 u0 d0 p10869 co.fourgeeks.weedmatch/co.fourgeeks.weedmatch.MainActivity}\r\n10-29 01:19:20.988 2122-2417/? E/ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ id=17, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ]\r\n10-29 01:19:20.988 232-232/? I/BufferQueueConsumer: [co.fourgeeks.weedmatch/co.fourgeeks.weedmatch.MainActivity](this:0xb28c3c00,id:35,api:1,p:-1,c:-1) disconnect(C)\r\n10-29 01:19:21.008 232-251/? I/BufferQueue: [co.fourgeeks.weedmatch/co.fourgeeks.weedmatch.MainActivity](this:0xb28c3c00,id:35,api:1,p:-1,c:-1) ~BufferQueueCore\r\n10-29 01:19:21.018 2122-7142/? W/ActivityManager: Force removing ActivityRecord{27be544 u0 co.fourgeeks.weedmatch/.MainActivity t212}: app died, no saved state\r\n10-29 01:19:21.338 2122-2132/? I/art: Background sticky concurrent mark sweep GC freed 31596(1950KB) AllocSpace objects, 7(140KB) LOS objects, 6% free, 34MB/36MB, paused 7.176ms total 207.547ms\r\n10-29 01:19:22.618 2122-2560/? D/PackageManager: getComponentMetadataForIconTray : co.fourgeeks.weedmatch.MainActivity does not exist in mServices\r\n10-29 01:19:22.618 2122-2560/? D/PackageManager: getComponentMetadataForIconTray : co.fourgeeks.weedmatch.MainActivity does not exist in mProviders\r\n10-29 01:19:22.618 2122-2560/? D/PackageManager: getComponentMetadataForIconTray : co.fourgeeks.weedmatch.MainActivity does not exist in mReceivers\r\n10-29 01:19:22.628 11649-11649/? I/ApplicationPackageManager: load=co.fourgeeks.weedmatch, bg=72-72, dr=72-72, forDefault=true\r\n10-29 01:19:22.848 11664-11664/? W/System.err: android.content.pm.PackageManager$NameNotFoundException: com.samsung.helphub\r\n10-29 01:19:22.938 2122-2132/? I/art: Background partial concurrent mark sweep GC freed 66019(3MB) AllocSpace objects, 5(96KB) LOS objects, 11% free, 31MB/35MB, paused 2.842ms total 268.921ms\r\n10-29 01:19:23.068 2122-2122/? E/AppWidgetServiceImpl: Dead host : HostId{user:0, app:10006, hostId:2037, pkg:com.sec.android.app.easylauncher}\r\n    android.os.DeadObjectException\r\n        at android.os.BinderProxy.transactNative(Native Method)\r\n        at android.os.BinderProxy.transact(Binder.java:503)\r\n        at com.android.internal.appwidget.IAppWidgetHost$Stub$Proxy.updateAppWidget(IAppWidgetHost.java:123)\r\n        at com.android.server.appwidget.AppWidgetServiceImpl.handleNotifyUpdateAppWidget(AppWidgetServiceImpl.java:1863)\r\n        at com.android.server.appwidget.AppWidgetServiceImpl.access$1500(AppWidgetServiceImpl.java:135)\r\n        at com.android.server.appwidget.AppWidgetServiceImpl$CallbackHandler.handleMessage(AppWidgetServiceImpl.java:3644)\r\n        at android.os.Handler.dispatchMessage(Handler.java:102)\r\n        at android.os.Looper.loop(Looper.java:148)\r\n        at com.android.server.SystemServer.run(SystemServer.java:536)\r\n        at com.android.server.SystemServer.main(SystemServer.java:385)\r\n        at java.lang.reflect.Method.invoke(Native Method)\r\n        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)\r\n        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)\r\n```\r\n\r\n## Reproducible Demo\r\nThe error happends with this renders:\r\n\r\n```\r\n        return (\r\n                    <View style={styles.viewContainer}>\r\n                        <FlatList\r\n                            horizontal={false}\r\n                            keyExtractor={(item, index) => index.toString()}\r\n                            data={this.state.chats}\r\n                            renderItem={({item}) =>\r\n                                <TouchableOpacity onPress={() => this.showChat(item.id, item.id_user, item.user)}>\r\n                                    <View style={styles.viewMsg}>\r\n                                        <Image style={styles.imgProfileItem}\r\n                                               source={{uri: item.image_profile}}\r\n                                        />\r\n                                        <View style={styles.viewTexts}>\r\n                                            <Text style={styles.textUser}>{item.user}</Text>\r\n                                            <Text\r\n                                                style={styles.textChat}>{item.message ? item.message : strings('chat.write')}</Text>\r\n                                        </View>\r\n                                    </View>\r\n                                </TouchableOpacity>\r\n                            }\r\n                        />\r\n                    </View>\r\n                );\r\n```\r\n\r\nAlso with the code at the beginning of the issue.\r\n\r\nI'm tyring this set of images, but i've test different ones too and also this ones in different order, when i put more than 9 elements the crash happends\r\n\r\n```\r\n        const imgUrl = [\r\n            \"https://weedmatch-mobile.sfo2.digitaloceanspaces.com/mobile/users/profile/113/140/113-riverax2_771-2018-10-09_124817.jpg\",\r\n            \"https://weedmatch-mobile.sfo2.digitaloceanspaces.com/mobile/users/profile/128/163/128-eduardo.calfunao_818-2018-10-09_144438.jpg\",\r\n            \"https://weedmatch-mobile.sfo2.digitaloceanspaces.com/mobile/users/profile/155/217/155-prog__guitar_019-2018-10-11_155842.jpeg\",\r\n            \"https://weedmatch-mobile.sfo2.digitaloceanspaces.com/mobile/users/profile/133/172/133-ignacio.r.munizaga_753-2018-10-09_170437.jpg\",\r\n            \"https://weedmatch-mobile.sfo2.digitaloceanspaces.com/mobile/users/profile/196/265/196-Pablo_cab-2018-10-15_161652.jpg\",\r\n            \"https://weedmatch-mobile.sfo2.digitaloceanspaces.com/mobile/users/profile/204/276/204-matyfreestyle1_937-2018-10-15_171927.jpg\",\r\n            \"https://weedmatch-mobile.sfo2.digitaloceanspaces.com/mobile/users/profile/204/276/204-matyfreestyle1_937-2018-10-15_171927.jpg\",\r\n            \"https://weedmatch-mobile.sfo2.digitaloceanspaces.com/mobile/users/profile/293/373/293-jhoshuavalenzuelareyes-2018-10-26_013009.jpeg\",\r\n            \"https://weedmatch-mobile.sfo2.digitaloceanspaces.com/mobile/users/profile/294/374/294-josebarboza-2018-10-26_030755.jpg\",\r\n            \"https://weedmatch-mobile.sfo2.digitaloceanspaces.com/mobile/users/profile/120/151/120-eiroumea_355-2018-10-09_134239.jpg\",\r\n            \"https://weedmatch-mobile.sfo2.digitaloceanspaces.com/mobile/users/profile/192/256/192-sergiovalpo90_557-2018-10-13_174522.jpg\",\r\n            \"https://weedmatch-mobile.sfo2.digitaloceanspaces.com/mobile/users/profile/114/141/114-manzorfranco87_181-2018-10-09_125143.jpeg\",\r\n            \"https://weedmatch-mobile.sfo2.digitaloceanspaces.com/mobile/users/profile/115/142/115-oscarlz.chile_669-2018-10-09_125530.jpg\",\r\n            \"https://weedmatch-mobile.sfo2.digitaloceanspaces.com/mobile/users/profile/129/164/129-fico91_020-2018-10-09_144833.jpg\",\r\n            \"https://weedmatch-mobile.sfo2.digitaloceanspaces.com/mobile/users/profile/95/121/95-e.diazgodoy_221-2018-10-08_191633.jpg\"\r\n        ];\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/448080241","html_url":"https://github.com/facebook/react-native/issues/21982#issuecomment-448080241","issue_url":"https://api.github.com/repos/facebook/react-native/issues/21982","id":448080241,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0ODA4MDI0MQ==","user":{"login":"sunnylqm","id":615282,"node_id":"MDQ6VXNlcjYxNTI4Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/615282?v=4","gravatar_id":"","url":"https://api.github.com/users/sunnylqm","html_url":"https://github.com/sunnylqm","followers_url":"https://api.github.com/users/sunnylqm/followers","following_url":"https://api.github.com/users/sunnylqm/following{/other_user}","gists_url":"https://api.github.com/users/sunnylqm/gists{/gist_id}","starred_url":"https://api.github.com/users/sunnylqm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunnylqm/subscriptions","organizations_url":"https://api.github.com/users/sunnylqm/orgs","repos_url":"https://api.github.com/users/sunnylqm/repos","events_url":"https://api.github.com/users/sunnylqm/events{/privacy}","received_events_url":"https://api.github.com/users/sunnylqm/received_events","type":"User","site_admin":false},"created_at":"2018-12-18T03:05:23Z","updated_at":"2018-12-18T03:05:23Z","author_association":"CONTRIBUTOR","body":"Try different `resizeMethod` options https://facebook.github.io/react-native/docs/image#resizemethod This may impact a lot on android"}}
{"actor":{"display_login":"sunnylqm"}}