# GLSL Shaderprogrammierung in LWJGL 3



## CodingStudios (2. Jun 2018)

```
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffaa01221c7, pid=7384, tid=0x0000000000002a34
#
# JRE version: Java(TM) SE Runtime Environment (8.0_172-b11) (build 1.8.0_172-b11)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.172-b11 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  [lwjgl_opengl.dll+0x121c7]
#
# 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.
#

---------------  T H R E A D  ---------------

Current thread (0x0000000002773000):  JavaThread "main" [_thread_in_native, id=10804, stack(0x0000000002610000,0x0000000002710000)]

siginfo: ExceptionCode=0xc0000005, reading address 0x0000000000000880

Registers:
RAX=0x0000000058fd7de0, RBX=0x000000001bdaea58, RCX=0x0000000000000000, RDX=0x000000000270f6d0
RSP=0x000000000270f648, RBP=0x000000000270f6c0, RSI=0x0000000000000020, RDI=0x000000000287835d
R8 =0x0000000000008b31, R9 =0x0000000002728190, R10=0x0000000002888c3b, R11=0x0000000058a5cdc0
R12=0x0000000000000000, R13=0x000000001bdaea58, R14=0x000000000270f6e0, R15=0x0000000002773000
RIP=0x00007ffaa01221c7, EFLAGS=0x0000000000010206

Top of Stack: (sp=0x000000000270f648)
0x000000000270f648:   0000000002888c67 0000000002773000
0x000000000270f658:   000000001bdaea58 0000000000000020
0x000000000270f668:   0000000002773000 000000000270f758
0x000000000270f678:   0000000002888962 000000000270f680
0x000000000270f688:   000000001bdaea58 000000000270f6e0
0x000000000270f698:   000000001bdbf760 0000000000000000
0x000000000270f6a8:   000000001bdaea58 0000000000000000
0x000000000270f6b8:   000000000270f6e0 000000000270f728
0x000000000270f6c8:   0000000002877da0 000000076b04c898
0x000000000270f6d8:   00000000028821d6 0000000000008b31
0x000000000270f6e8:   000000000270f6e8 000000001bdaaf5e
0x000000000270f6f8:   000000000270f758 000000001bdab0a8
0x000000000270f708:   0000000000000000 000000001bdab020
0x000000000270f718:   000000000270f6e0 000000000270f750
0x000000000270f728:   000000000270f7a8 0000000002877da0
0x000000000270f738:   0000000000000000 000000076ae3ea28

Instructions: (pc=0x00007ffaa01221c7)
0x00007ffaa01221a7:   48 8b 81 40 1b 00 00 41 8b c8 48 ff e0 cc cc cc
0x00007ffaa01221b7:   cc cc cc cc cc cc cc cc cc 48 8b 01 48 8b 48 18
0x00007ffaa01221c7:   48 8b 81 80 08 00 00 41 8b c8 48 ff e0 cc cc cc
0x00007ffaa01221d7:   cc cc cc cc cc cc cc cc cc 48 8b 01 41 8b c8 48


Register to memory mapping:

RAX=0x0000000058fd7de0 is an unknown value
RBX={method} {0x000000001bdaea60} 'glCreateShader' '(I)I' in 'org/lwjgl/opengl/GL20'
RCX=0x0000000000000000 is an unknown value
RDX=0x000000000270f6d0 is pointing into the stack for thread: 0x0000000002773000
RSP=0x000000000270f648 is pointing into the stack for thread: 0x0000000002773000
RBP=0x000000000270f6c0 is pointing into the stack for thread: 0x0000000002773000
RSI=0x0000000000000020 is an unknown value
RDI=0x000000000287835d is at code_begin+2301 in an Interpreter codelet
invoke return entry points  [0x0000000002877a60, 0x0000000002878440]  2528 bytes
R8 =0x0000000000008b31 is an unknown value
R9 =0x0000000002728190 is an unknown value
R10=0x0000000002888c3b is at code_begin+891 in an Interpreter codelet
method entry point (kind = native)  [0x00000000028888c0, 0x0000000002889280]  2496 bytes
R11=0x0000000058a5cdc0 is an unknown value
R12=0x0000000000000000 is an unknown value
R13={method} {0x000000001bdaea60} 'glCreateShader' '(I)I' in 'org/lwjgl/opengl/GL20'
R14=0x000000000270f6e0 is pointing into the stack for thread: 0x0000000002773000
R15=0x0000000002773000 is a thread


Stack: [0x0000000002610000,0x0000000002710000],  sp=0x000000000270f648,  free space=1021k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [lwjgl_opengl.dll+0x121c7]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  org.lwjgl.opengl.GL20.glCreateShader(I)I+0
j  com.gengine.renderer.shaders.GLSLProgram.loadShader(Ljava/lang/String;I)I+78
j  com.gengine.renderer.shaders.GLSLProgram.<init>(Ljava/lang/String;Ljava/lang/String;)V+8
j  com.gengine.renderer.shaders.StaticShaders.<init>()V+5
j  com.Engine.Engine.<init>()V+31
j  com.Engine.Engine.main([Ljava/lang/String;)V+67
v  ~StubRoutines::call_stub

---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
  0x000000001e328000 JavaThread "Service Thread" daemon [_thread_blocked, id=4332, stack(0x000000001ee80000,0x000000001ef80000)]
  0x000000001e29a800 JavaThread "C1 CompilerThread3" daemon [_thread_blocked, id=8308, stack(0x000000001ed80000,0x000000001ee80000)]
  0x000000001e294000 JavaThread "C2 CompilerThread2" daemon [_thread_blocked, id=3820, stack(0x000000001ec80000,0x000000001ed80000)]
  0x000000001e28f000 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=8312, stack(0x000000001eb80000,0x000000001ec80000)]
  0x000000001e28a800 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=9512, stack(0x000000001ea80000,0x000000001eb80000)]
  0x000000001e289000 JavaThread "Attach Listener" daemon [_thread_blocked, id=17972, stack(0x000000001e980000,0x000000001ea80000)]
  0x000000001e288000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=9680, stack(0x000000001e880000,0x000000001e980000)]
  0x000000001e280800 JavaThread "Finalizer" daemon [_thread_blocked, id=16888, stack(0x000000001e660000,0x000000001e760000)]
  0x000000000286a800 JavaThread "Reference Handler" daemon [_thread_blocked, id=17860, stack(0x000000001e160000,0x000000001e260000)]
=>0x0000000002773000 JavaThread "main" [_thread_in_native, id=10804, stack(0x0000000002610000,0x0000000002710000)]

Other Threads:
  0x000000001c388800 VMThread [stack: 0x000000001e060000,0x000000001e160000] [id=6772]
  0x000000001e346800 WatcherThread [stack: 0x000000001ef80000,0x000000001f080000] [id=5972]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap:
 PSYoungGen      total 76288K, used 7893K [0x000000076ad80000, 0x0000000770280000, 0x00000007c0000000)
  eden space 65536K, 12% used [0x000000076ad80000,0x000000076b5354c8,0x000000076ed80000)
  from space 10752K, 0% used [0x000000076f800000,0x000000076f800000,0x0000000770280000)
  to   space 10752K, 0% used [0x000000076ed80000,0x000000076ed80000,0x000000076f800000)
 ParOldGen       total 175104K, used 0K [0x00000006c0800000, 0x00000006cb300000, 0x000000076ad80000)
  object space 175104K, 0% used [0x00000006c0800000,0x00000006c0800000,0x00000006cb300000)
 Metaspace       used 5782K, capacity 6040K, committed 6144K, reserved 1056768K
  class space    used 657K, capacity 742K, committed 768K, reserved 1048576K

Card table byte_map: [0x0000000011c30000,0x0000000012430000] byte_map_base: 0x000000000e62c000

Marking Bits: (ParMarkBitMap*) 0x0000000059053c10
 Begin Bits: [0x0000000013190000, 0x0000000017170000)
 End Bits:   [0x0000000017170000, 0x000000001b150000)

Polling page: 0x0000000000c10000

CodeCache: size=245760Kb used=2088Kb max_used=2100Kb free=243671Kb
 bounds [0x0000000002870000, 0x0000000002ae0000, 0x0000000011870000]
 total_blobs=779 nmethods=448 adapters=244
 compilation: enabled

Compilation events (10 events):
Event: 0.168 Thread 0x000000001e28f000  443       4       java.lang.String::<init> (82 bytes)
Event: 0.168 Thread 0x000000001e29a800  444       3       java.lang.String::regionMatches (149 bytes)
Event: 0.168 Thread 0x000000001e29a800 nmethod 444 0x0000000002a776d0 code [0x0000000002a77920, 0x0000000002a785f8]
Event: 0.169 Thread 0x000000001e29a800  445       3       java.lang.String::equalsIgnoreCase (48 bytes)
Event: 0.169 Thread 0x000000001e29a800 nmethod 445 0x0000000002a78f90 code [0x0000000002a79100, 0x0000000002a79468]
Event: 0.169 Thread 0x000000001e28a800 nmethod 442 0x0000000002a7c750 code [0x0000000002a7c8a0, 0x0000000002a7ca78]
Event: 0.170 Thread 0x000000001e28f000 nmethod 443 0x0000000002a7ab50 code [0x0000000002a7aca0, 0x0000000002a7afd8]
Event: 0.170 Thread 0x000000001e29a800  447       3       java.lang.CharacterDataLatin1::toUpperCase (53 bytes)
Event: 0.170 Thread 0x000000001e29a800 nmethod 447 0x0000000002a7a590 code [0x0000000002a7a700, 0x0000000002a7a9f0]
Event: 0.172 Thread 0x000000001e294000  448       4       sun.nio.cs.UTF_8$Encoder::encode (359 bytes)

GC Heap History (0 events):
No events

Deoptimization events (0 events):
No events

Classes redefined (0 events):
No events

Internal exceptions (10 events):
Event: 0.023 Thread 0x0000000002773000 Exception <a 'java/lang/NoSuchMethodError': Method sun.misc.Unsafe.prefetchRead(Ljava/lang/Object;J)V name or signature does not match> (0x000000076ad87f98) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u172\10810\hotspot\src\share\vm\prim
Event: 0.106 Thread 0x0000000002773000 Exception <a 'java/lang/NoSuchFieldError': method resolution failed> (0x000000076b170330) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u172\10810\hotspot\src\share\vm\prims\methodHandles.cpp, line 1167]
Event: 0.107 Thread 0x0000000002773000 Exception <a 'java/lang/NoSuchFieldError': method resolution failed> (0x000000076b17d700) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u172\10810\hotspot\src\share\vm\prims\methodHandles.cpp, line 1167]
Event: 0.125 Thread 0x0000000002773000 Exception <a 'java/lang/NoSuchMethodError': java.lang.Object.lambda$static$0(Ljava/lang/String;)Ljava/lang/Boolean;> (0x000000076b281bd0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u172\10810\hotspot\src\share\vm\interpreter\linkResolve
Event: 0.129 Thread 0x0000000002773000 Exception <a 'java/security/PrivilegedActionException'> (0x000000076b2af7c0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u172\10810\hotspot\src\share\vm\prims\jvm.cpp, line 1435]
Event: 0.129 Thread 0x0000000002773000 Exception <a 'java/security/PrivilegedActionException'> (0x000000076b2af9d0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u172\10810\hotspot\src\share\vm\prims\jvm.cpp, line 1435]
Event: 0.130 Thread 0x0000000002773000 Exception <a 'java/security/PrivilegedActionException'> (0x000000076b2b38e0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u172\10810\hotspot\src\share\vm\prims\jvm.cpp, line 1435]
Event: 0.130 Thread 0x0000000002773000 Exception <a 'java/security/PrivilegedActionException'> (0x000000076b2b3af0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u172\10810\hotspot\src\share\vm\prims\jvm.cpp, line 1435]
Event: 0.164 Thread 0x0000000002773000 Exception <a 'sun/nio/fs/WindowsException'> (0x000000076b39c318) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u172\10810\hotspot\src\share\vm\prims\jni.cpp, line 709]
Event: 0.164 Thread 0x0000000002773000 Exception <a 'sun/nio/fs/WindowsException'> (0x000000076b39cb48) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u172\10810\hotspot\src\share\vm\prims\jni.cpp, line 709]

Events (10 events):
Event: 0.170 loading class org/lwjgl/system/jni/JNINativeInterface
Event: 0.170 loading class org/lwjgl/system/jni/JNINativeInterface done
Event: 0.170 loading class org/lwjgl/system/windows/WinBase
Event: 0.170 loading class org/lwjgl/system/windows/WinBase done
Event: 0.171 loading class org/lwjgl/opengl/GL$1
Event: 0.171 loading class org/lwjgl/opengl/GL$1 done
Event: 0.171 loading class org/lwjgl/opengl/GL$SharedLibraryGL
Event: 0.171 loading class org/lwjgl/opengl/GL$SharedLibraryGL done
Event: 0.172 loading class org/lwjgl/system/SharedLibrary$Delegate
Event: 0.172 loading class org/lwjgl/system/SharedLibrary$Delegate done


Dynamic libraries:
0x00007ff74a520000 - 0x00007ff74a557000    C:\Program Files\Java\jdk1.8.0_172\bin\javaw.exe
0x00007ffacabd0000 - 0x00007ffacadb1000    C:\WINDOWS\SYSTEM32\ntdll.dll
0x00007ffab1d50000 - 0x00007ffab1d84000    C:\Program Files\AVAST Software\Avast\x64\aswhooka.dll
0x00007ffac8c00000 - 0x00007ffac8cb2000    C:\WINDOWS\System32\KERNEL32.DLL
0x00007ffac6ff0000 - 0x00007ffac7263000    C:\WINDOWS\System32\KERNELBASE.dll
0x00007ffaca2b0000 - 0x00007ffaca351000    C:\WINDOWS\System32\ADVAPI32.dll
0x00007ffacaa50000 - 0x00007ffacaaee000    C:\WINDOWS\System32\msvcrt.dll
0x00007ffaca820000 - 0x00007ffaca87b000    C:\WINDOWS\System32\sechost.dll
0x00007ffac8060000 - 0x00007ffac8184000    C:\WINDOWS\System32\RPCRT4.dll
0x00007ffac8cc0000 - 0x00007ffac8e50000    C:\WINDOWS\System32\USER32.dll
0x00007ffac7d10000 - 0x00007ffac7d30000    C:\WINDOWS\System32\win32u.dll
0x00007ffaca930000 - 0x00007ffaca958000    C:\WINDOWS\System32\GDI32.dll
0x00007ffac7b70000 - 0x00007ffac7d02000    C:\WINDOWS\System32\gdi32full.dll
0x00007ffac7f60000 - 0x00007ffac7fff000    C:\WINDOWS\System32\msvcp_win.dll
0x00007ffac7d30000 - 0x00007ffac7e2a000    C:\WINDOWS\System32\ucrtbase.dll
0x00007ffab7780000 - 0x00007ffab79e9000    C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.17134.81_none_b4b229fe3cb4cfa3\COMCTL32.dll
0x00007ffac8600000 - 0x00007ffac8923000    C:\WINDOWS\System32\combase.dll
0x00007ffac7e30000 - 0x00007ffac7eaa000    C:\WINDOWS\System32\bcryptPrimitives.dll
0x00007ffacaaf0000 - 0x00007ffacab1d000    C:\WINDOWS\System32\IMM32.DLL
0x0000000058320000 - 0x00000000583f2000    C:\Program Files\Java\jdk1.8.0_172\jre\bin\msvcr100.dll
0x0000000058830000 - 0x00000000590d3000    C:\Program Files\Java\jdk1.8.0_172\jre\bin\server\jvm.dll
0x00007ffac8e50000 - 0x00007ffac8e58000    C:\WINDOWS\System32\PSAPI.DLL
0x00007ffac28a0000 - 0x00007ffac28a9000    C:\WINDOWS\SYSTEM32\WSOCK32.dll
0x00007ffaca360000 - 0x00007ffaca3cc000    C:\WINDOWS\System32\WS2_32.dll
0x00007ffac10d0000 - 0x00007ffac10f3000    C:\WINDOWS\SYSTEM32\WINMM.dll
0x00007ffac3650000 - 0x00007ffac365a000    C:\WINDOWS\SYSTEM32\VERSION.dll
0x00007ffac10a0000 - 0x00007ffac10ca000    C:\WINDOWS\SYSTEM32\WINMMBASE.dll
0x00007ffac6fa0000 - 0x00007ffac6fe9000    C:\WINDOWS\System32\cfgmgr32.dll
0x0000000058740000 - 0x000000005874f000    C:\Program Files\Java\jdk1.8.0_172\jre\bin\verify.dll
0x0000000058710000 - 0x0000000058739000    C:\Program Files\Java\jdk1.8.0_172\jre\bin\java.dll
0x00000000586f0000 - 0x0000000058706000    C:\Program Files\Java\jdk1.8.0_172\jre\bin\zip.dll
0x00007ffac8e60000 - 0x00007ffaca2a0000    C:\WINDOWS\System32\SHELL32.dll
0x00007ffaca880000 - 0x00007ffaca929000    C:\WINDOWS\System32\shcore.dll
0x00007ffac7460000 - 0x00007ffac7b6d000    C:\WINDOWS\System32\windows.storage.dll
0x00007ffac8ad0000 - 0x00007ffac8b21000    C:\WINDOWS\System32\shlwapi.dll
0x00007ffac6f80000 - 0x00007ffac6f91000    C:\WINDOWS\System32\kernel.appcore.dll
0x00007ffac6f60000 - 0x00007ffac6f7f000    C:\WINDOWS\System32\profapi.dll
0x00007ffac6f10000 - 0x00007ffac6f5c000    C:\WINDOWS\System32\powrprof.dll
0x00007ffac6ee0000 - 0x00007ffac6eea000    C:\WINDOWS\System32\FLTLIB.DLL
0x00000000586d0000 - 0x00000000586ea000    C:\Program Files\Java\jdk1.8.0_172\jre\bin\net.dll
0x00007ffac6760000 - 0x00007ffac67c6000    C:\WINDOWS\system32\mswsock.dll
0x00000000586b0000 - 0x00000000586c1000    C:\Program Files\Java\jdk1.8.0_172\jre\bin\nio.dll
0x00007ffaa7cb0000 - 0x00007ffaa7d07000    C:\Users\GMasterHD\AppData\Local\Temp\lwjglGMasterHD\3.1.2-build-29\lwjgl.dll
0x00007ffaa0110000 - 0x00007ffaa016c000    C:\Users\GMasterHD\AppData\Local\Temp\lwjglGMasterHD\3.1.2-build-29\lwjgl_opengl.dll
0x00007ffaaa320000 - 0x00007ffaaa440000    C:\WINDOWS\SYSTEM32\opengl32.dll
0x00007ffabbdd0000 - 0x00007ffabbdfc000    C:\WINDOWS\SYSTEM32\GLU32.dll
0x00007ffac0b50000 - 0x00007ffac0d19000    C:\WINDOWS\SYSTEM32\dbghelp.dll

VM Arguments:
jvm_args: -Dfile.encoding=Cp1252
java_command: com.Engine.Engine
java_class_path (initial): P:\Games\3D\Engine\Engine\bin;P:\SDKs\LWJGL 3\joml-1.9.9.jar;P:\SDKs\LWJGL 3\joml-1.9.9-sources.jar;P:\SDKs\LWJGL 3\lwjgl.jar;P:\SDKs\LWJGL 3\lwjgl-assimp.jar;P:\SDKs\LWJGL 3\lwjgl-assimp-natives-windows.jar;P:\SDKs\LWJGL 3\lwjgl-assimp-sources.jar;P:\SDKs\LWJGL 3\lwjgl-bgfx.jar;P:\SDKs\LWJGL 3\lwjgl-bgfx-natives-windows.jar;P:\SDKs\LWJGL 3\lwjgl-bgfx-sources.jar;P:\SDKs\LWJGL 3\lwjgl-egl.jar;P:\SDKs\LWJGL 3\lwjgl-egl-sources.jar;P:\SDKs\LWJGL 3\lwjgl-glfw.jar;P:\SDKs\LWJGL 3\lwjgl-glfw-natives-windows.jar;P:\SDKs\LWJGL 3\lwjgl-glfw-sources.jar;P:\SDKs\LWJGL 3\lwjgl-jawt.jar;P:\SDKs\LWJGL 3\lwjgl-jawt-sources.jar;P:\SDKs\LWJGL 3\lwjgl-jemalloc.jar;P:\SDKs\LWJGL 3\lwjgl-jemalloc-natives-windows.jar;P:\SDKs\LWJGL 3\lwjgl-jemalloc-sources.jar;P:\SDKs\LWJGL 3\lwjgl-lmdb.jar;P:\SDKs\LWJGL 3\lwjgl-lmdb-natives-windows.jar;P:\SDKs\LWJGL 3\lwjgl-lmdb-sources.jar;P:\SDKs\LWJGL 3\lwjgl-nanovg.jar;P:\SDKs\LWJGL 3\lwjgl-nanovg-natives-windows.jar;P:\SDKs\LWJGL 3\lwjgl-nanovg-sources.jar;P:\SDKs\LWJGL 3\lwjgl-natives-windows.jar;P:\SDKs\LWJGL 3\lwjgl-nfd.jar;P:\SDKs\LWJGL 3\lwjgl-nfd-natives-windows.jar;P:\SDKs\LWJGL 3\lwjgl-nfd-sources.jar;P:\SDKs\LWJGL 3\lwjgl-nuklear.jar;P:\SDKs\LWJGL 3\lwjgl-nuklear-natives-windows.jar;P:\SDKs\LWJGL 3\lwjgl-nuklear-sources.jar;P:\SDKs\LWJGL 3\lwjgl-openal.jar;P:\SDKs\LWJGL 3\lwjgl-openal-natives-windows.jar;P:\SDKs\LWJGL 3\lwjgl-openal-sources.jar;P:\SDKs\LWJGL 3\lwjgl-opencl.jar;P:\SDKs\LWJGL 3\lwjgl-opencl-sources.jar;P:\SDKs\LWJGL 3\lwjgl-opengl.jar;P:\SDKs\LWJGL 3\lwjgl-opengles.jar;P:\SDKs\LWJGL 3\lwjgl-opengles-natives-windows.jar;P:\SDKs\LWJGL 3\lwjgl-opengles-sources.jar;P:\SDKs\LWJGL 3\lwjgl-opengl-natives-windows.jar;P:\SDKs\LWJGL 3\lwjgl-opengl-sources.jar;P:\SDKs\LWJGL 3\lwjgl-par.jar;P:\SDKs\LWJGL 3\lwjgl-par-natives-windows.jar;P:\SDKs\LWJGL 3\lwjgl-par-sources.jar;P:\SDKs\LWJGL 3\lwjgl-sources.jar;P:\SDKs\LWJGL 3\lwjgl-sse.jar;P:\SDKs\LWJGL 3\lwjgl-sse-natives-windows.jar;P:\SDKs\LW
Launcher Type: SUN_STANDARD

Environment Variables:
PATH=C:/Program Files/Java/jdk1.8.0_172/jre/bin/server;C:/Program Files/Java/jdk1.8.0_172/jre/bin;C:/Program Files/Java/jdk1.8.0_172/jre/lib/amd64;C:\Program Files (x86)\Razer Chroma SDK\bin;C:\Program Files\Razer Chroma SDK\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\dotnet\;C:\Users\mondb\AppData\Local\Microsoft\WindowsApps;E:\Programme\VS Code\bin;C:\Users\mondb\AppData\Local\atom\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Windows Live\Shared;C:\Users\mondb\AppData\Local\Microsoft\WindowsApps;E:\Programme\VS Code\bin;C:\Users\mondb\AppData\Local\atom\bin;C:\Users\GMasterHD\AppData\Local\atom\bin;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;;C:\WINDOWS\System32;
USERNAME=GMasterHD
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 158 Stepping 9, GenuineIntel



---------------  S Y S T E M  ---------------

OS: Windows 10.0 , 64 bit Build 17134 (10.0.17134.1)

CPU:total 8 (initial active 8) (4 cores per cpu, 2 threads per core) family 6 model 158 stepping 9, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, rtm, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx

Memory: 4k page, physical 16740952k(10802368k free), swap 19755608k(10687632k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (25.172-b11) for windows-amd64 JRE (1.8.0_172-b11), built on Mar 28 2018 21:21:52 by "java_re" with MS VC++ 10.0 (VS2010)

time: Sat Jun 02 20:12:32 2018
elapsed time: 0 seconds (0d 0h 0m 0s)
```
Sorry wars doch nicht, jetzt wird garnichts mehr geladen


