hid API receive function waits forever
Reported by
arti3d.a...@gmail.com,
Jan 23 2017
|
|||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:50.0) Gecko/20100101 Firefox/50.0 Steps to reproduce the problem: http://stackoverflow.com/questions/41812856/chrome-hid-api-receive-function-waits-forever?noredirect=1#comment70813927_41812856 What is the expected behavior? What went wrong? http://stackoverflow.com/questions/41812856/chrome-hid-api-receive-function-waits-forever?noredirect=1#comment70813927_41812856 Did this work before? No Does this work in other browsers? N/A Chrome version: <Copy from: 'about:version'> Channel: n/a OS Version: OS X 10.12 Flash Version: Shockwave Flash 24.0 r0
,
Jan 24 2017
,
Jan 25 2017
With reference to the issue 683855 , ccing related dev for further inputs on this issue. @arti3d.artem-- It would be helpful for us if you could provide a sample app to test the scenario and also please provide us the chrome version details. Thanks!
,
Jan 25 2017
,
Jan 25 2017
You can use official sample app: https://github.com/GoogleChrome/chrome-app-samples/tree/master/samples/hid And create global receiver that works forever: setInterval(function(){ chrome.hid.receive(function(reportId, data) { console.log(data); }); }, 10) And then send few commands to your HID device. After 1-2 min your CPU will raise to 100% and chrome disconnect event will fired.
,
Jan 25 2017
The chrome.hid.receive function is not cancelable so the behavior of seeing "This is old function" as in the Stackoverflow post is expected. However, the 100% CPU usage is definitely not expected. You say you eventually get a disconnect event. Is the device actually disconnected?
,
Jan 25 2017
Oh sorry, disconnect event caused by device. Yes device is connected, and return data when i send commands. I put console.log(data) into receive function and i see the following log after my command: First i received my data, and then i started get undefined data until my cpu not get 100%.
,
Jan 25 2017
,
Feb 2 2017
Thank you for providing more feedback. Adding "Needs-Review" label for tracking. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Feb 13 2017
,
Mar 13 2017
Cleaning up "Needs-Review" label as we are not using this label for triage. Ref bug 684919
,
Mar 13 2017
,
Jun 7 2017
,
Jun 8 2018
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by chrishtr@chromium.org
, Jan 23 2017