Hello Guest

Recent Posts

Pages: 1 2 [3] 4 5 ... 10
21
Bug Reports / RFE / Re: EGL VM Crashes
« Last post by spasi on May 29, 2019, 08:27:47 »
Thanks, reproduced. It's the first line that actually does the trick. It looks like the libEGL.dll that Chrome ships is implicitly linked with libGLESv2.dll. When libEGL.dll is loaded, Windows tries to resolve libGLESv2.dll automatically, but it doesn't know anything about Java's library path. The missing functions cannot be found anywhere else so the process crashes. By loading libGLESv2.dll explicitly before libEGL.dll, the functions are already available and linkage is successful.

This is not standard behavior of course and a normal EGL implementation wouldn't have such a dependency (it doesn't make much sense either, you first create a context with EGL and then use OpenGL ES with that context). However, this is an implementation that is private to Chrome and there's probably a useful reason it works like that. It's just not meant to be used outside Chrome.

If you don't have another EGL/GLES implementation available, here are a few other workarounds that should work, without messing with System.load (meant for JNI libraries):

- Put the two dlls in the application's working directory.
- Add ./libs/natives to the PATH environment variable.
- Initialize the GLES bindings before EGL. Calling GLES.getFunctionProvider() should be enough. (recommended)

For more information: Dynamic-Link Library Search Order
22
Bug Reports / RFE / Re: EGL VM Crashes
« Last post by smith on May 28, 2019, 16:24:56 »
I do this first thing in main:

Code: [Select]
    System.load(new File("./libs/natives/libGLESv2.dll").getAbsolutePath());
    System.load(new File("./libs/natives/libEGL.dll").getAbsolutePath());
