Hi,
I'm porting this again, as the first post disappeared .
I'm having the following alert: Could not Load from Adreno device driver: eglGetError
just before a crash. It happens when I call eglChooseConfig with configs = null.
If I set some configs it pass through but crash on eglMakeCurrent()
Same code runs great with ANGLE, PowerVR and Mali emulators.
My dump is the following:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000000000000, pid=7588, tid=4712
#
# JRE version: Java(TM) SE Runtime Environment (7.0_51-b13) (build 1.7.0_51-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.51-b03 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C 0x0000000000000000
#
# 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.sun.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 (0x000000001151b800): JavaThread "GLThread 15" [_thread_in_native, id=4712, stack(0x0000000013e20000,0x0000000013f20000)]
siginfo: ExceptionCode=0xc0000005, ExceptionInformation=0x0000000000000008 0x0000000000000000
Registers:
RAX=0x0000ce7731f58fb5, RBX=0x000000018004d020, RCX=0x000000018005f2f8, RDX=0xfffffffffdf0cb30
RSP=0x0000000013f1ebd8, RBP=0x000000018004eb20, RSI=0x000000018005f2f8, RDI=0x0000000000000001
R8 =0x0000000000000000, R9 =0x00000000020f34d0, R10=0x0000000000000200, R11=0x00000000020f34d0
R12=0x0000000011aa77a0, R13=0x0000000000000000, R14=0x0000000013f1ef78, R15=0x000000001151b800
RIP=0x0000000000000000, EFLAGS=0x0000000000010202
Top of Stack: (sp=0x0000000013f1ebd8)
0x0000000013f1ebd8: 000000018000b411 0000000000000000
0x0000000013f1ebe8: 0000000011aa77a0 0000000000000020
0x0000000013f1ebf8: 00000000114c7e10 0000000000000000
0x0000000013f1ec08: 00000000661b8d17 000000001151b800
0x0000000013f1ec18: 0000000013f1ef78 0000000000000000
0x0000000013f1ec28: 0000000011aa77a0 0000000000000008
0x0000000013f1ec38: 0000000011aa77a0 0000000000000001
0x0000000013f1ec48: 00000000661b8d17 0000000000000002
0x0000000013f1ec58: 0000000000000008 0000000000000000
0x0000000013f1ec68: 0000000011aa77a0 0000000000000001
0x0000000013f1ec78: 00000000661b8ddb 0000000000000008
0x0000000013f1ec88: 0000000011aa77a0 0000000000000002
0x0000000013f1ec98: 0000000000000030 000000001151b800
0x0000000013f1eca8: 0000000013f1ef78 0000000000000000
0x0000000013f1ecb8: 00000000661b8ddb 000000018005eef0
0x0000000013f1ecc8: 0000000180001b17 000000001150f4c0
Instructions: (pc=0x0000000000000000)
0xffffffffffffffe0:
Register to memory mapping:
RAX=0x0000ce7731f58fb5 is an unknown value
RBX=0x000000018004d020 is an unknown value
RCX=0x000000018005f2f8 is an unknown value
RDX=0xfffffffffdf0cb30 is an unknown value
RSP=0x0000000013f1ebd8 is pointing into the stack for thread: 0x000000001151b800
RBP=0x000000018004eb20 is an unknown value
RSI=0x000000018005f2f8 is an unknown value
RDI=0x0000000000000001 is an unknown value
R8 =0x0000000000000000 is an unknown value
R9 =0x00000000020f34d0 is an unknown value
R10=0x0000000000000200 is an unknown value
R11=0x00000000020f34d0 is an unknown value
R12=0x0000000011aa77a0 is an unknown value
R13=0x0000000000000000 is an unknown value
R14=0x0000000013f1ef78 is pointing into the stack for thread: 0x000000001151b800
R15=0x000000001151b800 is a thread
Stack: [0x0000000013e20000,0x0000000013f20000], sp=0x0000000013f1ebd8, free space=1018k
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j gles.internal.EGL14Pipeline.eglMakeCurrent0(JJJJ)Z+0
j gles.internal.EGL14Pipeline.eglMakeCurrent(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLSurface;Landroid/opengl/EGLSurface;Landroid/opengl/EGLContext;)Z+33
j android.opengl.EGL14.eglMakeCurrent(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLSurface;Landroid/opengl/EGLSurface;Landroid/opengl/EGLContext;)Z+7
j gles.internal.EGL10Impl.eglMakeCurrent(Ljavax/microedition/khronos/egl/EGLDisplay;Ljavax/microedition/khronos/egl/EGLSurface;Ljavax/microedition/khronos/egl/EGLSurface;Ljavax/microedition/khronos/egl/EGLContext;)Z+17
j android.opengl.GLSurfaceView$EglHelper.createSurface()Z+198
j android.opengl.GLSurfaceView$GLThread.guardedRun()V+981
j android.opengl.GLSurfaceView$GLThread.run()V+49
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
=>0x000000001151b800 JavaThread "GLThread 15" [_thread_in_native, id=4712, stack(0x0000000013e20000,0x0000000013f20000)]
0x00000000020e8000 JavaThread "DestroyJavaVM" [_thread_blocked, id=3360, stack(0x00000000021d0000,0x00000000022d0000)]
0x000000001136b800 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=8136, stack(0x0000000011f50000,0x0000000012050000)]
0x000000001136a800 JavaThread "AWT-Windows" daemon [_thread_in_native, id=4112, stack(0x0000000011b80000,0x0000000011c80000)]
0x0000000011369800 JavaThread "AWT-Shutdown" [_thread_blocked, id=8112, stack(0x0000000011970000,0x0000000011a70000)]
0x0000000011369000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5200, stack(0x0000000011780000,0x0000000011880000)]
0x000000000f493000 JavaThread "Service Thread" daemon [_thread_blocked, id=5708, stack(0x0000000010fd0000,0x00000000110d0000)]
0x000000000f489000 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=5432, stack(0x0000000010dd0000,0x0000000010ed0000)]
0x000000000f484800 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=2816, stack(0x0000000010c50000,0x0000000010d50000)]
0x000000000f482800 JavaThread "Attach Listener" daemon [_thread_blocked, id=7516, stack(0x00000000109f0000,0x0000000010af0000)]
0x000000000f47b000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=8060, stack(0x0000000010890000,0x0000000010990000)]
0x000000000f429000 JavaThread "Finalizer" daemon [_thread_blocked, id=4716, stack(0x00000000105e0000,0x00000000106e0000)]
0x000000000f420000 JavaThread "Reference Handler" daemon [_thread_blocked, id=6196, stack(0x0000000010700000,0x0000000010800000)]
Other Threads:
0x000000000f418800 VMThread [stack: 0x0000000010430000,0x0000000010530000] [id=7396]
0x000000000f49c800 WatcherThread [stack: 0x0000000011170000,0x0000000011270000] [id=2848]
VM state:not at safepoint (normal execution)
Hi..Could you let us know which device and build this EGL crash is occuring on? Can you share details of your EGL calls? Also do you have a apk available that duplicates the problem?
thanks..
Hi !
Thanks for replay
I'm using Adreno SDK Windows to run ported android.opengl API on PC environment. The crash happens at GLSurfaceView.EglHelper.start()
I'll provide a runnable application for testing. Project is hosted at GitHub https://github.com/AlessandroBorges/madri-gles/wiki
As stated before, same code runs fine with Google's Angle, PowerVR and Mali SDK. I'm using the 64bits version.
Adreno demos x86 runs fine.
Where the alert raises:
Method chooseConfig( )
My PC specs:
Win7 64, I5 3470, 16GB ram, NVidia GTX 650 TI.B., dual screen
Hi
Some updates:
I was able to fix some call orders, which avoid crashes but app is unable to create a valid EGLContext.
One issue I note is the first call to eglGetDisplay() return a non null EGlDisplay, but raises the "Could not load from Adreno device driver: eglGetError" alert. A second call to eglGetDisplay() always returns EGL_NO_DISPLAY, does not matter if I use EGL_DEFAULT_DISPLAY or a valid native EGLNativeDisplayType , aka, HDC.
Basically, my code do the following :
The code after cleaned looks like this:
If I print all available EGLConfigs, I have the following :
The choosed EGLConfig is the following:
But even with above EGLConfig and a valid EGLDisplay, I got a EGL_NO_CONTEXT and a EGL_BAD_ATTRIBUTE.