{"action":"created","issue":{"url":"https://api.github.com/repos/nyholku/purejavacomm/issues/74","labels_url":"https://api.github.com/repos/nyholku/purejavacomm/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/nyholku/purejavacomm/issues/74/comments","events_url":"https://api.github.com/repos/nyholku/purejavacomm/issues/74/events","html_url":"https://github.com/nyholku/purejavacomm/issues/74","id":109084880,"number":74,"title":"Exception \"purejavacomm.PureJavaIllegalStateException: File descriptor is -1 < 0, maybe closed by previous error condition\" while writing to serial port using purejava","user":{"login":"deepakahuja","id":13481403,"avatar_url":"https://avatars.githubusercontent.com/u/13481403?v=3","gravatar_id":"","url":"https://api.github.com/users/deepakahuja","html_url":"https://github.com/deepakahuja","followers_url":"https://api.github.com/users/deepakahuja/followers","following_url":"https://api.github.com/users/deepakahuja/following{/other_user}","gists_url":"https://api.github.com/users/deepakahuja/gists{/gist_id}","starred_url":"https://api.github.com/users/deepakahuja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deepakahuja/subscriptions","organizations_url":"https://api.github.com/users/deepakahuja/orgs","repos_url":"https://api.github.com/users/deepakahuja/repos","events_url":"https://api.github.com/users/deepakahuja/events{/privacy}","received_events_url":"https://api.github.com/users/deepakahuja/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-09-30T13:20:42Z","updated_at":"2015-12-07T18:28:21Z","closed_at":null,"body":"Hi,\r\n\r\nI am getting following exception while using purejavacomm API for serial port communication. I have a Test class which receive & also send some data over serial port. I have used a MOXA device to send data from one serial port & receive data on another serial port. At both the ends i.e. sender & receiver the same Test class is used. It does not fail in first attempt but after sending & receiving some data may be after 10/15 minutes. Until 10/15 minutes, both sender & receiver communicate with each other using same method but after that receiver usually stops & we can see following exception.\r\nThe version that we are using of purejavacomm is 28 & JNA is 4.0.\r\nPlease help.\r\n\r\npurejavacomm.PureJavaIllegalStateException: File descriptor is -1 < 0, maybe closed by previous error condition\r\n\tat purejavacomm.PureJavaSerialPort.failWithIllegalStateException(PureJavaSerialPort.java:1289)\r\n\tat purejavacomm.PureJavaSerialPort.checkState(PureJavaSerialPort.java:1294)\r\n\tat purejavacomm.PureJavaSerialPort.access$0(PureJavaSerialPort.java:1292)\r\n\tat purejavacomm.PureJavaSerialPort$1.write(PureJavaSerialPort.java:631)\r\n\tat purejavacomm.PureJavaSerialPort$1.write(PureJavaSerialPort.java:657)\r\n\r\nRegards\r\nDeepak\r\n"},"comment":{"url":"https://api.github.com/repos/nyholku/purejavacomm/issues/comments/162615488","html_url":"https://github.com/nyholku/purejavacomm/issues/74#issuecomment-162615488","issue_url":"https://api.github.com/repos/nyholku/purejavacomm/issues/74","id":162615488,"user":{"login":"nyholku","id":720813,"avatar_url":"https://avatars.githubusercontent.com/u/720813?v=3","gravatar_id":"","url":"https://api.github.com/users/nyholku","html_url":"https://github.com/nyholku","followers_url":"https://api.github.com/users/nyholku/followers","following_url":"https://api.github.com/users/nyholku/following{/other_user}","gists_url":"https://api.github.com/users/nyholku/gists{/gist_id}","starred_url":"https://api.github.com/users/nyholku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyholku/subscriptions","organizations_url":"https://api.github.com/users/nyholku/orgs","repos_url":"https://api.github.com/users/nyholku/repos","events_url":"https://api.github.com/users/nyholku/events{/privacy}","received_events_url":"https://api.github.com/users/nyholku/received_events","type":"User","site_admin":false},"created_at":"2015-12-07T18:28:21Z","updated_at":"2015-12-07T18:28:21Z","body":"I really don't have much time to work on this right now.\r\n\r\nI would have appreciated it if 'deepakahuja ' had reported back with the log fix in place, now the log is useless.\r\n\r\nAlso it appears 'tkutz' has different problem because he/she has this problem when unpluggin  a device.\r\n\r\nSince I do experience this problems (and I've got no Windows 10) it is hard for me to debug this. \r\n\r\nContributions in the form of debugging would be more than welcome, after all this is open source and Java so easy to debug, this is really  the point of this library ... while I'm happy to work on this when I have the time, if I had problems with this and this was not my project I would just dig in deep to find the problem and not expect the author to do my work for me...."}}