NetLogo / NetLogo/Vid-Extension
Possible to get duplicate camera entries on Linux
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 1
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
From a testing report on the JavaCV changes, running on Linux with a single webcam attached/installed:
The device list showed me two copies of my webcam. If I selected either one of them, things worked great. If I tried clicked "close camera" and then changed to the other camera, things still worked great. But if I selected the other camera while the first camera was still in the "playing" state, I would get this error:
org.bytedeco.javacv.FrameGrabber$Exception: read() Error: Could not read frame in start().
at org.bytedeco.javacv.OpenCVFrameGrabber.start(OpenCVFrameGrabber.java:265)
at org.nlogo.extensions.vid.Camera.$anonfun$grabber$1(Camera.scala:71)
at org.nlogo.extensions.vid.Camera$.withContextClassLoader(Camera.scala:31)
at org.nlogo.extensions.vid.Camera.<init>(Camera.scala:69)
at org.nlogo.extensions.vid.Camera$.open(Camera.scala:62)
at org.nlogo.extensions.vid.CameraSelect.$anonfun$perform$1(CameraSelect.scala:13)
at org.nlogo.extensions.vid.CameraSelect.$anonfun$perform$1$adapted(CameraSelect.scala:12)
at scala.Option.foreach(Option.scala:407)
at org.nlogo.extensions.vid.CameraSelect.perform(CameraSelect.scala:12)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the report on Linux with one webcam, then inspect Camera.scala and CameraSelect.scala around the grabber creation and camera-selection flow. Use the OpenCVFrameGrabber.start() stack trace as the failure point. Done means one physical webcam appears once and switching cameras while another is playing no longer produces the reported read() error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, scala
- Domain
- audio-video-rtc, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100