EXCEPTION_ACCESS_VIOLATION (0xc0000005) Problematic frame: C [ntdll.dll+0x50901]
See original GitHub issueHello! I have a problem with cyclic video recording. The code is taken from the example: Encoder. An error occurs when the loop passes more than 70 iterations. Start-up example:
package Recorder;
public class Start {
public static void main(String[] args) {
while(true) {
try {
Rec2 r = new Rec2();
r.m();
Thread.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
package Recorder;
import java.awt.Dimension;
import java.awt.image.BufferedImage;
import java.io.File;
import com.github.sarxos.webcam.Webcam;
import com.github.sarxos.webcam.WebcamResolution;
import com.xuggle.mediatool.IMediaWriter;
import com.xuggle.mediatool.ToolFactory;
import com.xuggle.xuggler.ICodec;
import com.xuggle.xuggler.IPixelFormat;
import com.xuggle.xuggler.IVideoPicture;
import com.xuggle.xuggler.video.ConverterFactory;
import com.xuggle.xuggler.video.IConverter;
import java.util.Calendar;
public class Rec2 {
public void m() {
String filePath = new File("").getAbsolutePath() + "\\video\\";
File file = new File(filePath + fileRenamed() + "mp4");
IMediaWriter writer = ToolFactory.makeWriter(file.getName());
Dimension size = WebcamResolution.QVGA.getSize();
writer.addVideoStream(0, 0, ICodec.ID.CODEC_ID_H264, size.width, size.height);
Webcam webcam = Webcam.getDefault();
webcam.setViewSize(size);
webcam.open(true);
long start = System.currentTimeMillis();
for (int i = 0; i < 50; i++) {
System.out.println("Capture frame " + i);
BufferedImage image = ConverterFactory.convertToType(webcam.getImage(), BufferedImage.TYPE_3BYTE_BGR);
IConverter converter = ConverterFactory.createConverter(image, IPixelFormat.Type.YUV420P);
IVideoPicture frame = converter.toPicture(image, (System.currentTimeMillis() - start) * 1000);
frame.setKeyFrame(i == 0);
frame.setQuality(0);
writer.encodeVideo(0, frame);
// 10 FPS
try {
Thread.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
writer.close();
webcam.close();
System.out.println("Video recorded in file: " + file.getAbsolutePath());
}
private String fileRenamed() {
Calendar calendar = Calendar.getInstance();
String fileName = String.valueOf(calendar.getTimeInMillis() + ".");
return fileName;
}
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:18 (6 by maintainers)
Top Results From Across the Web
JVM crashing EXCEPTION_ACCESS_VIOLATION ...
Problematic frame lies in the jvmti agent that I wrote. The stacktrace showed some jni calls to getstaticbyte and getstaticint functions . When ......
Read more >JVM Crash EXCEPTION_ACCESS_VIOLATION in ntdll.dll
Hi I get the following output when i try to run native code (jni). The native code has no issues when not run...
Read more >crash with # Problematic frame: # C [ntdll.dll+0xa65f2]
Problematic frame : # C [ntdll.dll+0xa65f2] [error occurred during error reporting (), id 0xc0000005, EXCEPTION_ACCESS_VIOLATION (0xc0000005) at ...
Read more >EXCEPTION_ACCESS_VIOLATI...
JDK-6815715 : EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x77453387, ... sharing windows-x86 ) # Problematic frame: # C [ntdll.dll+0x43387] # # If you ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This problem has been preserved for windows 10. Can you tell me, is it possible to record many short video files (5 - 10 seconds) so that during the recording we connected to the camera 1 time, and while the camera was on, we wrote constantly short files?
Hi
Hi pavlo, i´m sorry if this is a dummy question, but how did you get the crash log ?