Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in chrome 64.0.3282.186 Win 10 #53

Closed
pewien7 opened this issue Mar 20, 2018 · 7 comments
Closed

Error in chrome 64.0.3282.186 Win 10 #53

pewien7 opened this issue Mar 20, 2018 · 7 comments

Comments

@pewien7
Copy link

pewien7 commented Mar 20, 2018

I got the following error in chrome console after a few moments (5-15min):

jsQR.js:90 Uncaught RangeError: Invalid typed array length: Infinity
at typedArrayConstructByLength ()
at new Uint8ClampedArray (native)
at Function.BitMatrix.createEmpty (https://cozmo.github.io/jsQR/jsQR.js:90:30)
at Object.extract (https://cozmo.github.io/jsQR/jsQR.js:9594:40)
at jsQR (https://cozmo.github.io/jsQR/jsQR.js:337:33)
at tick (https://cozmo.github.io/jsQR/:102:20)

Webcam keeps freezing. This happens on every laptop I use. FF has this problem also.

@cozmo
Copy link
Owner

cozmo commented Mar 20, 2018

Hmm not seen this issue before, I'll investigate. Sorry about that.

@cozmo
Copy link
Owner

cozmo commented Mar 20, 2018

@pewien7 If it was possible would you be willing to send a screenshot/dump of the frame that is causing the failure? Assuming this is causing the webcam to freeze it should be easy to capture a screenshot I think? If not no worries but could make it easier to create a reproducible test case.

@pewien7
Copy link
Author

pewien7 commented Mar 21, 2018

I found the solution. Your code is ok. The problem is navigator.mediaDevices.getUserMedia which losing connection with camera. It happens time to time. Setting lower frameRate helped. But best solution is to check if your track is 'muted' if so just restart stream. Something like that:

  if(video.srcObject.getTracks()[0].muted)
  {
      //here is func to restart stream
  }

@digosts
Copy link

digosts commented Jun 16, 2018

I made a screen where I will read several qr code in sequend, I open the reader all right and execute the tick () function, but after that if I click to read the next the camera appears on my screen more locked in the previous qrcode.

I'm using video.pause on the tick;
and video.play when it enters the screen.

@cozmo
Copy link
Owner

cozmo commented Jun 17, 2018

@digosts Does the issue persist if you do not use jsQR? That is to say if you set up the same code but don't pass the library any data/don't even include the library do you still run into the issue?

@cozmo
Copy link
Owner

cozmo commented Jun 28, 2018

Closing due to lack of activity - If you still have questions please comment/re-open and I'd be happy to help.

@cozmo
Copy link
Owner

cozmo commented Jun 28, 2018

Hey so it turns out our code did have an issue that was causing the "Invalid typed array length: Infinity" which has been fixed in version 1.0.6. I don't think this is necessarily related to the video pausing playing stuff, but either way it's been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants