0

The code snippet below is to extract audio from video file. The work environment is Eclipse Luna on Windows 7.

import com.xuggle.mediatool.*;
import com.xuggle.xuggler.ICodec;

public class VideoToAudio{

    public void convertVideoToAudio(){
        IMediaReader reader = ToolFactory.makeReader("D://vid.mp4");
        IMediaWriter writer = ToolFactory.makeWriter("D://a.mp3",reader);

        int sampleRate = 44100;
        int channels = 1;

        writer.addAudioStream(0, 0, ICodec.ID.CODEC_ID_MP3, channels, sampleRate);
        while (reader.readPacket() == null);
    }

    public static void main(String [] args){
        VideoToAudio vta = new VideoToAudio();
        vta.convertVideoToAudio();
    }
}

The error generated for the code is as follows:

A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000006ee76520, pid=13968, tid=7220
#
# JRE version: Java(TM) SE Runtime Environment (8.0_20-b26) (build 1.8.0_20-b26)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.20-b23 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  [xuggle4458410956560120581.dll+0x736520]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows

I followed a series of actions one after the another to fix the error:

  • Configured Windows to create MiniDump files after looking into link

  • Removed metadata folder from workspace and imported project again to eclipse.

Still the above error persists. Could someone fix the error?

Thomas Weller
  • 55,411
  • 20
  • 125
  • 222
baba
  • 55
  • 1
  • 6

1 Answers1

0

The link you gave is about configuring minidumps for BSOD, which is the abbreviation for "blue screen of death". This is a crash of the Windows kernel, which a Java application (running in user mode) can hopefully not generate.

To collect user mode dumps, you can configure Windows Error Reporting (WER) LocalDumps. See also this answer about some common pitfalls using it.

But even if you do this, Java will perform its own exception handling. To disable that exception handling and let Windows (WER) handle the error, you need to start Java with the command line switch

-XX:+UseOSErrorReporting

However, there is an easier way than LocalDumps and UseOSErrorReporting. Java also knows a command line switch

-XX:+CreateMinidumpOnCrash

which IMHO is much easier to use.

The error code 0xC0000005 is an access violation, which is the native / JNI term for a NullReferenceException.

Could someone fix the error?

Only a developer of Xuggler could do that.

Community
  • 1
  • 1
Thomas Weller
  • 55,411
  • 20
  • 125
  • 222