{"action":"created","issue":{"url":"https://api.github.com/repos/arduino/Arduino/issues/2908","labels_url":"https://api.github.com/repos/arduino/Arduino/issues/2908/labels{/name}","comments_url":"https://api.github.com/repos/arduino/Arduino/issues/2908/comments","events_url":"https://api.github.com/repos/arduino/Arduino/issues/2908/events","html_url":"https://github.com/arduino/Arduino/issues/2908","id":66328596,"number":2908,"title":"LAST printf always missing ? ","user":{"login":"VaclavSal","id":6053260,"avatar_url":"https://avatars.githubusercontent.com/u/6053260?v=3","gravatar_id":"","url":"https://api.github.com/users/VaclavSal","html_url":"https://github.com/VaclavSal","followers_url":"https://api.github.com/users/VaclavSal/followers","following_url":"https://api.github.com/users/VaclavSal/following{/other_user}","gists_url":"https://api.github.com/users/VaclavSal/gists{/gist_id}","starred_url":"https://api.github.com/users/VaclavSal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VaclavSal/subscriptions","organizations_url":"https://api.github.com/users/VaclavSal/orgs","repos_url":"https://api.github.com/users/VaclavSal/repos","events_url":"https://api.github.com/users/VaclavSal/events{/privacy}","received_events_url":"https://api.github.com/users/VaclavSal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-04T15:01:30Z","updated_at":"2015-04-04T15:45:44Z","closed_at":null,"body":"Have been running 1.6.0 Nov build on Due and just noticed this. \r\nI am reluctant to \"upgrade\" to 1.6.3 \"just because\"  since 1.6.0 works for me so far.\r\nI can hack this problem by duplicating the last printf lines but would like to know what COULD be the real cause of this. \r\n\r\nHere is a simple test of printf and its output \r\nThe problem is - LAST printf is always missing from monitor output.\r\n\r\n1. Number of for iterations makes no difference\r\n2. monitor baud rate makes no difference \r\n3. removing the \"count blank \" line will make the previous  for loop miss the past printf.\r\n\r\n\r\n#define DEBUG \r\n\r\n[code]void setup() {\r\n  // put your setup code here, to run once:\r\n  //Serial.begin(115200);\r\n  Serial.begin(9600); \r\n \r\n  delay(1000);\r\n\r\n  for (int i = 0; i <= 5; i++)\r\n    printf(\"\\n Count %i \", i);\r\n#ifdef DEBUG\r\n  for (int i = 0; i <= 5; i++)\r\n    printf(\"\\n Count %i \", i);\r\n#endif\r\n  for (int i = 0; i <= 5; i++)\r\n    printf(\"\\n Count %i \", i);\r\n\r\n  printf(\"\\n Count blank \");   // missing from output \r\n}\r\n[/code]\r\n\r\n\r\n\r\nSample code \r\n\r\n Count 0 \r\n Count 1 \r\n Count 2 \r\n Count 3 \r\n Count 4 \r\n Count 5 \r\n Count 0 \r\n Count 1 \r\n Count 2 \r\n Count 3 \r\n Count 4 \r\n Count 5 \r\n Count 0 \r\n Count 1 \r\n Count 2 \r\n Count 3 \r\n Count 4 \r\n Count 5 \r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/arduino/Arduino/issues/comments/89602059","html_url":"https://github.com/arduino/Arduino/issues/2908#issuecomment-89602059","issue_url":"https://api.github.com/repos/arduino/Arduino/issues/2908","id":89602059,"user":{"login":"matthijskooijman","id":194491,"avatar_url":"https://avatars.githubusercontent.com/u/194491?v=3","gravatar_id":"","url":"https://api.github.com/users/matthijskooijman","html_url":"https://github.com/matthijskooijman","followers_url":"https://api.github.com/users/matthijskooijman/followers","following_url":"https://api.github.com/users/matthijskooijman/following{/other_user}","gists_url":"https://api.github.com/users/matthijskooijman/gists{/gist_id}","starred_url":"https://api.github.com/users/matthijskooijman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthijskooijman/subscriptions","organizations_url":"https://api.github.com/users/matthijskooijman/orgs","repos_url":"https://api.github.com/users/matthijskooijman/repos","events_url":"https://api.github.com/users/matthijskooijman/events{/privacy}","received_events_url":"https://api.github.com/users/matthijskooijman/received_events","type":"User","site_admin":false},"created_at":"2015-04-04T15:45:44Z","updated_at":"2015-04-04T15:45:44Z","body":"Uhm, by default printf doesn't actually work on Arduino AFAIK? Your sketch also doesn't have a loop function. Could you provide a minimal, but complete example showing the problem?\r\n\r\nTo take a guess at the cause: perhaps you are disabling interrupts and never re-enable them? That would cause the printed bytes to stay queued and never be actually sent."}}