Open MachineIntelligence6 opened 2 years ago
Could not grab: No AVFormatContext. (Has start() been called?) at
Please call start()!
but the JVM should not crash? Another example is below, when we set the timestamp to get BufferedImage on a certain time of video file. There was no start exception in that instance.
` Command Line: -Xms30G -XX:+UseConcMarkSweepGC -Dj2e.class.path=;C:\Program Files\imageApp\imageApp.;.;C:\Program Files (x86)\QuickTime\QTSystem\QTJava.zip -Dj2e.app.path=C:\Program Files\imageApp\imageApp\imageApp.exe -Dapplication.home=C:\Program Files\imageApp\imageApp\ -Dj2e.is.elevated=true
Host: Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz, 40 cores, 63G, Windows 10 , 64 bit Build 19041 (10.0.19041.1503) Time: Fri Mar 4 13:45:01 2022 GMT Standard Time elapsed time: 259 seconds (0d 0h 4m 19s)
--------------- T H R E A D ---------------
Current thread (0x0000000048a85000): JavaThread "pool-11-thread-1" [_thread_in_native, id=40284, stack(0x000000089e0c0000,0x000000089e2c0000)]
Stack: [0x000000089e0c0000,0x000000089e2c0000], sp=0x000000089e2bf060, free space=2044k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C 0x00007fff4027a25b
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j org.bytedeco.ffmpeg.global.avcodec.avcodec_flush_buffers(Lorg/bytedeco/ffmpeg/avcodec/AVCodecContext;)V+0 J 11853 c1 org.bytedeco.javacv.FFmpegFrameGrabber.setTimestamp(JLjava/util/EnumSet;)V (606 bytes) @ 0x000000000f4d2f44 [0x000000000f4d2d00+0x0000000000000244] j org.bytedeco.javacv.FFmpegFrameGrabber.setVideoTimestamp(J)V+8`
It can crash if the memory allocated for your images gets deallocated prematurely. You'll need to make sure that doesn't happen.
It can crash if the memory allocated for your images gets deallocated prematurely. You'll need to make sure that doesn't happen.
Thank you the issue is resolved, the problem was for corrupt videos the setVideo method fails.
And we were extracting videos on mouse movements on panel.
I need to make sure if setVideo method fails, the code can't try to extract frame.
Does it crash when only calling setVideoTimestamp()? If so, please attach a sample video file that causes the crash. I'm sure @anotherche can look into that. Thanks!
Im using FFmpeg Frame Grabber and convert Convert frames to Buffered Image using Java2DFrameGrabber, but my JVM crash, I not always but im seeing it quite often now. Im using version 1.5.4
2022-02-25 12:51:19,354 ERROR c.i.w.ColorDetectionTask$ColorDetector: Error Extracting Frame 2022-02-25 12:51:19,354 TRACE c.i.w.ColorDetectionTask$ColorDetector: org.bytedeco.javacv.FrameGrabber$Exception: Could not grab: No AVFormatContext. (Has start() been called?) at org.bytedeco.javacv/org.bytedeco.javacv.FFmpegFrameGrabber.grabFrame(FFmpegFrameGrabber.java:1254) at org.bytedeco.javacv/org.bytedeco.javacv.FFmpegFrameGrabber.grabImage(FFmpegFrameGrabber.java:1239) at com.viewer.remote.NormalGrabber.getFrame(NormalGrabber.java:126)