----------



## httpdigest (2. Jun 2018)

Eventuell rufst du glCreateShader() auf noch bevor du überhaupt einen OpenGL Kontext per glfwCreateWindow() und glfwMakeContextCurrent() erzeugt und in LWJGL3 mittels GL.createCapabilities() initialisiert hast. Zeig mal deinen Code von com.Engine.Engine.main(), vom com.Engine.Engine Konstruktor, com.gengine.renderer.shaders.StaticShaders Konstruktor, com.gengine.renderer.shaders.GLSLProgram Konstruktor und der com.gengine.renderer.shaders.GLSLProgram.loadShader() Methode.

Solche Arten von Fehlern kannst du mit Hilfe des Java Agents https://github.com/LWJGLX/debug aufspüren. Den kannst du auf https://www.lwjgl.org/customize mit dem Bundle herunterladen. Einfach den Haken unter "Addons" bei "LWJGLX/debug v1.0.0" setzen und dein Programm mit dem JVM Argument `-javaagent:lwjglx-debug-1.0.0.jar` starten.


----------



## CodingStudios (2. Jun 2018)

com.Engine.Engine.main():


```
public long createWindow(long window, int width, int height, Vector3i backgroundColor) {
        GLFWErrorCallback.createPrint(System.err).set();
        GLFW.glfwInit();
        window = GLFW.glfwCreateWindow(width, height, properties.getGameName() + " " + new GMath().getVersion(properties.getGameVersion()), 0, 0);
        GLFWVidMode vidmode = GLFW.glfwGetVideoMode(GLFW.glfwGetPrimaryMonitor());
        GLFW.glfwSetWindowPos(window, vidmode.width() / 2 - width / 2, vidmode.height() / 2 - height / 2);
        GLFW.glfwMakeContextCurrent(window);
        GL.createCapabilities();
        GL11.glClearColor(new GMath().getOpenGLColor(backgroundColor.x), new GMath().getOpenGLColor(backgroundColor.y), new GMath().getOpenGLColor(backgroundColor.z), 1);
       
        return window;
    }
    public void destroyWindow(long window) {
        GLFW.glfwDestroyWindow(window);
    }
    public void release() {
        GLFWErrorCallback.createPrint(null).free();
        GLFW.glfwTerminate();
    }
```


