Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8181312

A fatal error has been detected by the Java Runtime Environment:

    Details

    • Subcomponent:
      2d
    • CPU:
      x86
    • OS:
      os_x
    • Verification:
      Verified

      Description

      FULL PRODUCT VERSION :
      java version "1.8.0_111"
      Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
      Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

      A DESCRIPTION OF THE PROBLEM :
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGSEGV (0xb) at pc=0x000000010c2da6ce, pid=32133, tid=0x0000000000000307
      #
      # JRE version: Java(TM) SE Runtime Environment (8.0_111-b14) (build 1.8.0_111-b14)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.111-b14 mixed mode bsd-amd64 compressed oops)
      # Problematic frame:
      # C [liblwjgl_opengl.dylib+0x106ce]
      [error occurred during error reporting (printing problematic frame), id 0xe0000000]

      # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
      #
      # An error report file with more information is saved as:
      # /Users/neroyang/project/nengine/hs_err_pid32133.log
      #
      # 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.
      #

      Process finished with exit code 134 (interrupted by signal 6: SIGABRT)


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      compiler opengl shader file

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/bin/java -Djava.library.path=/Users/neroyang/project/nengine/lib/lwjgl-assimp-natives-macos.jar -XstartOnFirstThread -Didea.launcher.port=7532 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/jfxswt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/lib/packager.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/lib/tools.jar:/Users/neroyang/project/nengine/target/classes:/Users/neroyang/project/nengine/lib/lwjgl.jar:/Users/neroyang/project/nengine/lib/lwjgl-glfw.jar:/Users/neroyang/project/nengine/lib/lwjgl-opengl.jar:/Users/neroyang/project/nengine/lib/lwjgl-jawt.jar:/Users/neroyang/project/nengine/lib/lwjgl-assimp.jar:/Users/neroyang/project/nengine/lib/lwjgl-bgfx.jar:/Users/neroyang/project/nengine/lib/lwjgl-egl.jar:/Users/neroyang/project/nengine/lib/lwjgl-jemalloc.jar:/Users/neroyang/project/nengine/lib/lwjgl-lmdb.jar:/Users/neroyang/project/nengine/lib/lwjgl-nanovg.jar:/Users/neroyang/project/nengine/lib/lwjgl-nfd.jar:/Users/neroyang/project/nengine/lib/lwjgl-opencl.jar:/Users/neroyang/project/nengine/lib/lwjgl-openal.jar:/Users/neroyang/project/nengine/lib/lwjgl-nuklear.jar:/Users/neroyang/project/nengine/lib/lwjgl-opengles.jar:/Users/neroyang/project/nengine/lib/lwjgl-openvr.jar:/Users/neroyang/project/nengine/lib/lwjgl-par.jar:/Users/neroyang/project/nengine/lib/lwjgl-sse.jar:/Users/neroyang/project/nengine/lib/lwjgl-stb.jar:/Users/neroyang/project/nengine/lib/lwjgl-tinyexr.jar:/Users/neroyang/project/nengine/lib/lwjgl-tinyfd.jar:/Users/neroyang/project/nengine/lib/lwjgl-vulkan.jar:/Users/neroyang/project/nengine/lib/lwjgl-xxhash.jar:/Users/neroyang/project/nengine/lib/lwjgl-yoga.jar:/Users/neroyang/project/nengine/lib/lwjgl-natives-macos.jar:/Users/neroyang/project/nengine/lib/lwjgl-assimp-natives-macos.jar:/Users/neroyang/project/nengine/lib/lwjgl-bgfx-natives-macos.jar:/Users/neroyang/project/nengine/lib/lwjgl-glfw-natives-macos.jar:/Users/neroyang/project/nengine/lib/lwjgl-jemalloc-natives-macos.jar:/Users/neroyang/project/nengine/lib/lwjgl-nanovg-natives-macos.jar:/Users/neroyang/project/nengine/lib/lwjgl-nuklear-natives-macos.jar:/Users/neroyang/project/nengine/lib/lwjgl-openal-natives-macos.jar:/Users/neroyang/project/nengine/lib/lwjgl-opengl-natives-macos.jar:/Users/neroyang/project/nengine/lib/lwjgl-opengles-natives-macos.jar:/Users/neroyang/project/nengine/lib/lwjgl-openvr-natives-macos.jar:/Users/neroyang/project/nengine/lib/lwjgl-par-natives-macos.jar:/Users/neroyang/project/nengine/lib/lwjgl-yoga-natives-macos.jar:/Users/neroyang/project/nengine/lib/lwjgl-xxhash-natives-macos.jar:/Users/neroyang/project/nengine/lib/lwjgl-tinyfd-natives-macos.jar:/Users/neroyang/project/nengine/lib/lwjgl-stb-natives-macos.jar:/Users/neroyang/project/nengine/lib/lwjgl-sse-natives-macos.jar:/Users/neroyang/project/nengine/lib/lwjgl-nfd-natives-macos.jar:/Users/neroyang/project/nengine/lib/lwjgl-lmdb-natives-macos.jar:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar" com.intellij.rt.execution.application.AppMain org.neroyang.nengine.App
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGSEGV (0xb) at pc=0x00000001173de6ce, pid=32212, tid=0x0000000000000307
      #
      # JRE version: Java(TM) SE Runtime Environment (8.0_111-b14) (build 1.8.0_111-b14)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.111-b14 mixed mode bsd-amd64 compressed oops)
      # Problematic frame:
      # C [liblwjgl_opengl.dylib+0x106ce]
      [error occurred during error reporting (printing problematic frame), id 0xe0000000]

      # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
      #
      # An error report file with more information is saved as:
      # /Users/neroyang/project/nengine/hs_err_pid32212.log
      #
      # 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.
      #

      Process finished with exit code 134 (interrupted by signal 6: SIGABRT)


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      package org.neroyang.shader;

      import com.sun.tools.doclets.formats.html.SourceToHTMLConverter;
      import org.lwjgl.opengl.GL11;
      import org.lwjgl.opengl.GL20;

      import javax.sound.midi.SysexMessage;
      import java.io.BufferedReader;
      import java.io.FileReader;
      import java.io.IOException;

      /**
       * Author neroyang
       * Email nerosoft@outlook.com
       * Date 2017/5/27
       * Time 下午11:18
       */
      public abstract class ShaderProgram {

          private int programID;
          private int vertexShaderID;
          private int fragmentShaderID;

          public ShaderProgram(String vertexFile,String fragmentFile){
              vertexShaderID = loadShader(vertexFile,GL20.GL_VERTEX_SHADER);
              fragmentShaderID = loadShader(fragmentFile,GL20.GL_FRAGMENT_SHADER);
              programID = GL20.glCreateProgram();
              GL20.glAttachShader(programID,vertexShaderID);
              GL20.glAttachShader(programID,fragmentShaderID);
              GL20.glLinkProgram(programID);
              GL20.glValidateProgram(programID);
              bindAttributes();
          }
          public void start(){
              GL20.glUseProgram(programID);
          }
          public void stop(){
              GL20.glUseProgram(0);
          }

          public void cleanUp(){
              stop();
              GL20.glDetachShader(programID,vertexShaderID);
              GL20.glDetachShader(programID,fragmentShaderID);
              GL20.glDeleteShader(vertexShaderID);
              GL20.glDeleteShader(fragmentShaderID);
              GL20.glDeleteProgram(programID);
          }

          protected void bindAttribute(int attribute,String variableName){
              GL20.glBindAttribLocation(programID,attribute,variableName);
          }

          protected abstract void bindAttributes();

          private static int loadShader(String file,int type){
              StringBuilder shaderSource = new StringBuilder();
              try{
                  BufferedReader reader = new BufferedReader(new FileReader(file));
                  String line;
                  while((line = reader.readLine())!=null){
                      shaderSource.append(line).append("\n");
                  }
              }catch (IOException e){
                  System.out.println("load file error");
                  e.printStackTrace();
                  System.exit(-1);
              }
              int shaderID = GL20.glCreateShader(type);
              GL20.glShaderSource(shaderID,shaderSource);
              GL20.glCompileShader(shaderID);
              if(GL20.glGetShaderi(shaderID,GL20.GL_COMPILE_STATUS)== GL11.GL_FALSE){
                  System.out.println(GL20.glGetShaderInfoLog(shaderID,500));
                  System.out.println("shader compiler error");
                  System.exit(-1);
              }

              return shaderID;
          }

      }

      package org.neroyang.shader;

      /**
       * Author neroyang
       * Email nerosoft@outlook.com
       * Date 2017/5/27
       * Time 下午11:36
       */
      public class StaticShader extends ShaderProgram {

          private static final String VERTEX_FILE = "src/shader/vertexShader.txt";
          private static final String FRAGMENT_FILE = "src/shader/fragmentShader.txt";



          public StaticShader() {
              super(VERTEX_FILE, FRAGMENT_FILE);
          }

          @Override
          protected void bindAttributes() {
              super.bindAttribute(0,"position");
          }
      }


      shader file
      --------------------------------------------
      #version 400 core

      in vec3 colour

      out vec4 out_Color

      int main(void){
          out_Color = vec4(colour,1.0)
      }


      #version 400 core

      in vec3 position

      out vec3 colour;

      void main(void){
          gl_Position = vec4(position,1.0);

          colour = vec3(position.x+0.5,1.0,position.y+0.5);
      }
      ---------- END SOURCE ----------

        Attachments

          Activity

            People

            • Assignee:
              pardesha Pardeep Sharma
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: