bytedeco/javacv

JVM crash error

Open

#2,070 opened on Jul 24, 2023

View on GitHub
 (6 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

Pseudocode

public class Demo {
   private final static OpenCVFrameConverter.ToMat converter = new OpenCVFrameConverter.ToMat();
    public static void main(String[] args) throws Exception {
                      FFmpegFrameGrabber grabber = new FFmpegFrameGrabber("test.mp4")
                      grabber.start();
                      Frame img = null;
                      while((img = grabber.grabImage()) !=null ) {
                          Mat mat = converter.convert(img);
                          //todo do something
                      }
     }
}

description

It worked very well at first, and I would repeat this logic over and over again, and immediately after a while, the JVM crashed, and here is the screenshot

screenshots

Contributor guide