-
Notifications
You must be signed in to change notification settings - Fork 267
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
Using webcam on Windows crashes regl #24
Comments
@echophon how interesting. What is the very first error that appears before all the regl errors? Do both of these examples work with your camera+screen configuration?: https://webrtc.github.io/samples/src/content/getusermedia/gum/ https://webrtc.github.io/samples/src/content/getusermedia/canvas/ |
I only see a warning once, then all these errors. The warning is:
If I reevaluate the code once this occurs I see this in the canvas error handling area:
I was able to reproduce this on the 60Hz screen, so it might not be screen related after all. I can run both of those WebRTC samples and others (great resource) for extended periods at a time. I can also run them at the same time as Hydra and they keep working if in seperate windows. They do however blank to white when this crash occurs, but as soon as I give their window focus again they start working again. Hmmm.... |
@echophon any updates on this? |
@ojack Applied the latest graphic drivers from NVIDIA, but still running into this. Additionally, I tried in atom-hydra & with a different webcam. In both cases, I was able to capture a bit more of the crash data into the console. Looks like a memory leak, but I found this reference on regl regl-project/regl#430 which points to buffer allocation. Webcam 1 Webcam 2 |
@echophon i found an error and updated hydra-synth, the browser, and atom verion....any difference? |
I think this is fixed! My initial results at hydra-editor-v1.glitch.me are looking good. I can connect multiple USB webcams, record & playback a video (vidRecorder was also crashing for me previously), and unplug webcams without an error. In this last case, they just display the last buffer received. I'll try with atom next. I did notice that one of the example sketches (Will's Lines) throws an error "o0.scale" is not a function, so there may be a slight backwards compatibility issue. Simple enough to fix it by updating to "src(o0).scale" |
yay! i am going to close the issue then! thats interesting because i dont think o0.scale would have ever worked ... or maybe im forgetting something |
Hi!
When I try to run the webcam example on the latest build at: https://hydra-editor-v1.glitch.me
ie
s0.initCam()
src(s0).out()
The output loads for a few seconds and crashes to a black screen a few moments later. The console then starts loading the following error over & over.
regl.js:47 Uncaught Error: (regl) context lost
at Function.raise (regl.js:47)
at Object.REGLCommand [as draw] (regl.js:9396)
at passes.forEach (output.js:196)
at Array.forEach ()
at Output.tick (output.js:196)
at HydraSynth.tick (index.js:293)
at Engine. (index.js:52)
at emitOne (events.js:106)
at Engine.emit (events.js:184)
at Engine.tick (index.js:42)
Initial Test - Reproduced on Win10 desktop, Chrome 68, GTX1070, dual 2560x1440 144Hz resolution monitors (one rotated to portrait) and this model of webcam https://www.amazon.com/ELP-2-8-12mm-Varifocal-1-3megapixel-Android/dp/B01N8YH5VY
The error can be cleared by refreshing but fails again a few seconds after initCam()
Test 2 - cannot repro with same webcam attached to older MBP with Nvidia card. also on Chrome 68. This should rule out the camera as cause.
Test 3 - 144Hz is only supported over displayport, & one of my screens is connected via HDMI and runs instead at 60Hz. Unable to repro on the screen that runs at 60Hz. So it appears that it is the increased frequency at 144Hz that is the culprit.
I think the cam only support 24 or 30 fps, so I suspect some sort of timing discrepancy as the root cause.
The text was updated successfully, but these errors were encountered: