bytedeco/javacv

Major problem with Javacv when grabbing from camera & showing frames in JavaFX ImageView

Open

#1,968 opened on Jan 12, 2023

View on GitHub
 (31 comments) (0 reactions) (0 assignees)Java (1,583 forks)batch import
help wantedquestion

Repository metrics

Stars
 (6,985 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Hi again, this time I've got a broader question, I don't know if this is JavaCV related but it feels like it might be and as I don't know where else to ask this I'm asking it here.

The thing is: I'm writing a JavaFX program that should show the frames from a camera and gives the option to also record the frames and the audio to a video. I'm on a Windows 10 Home laptop software version 21H2, if that matters.

I've had 2 times already when I was using an external camera (Logitech C615) and was recording at the time that my whole Windows crashed (see the picture for the look of my screen when that happened: thumbnail_IMG_7029). So I abandoned the external camera and thought "probably a bug in the driver for that camera", but just now the same happened with the webcam of my laptop when I wasn't recording a video, only grabbing & showing the frames in the front-end. In fact, the laptop screen wasn't even showing the JavaFX GUI, it was in the background as I was searching for a solution for some other issue I'm having in my browser. This time I made a, very short, video. I hit the record button mistakenly twice right after each other: https://user-images.githubusercontent.com/5166417/212095150-b0f792c7-b574-4e5d-96e4-907cda2f9dbf.MOV

Both after the second crash and after this third crash I've looked in Windows event viewer to see if something was logged there regarding "what went wrong just before the laptop restarted", but I could only find log events concerning the restart itself, not what happened in the minute before ...

As this setup of grabbing using JavaCV and showing the frames in JavaFX can be found online it seems others have got this combination working without big problems, but mine is having this showstopper :-(

Any idea what causes Windows to collapse in this way?

Contributor guide