New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 683996 link

Starred by 2 users

Issue metadata

Status: Archived
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

hid API receive function waits forever

Reported by arti3d.a...@gmail.com, Jan 23 2017

Issue description

UserAgent: 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
 
Components: Platform>Apps>API
Labels: Needs-Milestone

Comment 3 by hdodda@chromium.org, Jan 25 2017

Cc: reillyg@chromium.org
Labels: Needs-Feedback
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!

Comment 4 by hdodda@chromium.org, Jan 25 2017

Cc: hdodda@chromium.org
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.
Cc: -reillyg@chromium.org
Owner: reillyg@chromium.org
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?
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%.
Preview5 (1).gif
6.2 MB View Download
Labels: Needs-Triage-M58
Project Member

Comment 9 by sheriffbot@chromium.org, Feb 2 2017

Labels: -Needs-Feedback Needs-Review
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
Labels: TE-NeedsTriageHelp
Cleaning up "Needs-Review" label as we are not using this label for triage. Ref  bug 684919 
Labels: -Needs-Review
Components: -Platform>Apps>API Platform>Apps>API>HID
Project Member

Comment 14 by sheriffbot@chromium.org, Jun 8 2018

Status: Archived (was: Unconfirmed)
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