{"action":"closed","issue":{"url":"https://api.github.com/repos/node-hid/node-hid/issues/159","repository_url":"https://api.github.com/repos/node-hid/node-hid","labels_url":"https://api.github.com/repos/node-hid/node-hid/issues/159/labels{/name}","comments_url":"https://api.github.com/repos/node-hid/node-hid/issues/159/comments","events_url":"https://api.github.com/repos/node-hid/node-hid/issues/159/events","html_url":"https://github.com/node-hid/node-hid/issues/159","id":182817551,"number":159,"title":"Segmentation fault (core dumped)","user":{"login":"agirorn","id":261378,"avatar_url":"https://avatars.githubusercontent.com/u/261378?v=3","gravatar_id":"","url":"https://api.github.com/users/agirorn","html_url":"https://github.com/agirorn","followers_url":"https://api.github.com/users/agirorn/followers","following_url":"https://api.github.com/users/agirorn/following{/other_user}","gists_url":"https://api.github.com/users/agirorn/gists{/gist_id}","starred_url":"https://api.github.com/users/agirorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agirorn/subscriptions","organizations_url":"https://api.github.com/users/agirorn/orgs","repos_url":"https://api.github.com/users/agirorn/repos","events_url":"https://api.github.com/users/agirorn/events{/privacy}","received_events_url":"https://api.github.com/users/agirorn/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-10-13T15:11:30Z","updated_at":"2016-11-08T22:05:14Z","closed_at":"2016-11-08T22:05:14Z","body":"When using the read callback I can't close the device without getting a Segmentation fault.\nThis only happens when the reader function reassigns its self to the read.\n\n``` javascript\nvar HID=require('node-hid');\nvar device = new HID.HID(3118, 3233);\nvar reader = function(err, data) { \n  console.log('error: ', err);\n  console.log('data:', data);\n  device.read(reader); // Only if this is done.\n};\ndevice.read(reader); \ndevice.close();\n```\n\n``` shell\n>error:  [Error: could not read from HID device]\ndata: undefined\nSegmentation fault (core dumped)\n```\n"}}
{"actor":{"display_login":"todbot"}}