23
Bug Reports / RFE / Re: EGL VM Crashes
« Last post by spasi on May 28, 2019, 07:53:49 »
What is the exact workaround you use? How do you load libEGL.dll explicitly when it works? Also, did you also have to copy libGLESv2.dll in the same folder for it to work?
24
Bug Reports / RFE / Re: EGL VM Crashes
« Last post by smith on May 27, 2019, 23:07:18 »
As another data point, I tried adding the folder with the dll's to the classpath rather than java.library.path and got:
Code: [Select]
[LWJGL] Version: 3.2.3 build 3
[LWJGL] OS: Windows 10 v10.0
[LWJGL] JRE: 11.0.1 amd64
[LWJGL] JVM: OpenJDK 64-Bit Server VM v11.0.1+13 by Oracle Corporation
[LWJGL] Loading library (system): lwjgl
[LWJGL] Using SharedLibraryLoader...
[LWJGL] Found at: C:\Users\ssmith2\AppData\Local\Temp\lwjglssmith2\3.2.3-build-3\lwjgl.dll
[LWJGL] Found at: C:\Users\ssmith2\AppData\Local\Temp\lwjglssmith2\3.2.3-build-3\lwjgl.dll
[LWJGL] Loaded from org.lwjgl.librarypath: C:\Users\ssmith2\AppData\Local\Temp\lwjglssmith2\3.2.3-build-3\lwjgl.dll
[LWJGL] Loading library: libEGL
[LWJGL] Using SharedLibraryLoader...
[LWJGL]     Extracting: /C:/Users/ssmith2/Dropbox/workspace/Machina/libs/natives/libEGL.dll
[LWJGL] Loaded from org.lwjgl.librarypath: C:\Users\ssmith2\AppData\Local\Temp\lwjglssmith2\3.2.3-build-3\libEGL.dll
Error loading EGL entry points.
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000000000000, pid=7588, tid=12160
#
# JRE version: OpenJDK Runtime Environment (11.0.1+13) (build 11.0.1+13)
# Java VM: OpenJDK 64-Bit Server VM (11.0.1+13, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
# Problematic frame:
# C  0x0000000000000000
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\ssmith2\Dropbox\workspace\Machina\hs_err_pid7588.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.
#
25
Bug Reports / RFE / Re: EGL VM Crashes
« Last post by smith on May 27, 2019, 23:04:21 »
With Hack:
Code: [Select]
[LWJGL] Version: 3.2.3 build 3
[LWJGL] OS: Windows 10 v10.0
[LWJGL] JRE: 11.0.1 amd64
[LWJGL] JVM: OpenJDK 64-Bit Server VM v11.0.1+13 by Oracle Corporation
[LWJGL] Loading library (system): lwjgl
[LWJGL] Using SharedLibraryLoader...
[LWJGL] Found at: C:\Users\ssmith2\AppData\Local\Temp\lwjglssmith2\3.2.3-build-3\lwjgl.dll
[LWJGL] Found at: C:\Users\ssmith2\AppData\Local\Temp\lwjglssmith2\3.2.3-build-3\lwjgl.dll
[LWJGL] Loaded from org.lwjgl.librarypath: C:\Users\ssmith2\AppData\Local\Temp\lwjglssmith2\3.2.3-build-3\lwjgl.dll
[LWJGL] Loading library: libEGL
[LWJGL] libEGL.dll not found in org.lwjgl.librarypath=C:\Users\ssmith2\AppData\Local\Temp\lwjglssmith2\3.2.3-build-3
[LWJGL] Loaded from system paths: C:\Users\ssmith2\Dropbox\workspace\Machina\libs\natives\libEGL.dll
[LWJGL] Java 10 multiplyHigh enabled
[LWJGL] Java 9 check intrinsics enabled
[LWJGL] Loading library (system): lwjgl_opengles
[LWJGL] Using SharedLibraryLoader...
[LWJGL] Found at: C:\Users\ssmith2\AppData\Local\Temp\lwjglssmith2\3.2.3-build-3\lwjgl_opengles.dll
[LWJGL] Loaded from org.lwjgl.librarypath: C:\Users\ssmith2\AppData\Local\Temp\lwjglssmith2\3.2.3-build-3\lwjgl_opengles.dll
[LWJGL] Loading library: libGLESv2
[LWJGL] libGLESv2.dll not found in org.lwjgl.librarypath=C:\Users\ssmith2\AppData\Local\Temp\lwjglssmith2\3.2.3-build-3
[LWJGL] Loaded from system paths: C:\Users\ssmith2\Dropbox\workspace\Machina\libs\natives\libGLESv2.dll
[LWJGL] Warning: Failed to instantiate memory allocator: org.lwjgl.system.jemalloc.JEmallocAllocator. Using the system default.
[LWJGL] MemoryUtil allocator: StdlibAllocator
[LWJGL] Java 10 memcpy enabled

Without Hack:
Code: [Select]
[LWJGL] Version: 3.2.3 build 3
[LWJGL] OS: Windows 10 v10.0
[LWJGL] JRE: 11.0.1 amd64
[LWJGL] JVM: OpenJDK 64-Bit Server VM v11.0.1+13 by Oracle Corporation
[LWJGL] Loading library (system): lwjgl
[LWJGL] Using SharedLibraryLoader...
[LWJGL] Found at: C:\Users\ssmith2\AppData\Local\Temp\lwjglssmith2\3.2.3-build-3\lwjgl.dll
[LWJGL] Found at: C:\Users\ssmith2\AppData\Local\Temp\lwjglssmith2\3.2.3-build-3\lwjgl.dll
[LWJGL] Loaded from org.lwjgl.librarypath: C:\Users\ssmith2\AppData\Local\Temp\lwjglssmith2\3.2.3-build-3\lwjgl.dll
[LWJGL] Loading library: libEGL
[LWJGL] libEGL.dll not found in org.lwjgl.librarypath=C:\Users\ssmith2\AppData\Local\Temp\lwjglssmith2\3.2.3-build-3
[LWJGL] libEGL.dll not found in system paths
[LWJGL] Loaded from java.library.path: C:\Users\ssmith2\Dropbox\workspace\Machina\libs\natives\libEGL.dll
Error loading EGL entry points.
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000000000000, pid=22604, tid=24824
#
# JRE version: OpenJDK Runtime Environment (11.0.1+13) (build 11.0.1+13)
# Java VM: OpenJDK 64-Bit Server VM (11.0.1+13, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
# Problematic frame:
# C  0x0000000000000000
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\ssmith2\Dropbox\workspace\Machina\hs_err_pid22604.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.
#
26
Bug Reports / RFE / Re: EGL VM Crashes
« Last post by spasi on May 27, 2019, 08:03:39 »
Could you please run the program with -Dorg.lwjgl.util.Debug=true -Dorg.lwjgl.util.DebugLoader=true, with and without the workaround? What is the difference between the two?
27
Bug Reports / RFE / Re: EGL VM Crashes
« Last post by smith on May 26, 2019, 22:05:54 »
I found a fix, it was not happy with the library path being set so I just explicitly loaded libEGL.dll and then it worked fine.
 
