{"action":"created","issue":{"url":"https://api.github.com/repos/caprica/picam/issues/2","repository_url":"https://api.github.com/repos/caprica/picam","labels_url":"https://api.github.com/repos/caprica/picam/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/caprica/picam/issues/2/comments","events_url":"https://api.github.com/repos/caprica/picam/issues/2/events","html_url":"https://github.com/caprica/picam/issues/2","id":229458940,"number":2,"title":"Native image encoder intermittently fails to send final frame of image data causing hang","user":{"login":"caprica","id":1385879,"avatar_url":"https://avatars1.githubusercontent.com/u/1385879?v=3","gravatar_id":"","url":"https://api.github.com/users/caprica","html_url":"https://github.com/caprica","followers_url":"https://api.github.com/users/caprica/followers","following_url":"https://api.github.com/users/caprica/following{/other_user}","gists_url":"https://api.github.com/users/caprica/gists{/gist_id}","starred_url":"https://api.github.com/users/caprica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caprica/subscriptions","organizations_url":"https://api.github.com/users/caprica/orgs","repos_url":"https://api.github.com/users/caprica/repos","events_url":"https://api.github.com/users/caprica/events{/privacy}","received_events_url":"https://api.github.com/users/caprica/received_events","type":"User","site_admin":false},"labels":[{"id":356454431,"url":"https://api.github.com/repos/caprica/picam/labels/bug","name":"bug","color":"ee0701","default":true},{"id":356454434,"url":"https://api.github.com/repos/caprica/picam/labels/help%20wanted","name":"help wanted","color":"128A0C","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":41,"created_at":"2017-05-17T19:14:39Z","updated_at":"2017-07-04T10:16:16Z","closed_at":null,"body":"From time to time, when requesting an image, the native image encoder simply fails to send the final frame of image data.\r\n\r\nThe image data is fetched in chunks, this is repeated 1..n times by the native code invoking a callback with the image data. The return value of that callback signifies to the native encoder that it should send the next frame. Tracing the Java code shows that the callback is correctly invoked, and that the correct return value is being sent back to native code. Nevertheless, from time to time the native encoder simply seems to stall and will stop sending image data. It always seems to be the *last* chunk of data.\r\n\r\nWhat this means in practical terms is that the Java application hangs while waiting for a native callback that will never occur. *The JVM must then be terminated*.\r\n\r\nThis is a show-stopper issue that precludes the use of this library.\r\n\r\nThere is similar strangeness, it may be unrelated, during native resource clean-up whereby native warning messages are intermittently dumped to stdout or stderr (e.g. freeing a resource that has already been freed).\r\n\r\nThis may point to there being a fundamental problem with the implementation of this library.\r\n\r\nHaving said that, the code for handling capture data from the native library has been implemented and debugged very carefully from the ground up *on two entirely separate occasions*. So either there is something wrong in native code that the JVM is exposing, or the exact same mistake has been made on two separate Java implementations.\r\n\r\nUntil the root cause of this issue can be identified, this library can not be used reliably.\r\n\r\nAny hints from anyone and anywhere on what could be wrong here will be most welcome."},"comment":{"url":"https://api.github.com/repos/caprica/picam/issues/comments/312841410","html_url":"https://github.com/caprica/picam/issues/2#issuecomment-312841410","issue_url":"https://api.github.com/repos/caprica/picam/issues/2","id":312841410,"user":{"login":"caprica","id":1385879,"avatar_url":"https://avatars1.githubusercontent.com/u/1385879?v=3","gravatar_id":"","url":"https://api.github.com/users/caprica","html_url":"https://github.com/caprica","followers_url":"https://api.github.com/users/caprica/followers","following_url":"https://api.github.com/users/caprica/following{/other_user}","gists_url":"https://api.github.com/users/caprica/gists{/gist_id}","starred_url":"https://api.github.com/users/caprica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caprica/subscriptions","organizations_url":"https://api.github.com/users/caprica/orgs","repos_url":"https://api.github.com/users/caprica/repos","events_url":"https://api.github.com/users/caprica/events{/privacy}","received_events_url":"https://api.github.com/users/caprica/received_events","type":"User","site_admin":false},"created_at":"2017-07-04T10:16:16Z","updated_at":"2017-07-04T10:16:16Z","body":"That port parameter set triggers the take picture, the hang is not there, it is later."}}
{"actor":{"display_login":"caprica"}}