Tastenkunst / brfv4_javascript_examples

BRFv4 - HTML5/Javascript - examples project. Reference implementation for all other platform example packages.
463 stars 148 forks source link

Web Assembly Issue #34

Closed DaveSeidman closed 6 years ago

DaveSeidman commented 6 years ago

There's a good chance this isn't related to brfv4 at all but we've been experiencing an issue in Chrome 66 on Mac resulting in brfv4 no longer updating. The exact error message is: Uncaught RuntimeError: float unrepresentable in integer range

error

It comes up every once and a while, ~1 out of 20 refreshes or maybe 1x per hour of heavy testing using a live webcam image rendered to a canvas. We've seen it happen on this demo as well: https://tastenkunst.github.io/brfv4_javascript_examples/

It's been hard to pin down to any particular event or environment unfortunately. It's happened with a few different models of webcam as well as the built-in FaceTime camera on a MacBook Pro. It usually happens within the first few seconds of tracking, but then other times not until the tracking's been running for a minute or longer. I want to say it happens more frequently when the image data changes rapidly which I was able to reproduce by quickly covering and uncovering the webcam (black to full-color). So that's probably when the face detector is "narrowing in" on a solution.

Any insight into this issue would be greatly appreciated, and thanks so much for this repo, it's quite amazing!

MarcelKlammer commented 6 years ago

Hi Dave, thanks for the report. I'm not able to reproduce it. I read about the issue here (trab mode) http://kripken.github.io/emscripten-site/docs/compiling/WebAssembly.html

Would you be able to create a video of you using your app with an occurrence of the bug? This way I might be able to reproduce it here.

Thanks Marcel

DaveSeidman commented 6 years ago

Thanks for getting back so quick!

Luckily I was able to reproduce it fairly quickly this time and recorded it here: https://www.youtube.com/watch?v=I15KQC4xbuE

You can see I purposely lose tracking by covering the camera with my hand. On the second try when it finds the face again you'll see the error in the console.

Running this on localhost at the moment but I can provide you with a link as soon as our development server is online.

MarcelKlammer commented 6 years ago

So regarding these errors, it seems to be a known issue: https://kripken.github.io/emscripten-site/docs/compiling/WebAssembly.html#trap-mode

I just recompiled the current release with trap mode clamp. If you could test it with your case and see if the error persist, that would be great.

Cheers Marcel

MarcelKlammer commented 6 years ago

I consider the issue gone with the recompile.