2016-08-30 7 views
0

최근에 Access_violation 예외가있는 로그 파일을 생성하는 중에 문제가 발생했습니다. 로그 파일에서 문제가있는 프레임이 awt.dll이라고 언급했습니다. 이것이 무엇을 의미합니까? 이 충돌이 발생하는 이유는 무엇입니까? 이 문제를 해결하는 방법? 사실 자바에 익숙하지 않으므로이 사실을 알지 못합니다. 같은 웹 사이트에서 유사한 유형의 질문을 발견했지만 아직 해결할 수 없습니다. 아무에게도 분명히 설명해 주시면 제가 이것에 대한 아이디어를 얻을 수 있습니다. 미리 감사드립니다. 아래에 오류 로그 파일의 일부를 첨부했습니다.EXCEPTION_ACCESS_VIOLATION이 JRE에 의해 감지 됨 문제가있는 프레임 : C [awt.dll + 0x7959b]

# A fatal error has been detected by the Java Runtime Environment: 
# 
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x60bf959b, pid=5188, tid=5736 
# 
# JRE version: Java(TM) SE Runtime Environment (8.0_45-b15) (build 1.8.0_45-b15) 
# Java VM: Java HotSpot(TM) Client VM (25.45-b02 mixed mode windows-x86) 
# Problematic frame: 
# C [awt.dll+0x7959b] 
# 
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows 
# 
# If you would like to submit a bug report, please visit: 
# http://bugreport.java.com/bugreport/crash.jsp 
# The crash happened outside the Java Virtual Machine in native code. 
# See problematic frame for where to report the bug. 
+1

가 보이는 : 여기에 간단한 예입니다. 최소한의 테스트 케이스를 만들 준비를하십시오. http://www.oracle.com/technetwork/java/javase/awt-138016.html#gdaey도 참조하십시오. 그것 이외에, 여기 아무도 더 많은 정보없이 정말로 당신을 도울 수 있습니다. 최신 Java 버전으로 업그레이드하여 문제가 해결되었는지 확인하십시오. 지금은 최대 1.8.0_102입니다. –

답변

0

Problematic frame 섹션의 DLL은 JVM에서 사용하는 일부 사용자 정의 클래스 로더가 아닌 기본값을 사용하여 해당 라이브러리를로드에 대해 생각해야, 여기, 당신의 클래스 경로에 라이브러리의 나머지와 호환되지 않습니다 source입니다 당신이 더 나은 지침을 따르 http://bugreport.java.com/bugreport/crash.jsp를 방문하고, 버그 리포트를 제출처럼

/** 
* 
* @author http://codeslices.net team 
* 
*/ 

import java.io.BufferedInputStream; 
import java.io.ByteArrayOutputStream; 
import java.io.IOException; 
import java.lang.reflect.InvocationTargetException; 
import java.lang.reflect.Method; 
import java.util.HashMap; 
import java.util.Map; 

/** 
* 
* Simple custom class loader implementation 
* 
*/ 
public class CustomClassLoader extends ClassLoader { 

    /** 
    * The HashMap where the classes will be cached 
    */ 
    private Map<String, Class<?>> classes = new HashMap<String, Class<?>>(); 

    @Override 
    public String toString() { 
     return CustomClassLoader.class.getName(); 
    } 

    @Override 
    protected Class<?> findClass(String name) throws ClassNotFoundException { 

     if (classes.containsKey(name)) { 
      return classes.get(name); 
     } 

     byte[] classData; 

     try { 
      classData = loadClassData(name); 
     } catch (IOException e) { 
      throw new ClassNotFoundException("Class [" + name 
        + "] could not be found", e); 
     } 

     Class<?> c = defineClass(name, classData, 0, classData.length); 
     resolveClass(c); 
     classes.put(name, c); 

     return c; 
    } 

    /** 
    * Load the class file into byte array 
    * 
    * @param name 
    *   The name of the class e.g. com.codeslices.test.TestClass} 
    * @return The class file as byte array 
    * @throws IOException 
    */ 
    private byte[] loadClassData(String name) throws IOException { 
     BufferedInputStream in = new BufferedInputStream(
       ClassLoader.getSystemResourceAsStream(name.replace(".", "/") 
         + ".class")); 
     ByteArrayOutputStream out = new ByteArrayOutputStream(); 
     int i; 

     while ((i = in.read()) != -1) { 
      out.write(i); 
     } 

     in.close(); 
     byte[] classData = out.toByteArray(); 
     out.close(); 

     return classData; 
    } 

    /** 
    * Simple usage of the CustomClassLoader implementation 
    * 
    * @param args 
    * @throws ClassNotFoundException 
    * @throws IllegalAccessException 
    * @throws InstantiationException 
    * @throws SecurityException 
    * @throws NoSuchMethodException 
    * @throws InvocationTargetException 
    * @throws IllegalArgumentException 
    */ 
    public static void main(String[] args) throws ClassNotFoundException, 
      InstantiationException, IllegalAccessException, 
      NoSuchMethodException, SecurityException, IllegalArgumentException, 
      InvocationTargetException 
    { 
     CustomClassLoader loader = new CustomClassLoader(); 
     // This class should be in your application class path 
     Class<?> c = loader.findClass("net.codeslices.test.TestClass"); 
     Object o = c.newInstance(); 
     Method m = c.getMethod("toString"); 
     System.out.println(m.invoke(o)); 
    } 

}