{"action":"created","issue":{"url":"https://api.github.com/repos/NativeScript/NativeScript/issues/2227","repository_url":"https://api.github.com/repos/NativeScript/NativeScript","labels_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/2227/labels{/name}","comments_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/2227/comments","events_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/2227/events","html_url":"https://github.com/NativeScript/NativeScript/issues/2227","id":157860678,"number":2227,"title":"error while scrolling in listview","user":{"login":"cinder92","id":4725556,"avatar_url":"https://avatars.githubusercontent.com/u/4725556?v=3","gravatar_id":"","url":"https://api.github.com/users/cinder92","html_url":"https://github.com/cinder92","followers_url":"https://api.github.com/users/cinder92/followers","following_url":"https://api.github.com/users/cinder92/following{/other_user}","gists_url":"https://api.github.com/users/cinder92/gists{/gist_id}","starred_url":"https://api.github.com/users/cinder92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cinder92/subscriptions","organizations_url":"https://api.github.com/users/cinder92/orgs","repos_url":"https://api.github.com/users/cinder92/repos","events_url":"https://api.github.com/users/cinder92/events{/privacy}","received_events_url":"https://api.github.com/users/cinder92/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-01T09:22:54Z","updated_at":"2016-06-01T09:29:32Z","closed_at":null,"body":"### Did you verify this is a real problem by searching [Stack Overflow]\r\nyep, nothing found\r\n### Tell us about the problem\r\nmy app crashes when im scrolling in listview up and down\r\n### Which platform(s) does your issue occur on?\r\nAndroid\r\n\r\n### Please provide the following version numbers that your issue occurs with:\r\n- CLI: 2.01\r\n- Cross-platform modules: 2.0.1\r\n- Runtime(s): 2.0.0\r\n- Plugin(s): 2.0.2\r\n### Please tell us how to recreate the issue in as much detail as possible.\r\n\r\ncopy this main.xml\r\n\r\n```\r\n<TabView id=\"noticiasList\" tabsBackgroundColor=\"#6a0244\" selectedColor=\"#3E0529\" height=\"100%\" width=\"100%\" zIndex=\"1\">\r\n\t\t   <TabView.items >\r\n\t\t     <TabViewItem title=\"Noticias\">\r\n\t\t       <TabViewItem.view>\r\n\t\t     \r\n\t\t\t\t\t<GridLayout columns=\"*\">\r\n\t\t\t\t\t  <ListView items=\"{{ postsList }}\" itemTap=\"viewPost\" id=\"postsList\" cssClass=\"listview\">\r\n\t\t\t\t\t    <ListView.itemTemplate>\r\n\t\t\t\t\t      <GridLayout columns=\"100, *, 30\" rows=\"*\" cssClass=\"item item-thumbnail\">\r\n\t\t\t\t\t        <Image src=\"{{img}}\" col=\"0\" />\r\n\t\t\t\t\t        <!--<i:ImageCacheIt stretch=\"aspectFit\"  centerCrop=\"false\" resize=\"150,125\" placeHolder=\"~/assets/images/ph.png\" errorHolder=\"~/assets/images/broken.png\" imageUri=\"{{img}}\" col=\"0\"/>-->\r\n\r\n\t\t\t\t\t        <StackLayout col=\"1\">\r\n\t\t\t\t\t          <Label text=\"{{title}}\" cssClass=\"h2\" col=\"1\"/>\r\n\t\t\t\t\t          <Label text=\"{{date}}\" cssClass=\"p\" col=\"1\"/>\r\n\t\t\t\t\t        </StackLayout>\r\n\t\t\t\t\t        <Label cssClass=\"fa\" text=\"{{'fa-chevron-right' | fonticon}}\" col=\"3\" verticalAlignment=\"center\" horizontalAlignment=\"center\" />\r\n\t\t\t\t\t      </GridLayout>\r\n\t\t\t\t\t    </ListView.itemTemplate>\r\n\t\t\t\t\t  </ListView>\r\n\t\t\t\t\t</GridLayout>\r\n\r\n\t\t       </TabViewItem.view>\r\n\t\t     </TabViewItem>\r\n\t\t     \r\n\t\t   </TabView.items>\r\n\t\t </TabView>\r\n```\r\n\r\ncopy this view-model\r\n\r\n```\r\nvar config = require(\"../../shared/config\");\r\nvar fetchModule = require(\"fetch\");\r\nvar ObservableArray = require(\"data/observable-array\").ObservableArray;\r\n\r\nfunction Noticias(items) {\r\n\r\n\tvar viewModel = new ObservableArray(items);\r\n\r\n    viewModel.get = function() {\r\n        return fetch(config.apiUrl + '?action=getNoticias&paged=15', {\r\n            method: \"GET\",\r\n            headers: {\r\n                \"Content-Type\": \"application/json\"\r\n            }\r\n        }).then(handleErrors)\r\n        .then(function(response){\r\n        \treturn response.json()\r\n        })\r\n        .then(function(data){\r\n            \r\n            \r\n\t\t\tdata.forEach(function(noticia){\r\n \r\n    \t\t\tviewModel.push({\r\n    \t\t\t\tid : noticia.id,\r\n    \t\t\t\ttitle : noticia.titulo,\r\n    \t\t\t\timg : noticia.image,\r\n    \t\t\t\tdate : noticia.fecha,\r\n    \t\t\t\tlink : noticia.link,\r\n    \t\t\t\tcontent : noticia.content\r\n    \t\t\t})\r\n\r\n    \t\t})\r\n\r\n            \r\n        })\r\n    };\r\n\r\n    viewModel.empty = function(){\r\n    \twhile(viewModel.length){\r\n    \t\tviewModel.pop()\r\n    \t}\r\n    }\r\n    \r\n\r\n    return viewModel;\r\n}\r\n\r\nfunction handleErrors(response) {\r\n    if (!response.ok) {\r\n        console.log(JSON.stringify(response));\r\n        throw Error(response.statusText);\r\n    }\r\n    return response;\r\n}\r\n\r\nmodule.exports = Noticias;\r\n```\r\n\r\nand then scroll up and down around the list, you must receive this issue\r\n\r\n![screenshot_2016-06-01-04-14-14](https://cloud.githubusercontent.com/assets/4725556/15704468/79b902ba-27b0-11e6-88e4-192b0a10349d.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/NativeScript/NativeScript/issues/comments/222940714","html_url":"https://github.com/NativeScript/NativeScript/issues/2227#issuecomment-222940714","issue_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/2227","id":222940714,"user":{"login":"hshristov","id":5966717,"avatar_url":"https://avatars.githubusercontent.com/u/5966717?v=3","gravatar_id":"","url":"https://api.github.com/users/hshristov","html_url":"https://github.com/hshristov","followers_url":"https://api.github.com/users/hshristov/followers","following_url":"https://api.github.com/users/hshristov/following{/other_user}","gists_url":"https://api.github.com/users/hshristov/gists{/gist_id}","starred_url":"https://api.github.com/users/hshristov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hshristov/subscriptions","organizations_url":"https://api.github.com/users/hshristov/orgs","repos_url":"https://api.github.com/users/hshristov/repos","events_url":"https://api.github.com/users/hshristov/events{/privacy}","received_events_url":"https://api.github.com/users/hshristov/received_events","type":"User","site_admin":false},"created_at":"2016-06-01T09:29:32Z","updated_at":"2016-06-01T09:29:32Z","body":"It seems you are loading some big images and you get `OutOfMemory` exception.\r\nYou could try loading smaller images."}}
{"actor":{"display_login":"hshristov"}}