Download

Anyone met this kind of error ? ERROR: SetCurrentContext eglMakeCurrent failed : 0x300d (EGL_BAD_SURFACE)

anyone met this kind of error ? ERROR: SetCurrentContext eglMakeCurrent failed : 0x300d (EGL_BAD_SURFACE)


AndroidEGL:: ReleaseContextOwnership, thread releasing rendering context tid: 6565

AndroidEGL::ResetDisplay()

*** JavaEnvDestructor: 6565

Assertion failed: Result == 1 [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/OpenGLDrv/Private/Android/AndroidEGL.cpp] [Line: 241]

ERROR: SetCurrentContext eglMakeCurrent failed : 0x300d

(0x300d == EGL_BAD_SURFACE )


SetRHIThreadEnabled(false, false);//this is set in my code.


added debug code in the engine, and fail before call SetCurrentContext…

void AndroidEGL::SetCurrentRenderingContext()

{

PImplData->CurrentContextType = CONTEXT_Rendering;

if (GUseThreadedRendering)

{

    checkf(PImplData->RenderingContext.eglContext != EGL_NO_CONTEXT, TEXT("ERROR: PImplData->RenderingContext.eglContext == EGL_NO_CONTEXT"));//OK

    checkf(PImplData->RenderingContext.eglSurface != EGL_NO_SURFACE, TEXT("ERROR: PImplData->RenderingContext.eglSurface == EGL_NO_SURFACE"));//OK

    EGLint x;

    EGLBoolean r = eglQuerySurface(PImplData->eglDisplay, PImplData->RenderingContext.eglSurface, EGL_TEXTURE_FORMAT, &x);

    checkf(r == EGL_TRUE, TEXT("EGL_TEXTURE_FORMAT, PImplData->RenderingContext.eglSurface error : 0x%x"), eglGetError());//fail here....

    SetCurrentContext(PImplData->RenderingContext.eglContext, PImplData->RenderingContext.eglSurface);

}

}