----------



## httpdigest (2. Jun 2018)

CodingStudios hat gesagt.:


> com.Engine.Engine.main():
> 
> 
> ```
> ...


Das ist mit Sicherheit nicht der Inhalt der
com.Engine.Engine.main() Methode.
Ich wiederhole: Zeige bitte mal den Code von:
- com.Engine.Engine.main()
- com.Engine.Engine Konstruktor
- com.gengine.renderer.shaders.StaticShaders Konstruktor
- com.gengine.renderer.shaders.GLSLProgram Konstruktor
- com.gengine.renderer.shaders.GLSLProgram.loadShader()
Verwende zuerst einmal den LWJGLX/debug Agent, indem du dein Programm mit dem JVM Argument `-javaagent:lwjglx-debug-1.0.0.jar` startest und poste die stdout und stderr Ausgaben hier.

Bei spezifischeren LWJGL-Problemen, wende dich auch bitte an http://forum.lwjgl.org/. Dort kann dir weiterführend geholfen werden.


----------



## CodingStudios (2. Jun 2018)

Wenn ich das Projekt mit dem JVM Argument starte kommt dieser Fehler :

```
Error opening zip file or JAR manifest missing : lwjglx-debug-1.0.0.jar
Error occurred during initialization of VM
agent library failed to init: instrument
```


----------



## httpdigest (2. Jun 2018)

CodingStudios hat gesagt.:


> Wenn ich das Projekt mit dem JVM Argument starte kommt dieser Fehler :
> 
> ```
> Error opening zip file or JAR manifest missing : lwjglx-debug-1.0.0.jar
> ...