28
Bug Reports / RFE / Re: EGL VM Crashes
« Last post by smith on May 26, 2019, 21:07:54 »
It's in the callPP function fom EGL.java:95 looking for function "eglQueryString".
29
Bug Reports / RFE / Re: EGL VM Crashes
« Last post by spasi on May 26, 2019, 19:29:19 »
Not sure why that happens (with the same error even). Could you step into EGL.createClientCapabilities with a debugger to see where it crashes exactly?
30
Bug Reports / RFE / Re: EGL VM Crashes
« Last post by smith on May 26, 2019, 18:18:15 »
I tried Snapshot 3 and it works fine on Linux but I'm getting a crash on Windows. I think the same crash happens with 3.2.1 so it might be an issue with my version of libEGL.dll (I just grabbed the one from Chrome),

Code: [Select]
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000000000000, pid=23100, tid=16920
#
# JRE version: OpenJDK Runtime Environment (11.0.1+13) (build 11.0.1+13)
# Java VM: OpenJDK 64-Bit Server VM (11.0.1+13, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
# Problematic frame:
# C  0x0000000000000000
#
# No core dump will be written. 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.
#

---------------  S U M M A R Y ------------

Command Line: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:59026 -Djava.library.path=C:\Users\ssmith2\Dropbox\workspace\GLTest\lib\natives -javaagent:C:\Users\ssmith2\eclipse\java-2018-09\eclipse\configuration\org.eclipse.osgi\533\0\.cp\lib\javaagent-shaded.jar -Dfile.encoding=Cp1252 gltest.GLTest

Host: Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz, 12 cores, 15G,  Windows 10 , 64 bit Build 17134 (10.0.17134.706)
Time: Sun May 26 08:14:45 2019 Hawaiian Standard Time elapsed time: 72 seconds (0d 0h 1m 12s)

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

Current thread (0x00000227efcd1800):  JavaThread "main" [_thread_in_native, id=16920, stack(0x0000005052c00000,0x0000005052d00000)]

Stack: [0x0000005052c00000,0x0000005052d00000],  sp=0x0000005052cfe7f8,  free space=1017k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  org.lwjgl.system.JNI.callPP(JJ)J+0
j  org.lwjgl.egl.EGL$1.getFunctionAddress(Ljava/nio/ByteBuffer;)J+8
j  org.lwjgl.system.FunctionProvider.getFunctionAddress(Ljava/lang/CharSequence;)J+12
j  org.lwjgl.egl.EGL.createClientCapabilities()Lorg/lwjgl/egl/EGLCapabilities;+31
j  org.lwjgl.egl.EGL.create(Lorg/lwjgl/system/FunctionProvider;)V+20
j  org.lwjgl.egl.EGL.create(Lorg/lwjgl/system/SharedLibrary;)V+8
j  org.lwjgl.egl.EGL.create()V+113
j  org.lwjgl.egl.EGL.<clinit>()V+19
v  ~StubRoutines::call_stub
j  org.lwjgl.egl.EGL10.eglGetDisplay(J)J+0
j  gltest.GLTest.main([Ljava/lang/String;)V+1
v  ~StubRoutines::call_stub

siginfo: EXCEPTION_ACCESS_VIOLATION (0xc0000005), data execution prevention violation at address 0x0000000000000000
Pages: 1 2 [3] 4 5 ... 10