{"action":"closed","issue":{"url":"https://api.github.com/repos/IWPengineering/IWP_Firmware_2.0_Beta/issues/4","labels_url":"https://api.github.com/repos/IWPengineering/IWP_Firmware_2.0_Beta/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/IWPengineering/IWP_Firmware_2.0_Beta/issues/4/comments","events_url":"https://api.github.com/repos/IWPengineering/IWP_Firmware_2.0_Beta/issues/4/events","html_url":"https://github.com/IWPengineering/IWP_Firmware_2.0_Beta/issues/4","id":111202523,"number":4,"title":"Intermittent while-breaks in simulation","user":{"login":"kk1311","id":9094883,"avatar_url":"https://avatars.githubusercontent.com/u/9094883?v=3","gravatar_id":"","url":"https://api.github.com/users/kk1311","html_url":"https://github.com/kk1311","followers_url":"https://api.github.com/users/kk1311/followers","following_url":"https://api.github.com/users/kk1311/following{/other_user}","gists_url":"https://api.github.com/users/kk1311/gists{/gist_id}","starred_url":"https://api.github.com/users/kk1311/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kk1311/subscriptions","organizations_url":"https://api.github.com/users/kk1311/orgs","repos_url":"https://api.github.com/users/kk1311/repos","events_url":"https://api.github.com/users/kk1311/events{/privacy}","received_events_url":"https://api.github.com/users/kk1311/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/IWPengineering/IWP_Firmware_2.0_Beta/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"kk1311","id":9094883,"avatar_url":"https://avatars.githubusercontent.com/u/9094883?v=3","gravatar_id":"","url":"https://api.github.com/users/kk1311","html_url":"https://github.com/kk1311","followers_url":"https://api.github.com/users/kk1311/followers","following_url":"https://api.github.com/users/kk1311/following{/other_user}","gists_url":"https://api.github.com/users/kk1311/gists{/gist_id}","starred_url":"https://api.github.com/users/kk1311/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kk1311/subscriptions","organizations_url":"https://api.github.com/users/kk1311/orgs","repos_url":"https://api.github.com/users/kk1311/repos","events_url":"https://api.github.com/users/kk1311/events{/privacy}","received_events_url":"https://api.github.com/users/kk1311/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-10-13T15:16:37Z","updated_at":"2015-10-19T12:36:27Z","closed_at":"2015-10-19T12:36:27Z","body":"During simulation of the code, I found that when everything is enabled, sometimes the simulator spontaneously resets.\r\n\r\nI think this is probably because I am getting stack overflow errors due to the way the simulator and I2C drivers interact - I2C breaks lockups (which happen, because there are no physical pins in the simulator) by toggling pins, which it can't do, because its in the simulator. The way that the I2C drivers implement this is by recursive calling of break functions, which would normally change pin status bits and break up the problem. However, in the simulator, it doesn't work (the problem doesn't break).\r\n\r\nThis could easily cause stack-overflow errors (and does cause frequent lockups).\r\n\r\nEven though this is probably not a problem, it is probably a good idea to implement another way the code can break out of I2C lockups than just overflowing the stack - if pins don't respond. This should probably be some kind of limit before it just gives up on getting the time, and makes sure to not update the day (so we don't accidentally send a midnight message)."}}