Die Datei lwjglx-debug-1.0.0.jar muss sich auch in dem Ausführungsverzeichnis deines Programmes befinden. Falls du nicht weißt, was ein Ausführungsverzeichnis ist oder welches das ist, gib hinter -javaagent: den absoluten Dateisystempfad zu lwjglx-debug-1.0.0.jar an.

Ich wiederhole: Zeige bitte mal den Code von:
- com.Engine.Engine.main()
- com.Engine.Engine Konstruktor
- com.gengine.renderer.shaders.StaticShaders Konstruktor
- com.gengine.renderer.shaders.GLSLProgram Konstruktor
- com.gengine.renderer.shaders.GLSLProgram.loadShader()


----------



## CodingStudios (2. Jun 2018)

Ich hab jetzt den komplettne Pfad dahnitergehongen -javaagent:p:\SDKs\LWJGL 3\lwjglx-debug-1.0.0.jar

Immernoch der selbe Fehler


----------



## httpdigest (2. Jun 2018)

Leerzeichen in Pfaden sind IMMER schlecht. Versuch's mal mit:
`-javaagent:"P\SDKs\LWJGL 3\lwjglx-debug-1.0.0.jar"`


----------



## CodingStudios (2. Jun 2018)

```
[LWJGL] Version: 3.1.2 build 29
[LWJGL]      OS: Windows 10 v10.0
[LWJGL]     JRE: 1.8.0_172 amd64
[LWJGL]     JVM: Java HotSpot(TM) 64-Bit Server VM v25.172-b11 by Oracle Corporation
[LWJGL] Loading library (system): lwjgl
[LWJGL]     Using SharedLibraryLoader...
[LWJGL]     Found at: C:\Users\GMASTE~1\AppData\Local\Temp\lwjglGMasterHD\3.1.2-build-29\lwjgl.dll
[LWJGL]     Loaded from org.lwjgl.librarypath: C:\Users\GMASTE~1\AppData\Local\Temp\lwjglGMasterHD\3.1.2-build-29\lwjgl.dll
[LWJGL] Loading library (system): lwjgl_opengl
[LWJGL]     Using SharedLibraryLoader...
[LWJGL]     Found at: C:\Users\GMASTE~1\AppData\Local\Temp\lwjglGMasterHD\3.1.2-build-29\lwjgl_opengl.dll
[LWJGL]     Loaded from org.lwjgl.librarypath: C:\Users\GMASTE~1\AppData\Local\Temp\lwjglGMasterHD\3.1.2-build-29\lwjgl_opengl.dll
[LWJGL] Loading library: opengl32
[LWJGL]     opengl32.dll not found in org.lwjgl.librarypath=C:\Users\GMASTE~1\AppData\Local\Temp\lwjglGMasterHD\3.1.2-build-29
[LWJGL] MemoryUtil accessor: MemoryAccessorUnsafe
[LWJGL]     Loaded from system paths
Exception in thread "main" java.lang.IllegalStateException: No GLCapabilities instance set for the current thread. Possible solutions:
    a) Call GL.createCapabilities() after making a context current in the current thread.
    b) Call GL.setCapabilities() if a GLCapabilities instance already exists for the current context.
    at org.lwjgl.opengl.GL.checkCapabilities(GL.java:249)
    at org.lwjgl.opengl.GL.getCapabilities(GL.java:244)
    at org.lwjglx.debug.$Proxy$8.42(Unknown Source)
    at com.gengine.renderer.shaders.GLSLProgram.loadShader(GLSLProgram.java:64)
    at com.gengine.renderer.shaders.GLSLProgram.<init>(GLSLProgram.java:19)
    at com.gengine.renderer.shaders.StaticShaders.<init>(StaticShaders.java:10)
    at com.craftmechanics.CraftMechanics.<init>(CraftMechanics.java:21)
    at com.craftmechanics.CraftMechanics.main(CraftMechanics.java:45)
```

