{"action":"created","issue":{"url":"https://api.github.com/repos/espruino/Espruino/issues/689","labels_url":"https://api.github.com/repos/espruino/Espruino/issues/689/labels{/name}","comments_url":"https://api.github.com/repos/espruino/Espruino/issues/689/comments","events_url":"https://api.github.com/repos/espruino/Espruino/issues/689/events","html_url":"https://github.com/espruino/Espruino/issues/689","id":114407565,"number":689,"title":"wifi.scan() method leads to a memory overflow on ESP8266 board","user":{"login":"yerpj","id":11556895,"avatar_url":"https://avatars.githubusercontent.com/u/11556895?v=3","gravatar_id":"","url":"https://api.github.com/users/yerpj","html_url":"https://github.com/yerpj","followers_url":"https://api.github.com/users/yerpj/followers","following_url":"https://api.github.com/users/yerpj/following{/other_user}","gists_url":"https://api.github.com/users/yerpj/gists{/gist_id}","starred_url":"https://api.github.com/users/yerpj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yerpj/subscriptions","organizations_url":"https://api.github.com/users/yerpj/orgs","repos_url":"https://api.github.com/users/yerpj/repos","events_url":"https://api.github.com/users/yerpj/events{/privacy}","received_events_url":"https://api.github.com/users/yerpj/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/espruino/Espruino/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/espruino/Espruino/labels/ESP8266","name":"ESP8266","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":{"login":"nkolban","id":3421732,"avatar_url":"https://avatars.githubusercontent.com/u/3421732?v=3","gravatar_id":"","url":"https://api.github.com/users/nkolban","html_url":"https://github.com/nkolban","followers_url":"https://api.github.com/users/nkolban/followers","following_url":"https://api.github.com/users/nkolban/following{/other_user}","gists_url":"https://api.github.com/users/nkolban/gists{/gist_id}","starred_url":"https://api.github.com/users/nkolban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nkolban/subscriptions","organizations_url":"https://api.github.com/users/nkolban/orgs","repos_url":"https://api.github.com/users/nkolban/repos","events_url":"https://api.github.com/users/nkolban/events{/privacy}","received_events_url":"https://api.github.com/users/nkolban/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-10-31T12:15:26Z","updated_at":"2015-10-31T17:21:59Z","closed_at":"2015-10-31T17:21:59Z","body":"The scan() method exposed by the 'wifi' module leads to a memory overflow when called 6-7 times successively. The output is \r\n\" ERROR: Out of Memory!\r\nWARNING: Unable to create string as not enough memory\r\nWARNING: Out of memory while appending to array\r\nASSERT(jsvHasChildren(obj)) FAILED AT src/jsvar.c:2135 \" \r\n\r\nThis issue was observed on the ESP8266 port of Espruino. I did not try on the Pico with an ESP8266 bounded as a network interface."},"comment":{"url":"https://api.github.com/repos/espruino/Espruino/issues/comments/152752148","html_url":"https://github.com/espruino/Espruino/issues/689#issuecomment-152752148","issue_url":"https://api.github.com/repos/espruino/Espruino/issues/689","id":152752148,"user":{"login":"nkolban","id":3421732,"avatar_url":"https://avatars.githubusercontent.com/u/3421732?v=3","gravatar_id":"","url":"https://api.github.com/users/nkolban","html_url":"https://github.com/nkolban","followers_url":"https://api.github.com/users/nkolban/followers","following_url":"https://api.github.com/users/nkolban/following{/other_user}","gists_url":"https://api.github.com/users/nkolban/gists{/gist_id}","starred_url":"https://api.github.com/users/nkolban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nkolban/subscriptions","organizations_url":"https://api.github.com/users/nkolban/orgs","repos_url":"https://api.github.com/users/nkolban/repos","events_url":"https://api.github.com/users/nkolban/events{/privacy}","received_events_url":"https://api.github.com/users/nkolban/received_events","type":"User","site_admin":false},"created_at":"2015-10-31T17:21:59Z","updated_at":"2015-10-31T17:21:59Z","body":"It was found that we had failed to execute `jsvUnLock()` against certain variables that had been allocated resulting in a substantial memory leak.  Examination was performed on which variables were not being unlocked and code changes made.  Tests were then conducted to ensure that the memory was released.  A soak test was then run for 30 minutes and the memory utilization remained constant over that period of time.\r\n\r\nThe fixes were committed and pushed."}}