Errorcode


----------



## CodingStudios (2. Jun 2018)

Fehlerhafte Methode


```
private static int loadShader(String file, int type) {
        StringBuilder shaderSource = new StringBuilder();
        try {
            BufferedReader reader = new BufferedReader(new InputStreamReader(GLSLProgram.class.getResourceAsStream(file)));
            String line;
            while((line = reader.readLine()) != null) {
                shaderSource.append(line).append("\n");
            }
            reader.close();
        } catch(IOException e) {
            new Console().writeLine("Could not found file: " + file);
            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) {
            new Console().writeLine(GL20.glGetShaderInfoLog(shaderID, 500));
            new Console().writeError("Could not compile Shader!");
            System.exit(-1);
        }
       
        return shaderID;
    }
```


----------



## httpdigest (2. Jun 2018)

Wie ich sagte: *Du rufst OpenGL Funktionen/Methoden auf, bevor du per GL.createCapabilities() überhaupt einen OpenGL Kontext erzeugst*. Prüfe mit einem Debugger Step-by-Step, welche Methoden dein Programm ganz genau zu welchem Zeitpunkt und in welcher Reihenfolge aufruft.


----------



## CodingStudios (2. Jun 2018)

httpdigest hat gesagt.:


> Wie ich sagte: *Du rufst OpenGL Funktionen/Methoden auf, bevor du per GL.createCapabilities() überhaupt einen OpenGL Kontext erzeugst*. Prüfe mit einem Debugger Step-by-Step, welche Methoden dein Programm ganz genau zu welchem Zeitpunkt und in welcher Reihenfolge aufruft.



Brauchte man dies in LWJGL 2 nicht, der Code stammte nähmlich aus LWJGL 2 und da hat alles funktioniert


----------



## CodingStudios (2. Jun 2018)

Jetzt funktioniert alles vielen Dank


----------

