Crash in cocos2d::GLProgramState::updateUniformsAndAttributes()

On my newly launched game, I keep getting this crash from android crash logs. I cannot reproduce it myself. I have no clue how this is happening. Any pointers would be appreciated.

It crashes in this function at the beginning:
void GLProgramState::updateUniformsAndAttributes()

This is called by:

void TrianglesCommand::useMaterial() const
{
//Set texture
GL::bindTexture2D(_textureID);

if (_alphaTextureID > 0)
{ // ANDROID ETC1 ALPHA supports.
    GL::bindTexture2DN(1, _alphaTextureID);
}
//set blend mode
GL::blendFunc(_blendType.src, _blendType.dst);

_glProgramState->apply(_mv);

}

So at this point, I would assume _glProgramState is NULL or corrupted.

Here is the stacktrace:

backtrace:
#00 pc 00000000008eb650 /data/app/~~6NTVdujPY23nxGpxhd_jqw==/com.bewgames.openworld-vOT0QVh5OJQjJY5xWf5nmg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libMyGame.so (offset 0x1000) (cocos2d::GLProgramState::updateUniformsAndAttributes()) (SourceCode: C:/game/openworld/cocos2d/cocos/renderer/CCGLProgramState.cpp:537)
#00 pc 00000000008eb490 /data/app/~~6NTVdujPY23nxGpxhd_jqw==/com.bewgames.openworld-vOT0QVh5OJQjJY5xWf5nmg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libMyGame.so (offset 0x1000) (cocos2d::GLProgramState::applyGLProgram(cocos2d::Mat4 const&)) (SourceCode: C:/game/openworld/cocos2d/cocos/renderer/CCGLProgramState.cpp:560)
#00 pc 00000000008eb490 /data/app/~~6NTVdujPY23nxGpxhd_jqw==/com.bewgames.openworld-vOT0QVh5OJQjJY5xWf5nmg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libMyGame.so (offset 0x1000) (cocos2d::GLProgramState::apply(cocos2d::Mat4 const&)) (SourceCode: C:/game/openworld/cocos2d/cocos/renderer/CCGLProgramState.cpp:527)
#00 pc 00000000008f5b90 /data/app/~~6NTVdujPY23nxGpxhd_jqw==/com.bewgames.openworld-vOT0QVh5OJQjJY5xWf5nmg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libMyGame.so (offset 0x1000) (cocos2d::Renderer::drawBatchedTriangles()) (SourceCode: C:/game/openworld/cocos2d/cocos/renderer/CCRenderer.cpp:848)
#00 pc 00000000008f5698 /data/app/~~6NTVdujPY23nxGpxhd_jqw==/com.bewgames.openworld-vOT0QVh5OJQjJY5xWf5nmg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libMyGame.so (offset 0x1000) (cocos2d::Renderer::flushTriangles()) (SourceCode: C:/game/openworld/cocos2d/cocos/renderer/CCRenderer.cpp:895)
#00 pc 00000000008f5698 /data/app/~~6NTVdujPY23nxGpxhd_jqw==/com.bewgames.openworld-vOT0QVh5OJQjJY5xWf5nmg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libMyGame.so (offset 0x1000) (cocos2d::Renderer::flush2D()) (SourceCode: C:/game/openworld/cocos2d/cocos/renderer/CCRenderer.cpp:879)
#00 pc 00000000008f5698 /data/app/~~6NTVdujPY23nxGpxhd_jqw==/com.bewgames.openworld-vOT0QVh5OJQjJY5xWf5nmg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libMyGame.so (offset 0x1000) (cocos2d::Renderer::flush()) (SourceCode: C:/game/openworld/cocos2d/cocos/renderer/CCRenderer.cpp:873)
#00 pc 00000000008f5698 /data/app/~~6NTVdujPY23nxGpxhd_jqw==/com.bewgames.openworld-vOT0QVh5OJQjJY5xWf5nmg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libMyGame.so (offset 0x1000) (cocos2d::Renderer::processRenderCommand(cocos2d::RenderCommand*)) (SourceCode: C:/game/openworld/cocos2d/cocos/renderer/CCRenderer.cpp:447)
#00 pc 00000000008f5f74 /data/app/~~6NTVdujPY23nxGpxhd_jqw==/com.bewgames.openworld-vOT0QVh5OJQjJY5xWf5nmg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libMyGame.so (offset 0x1000) (cocos2d::Renderer::visitRenderQueue(cocos2d::RenderQueue&)) (SourceCode: C:/game/openworld/cocos2d/cocos/renderer/CCRenderer.cpp:588)
#00 pc 00000000008f5704 /data/app/~~6NTVdujPY23nxGpxhd_jqw==/com.bewgames.openworld-vOT0QVh5OJQjJY5xWf5nmg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libMyGame.so (offset 0x1000) (cocos2d::Renderer::processRenderCommand(cocos2d::RenderCommand*)) (SourceCode: C:/game/openworld/cocos2d/cocos/renderer/CCRenderer.cpp:442)
#00 pc 00000000008f5f74 /data/app/~~6NTVdujPY23nxGpxhd_jqw==/com.bewgames.openworld-vOT0QVh5OJQjJY5xWf5nmg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libMyGame.so (offset 0x1000) (cocos2d::Renderer::visitRenderQueue(cocos2d::RenderQueue&)) (SourceCode: C:/game/openworld/cocos2d/cocos/renderer/CCRenderer.cpp:588)
#00 pc 00000000008f60d4 /data/app/~~6NTVdujPY23nxGpxhd_jqw==/com.bewgames.openworld-vOT0QVh5OJQjJY5xWf5nmg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libMyGame.so (offset 0x1000) (cocos2d::Renderer::render()) (SourceCode: C:/game/openworld/cocos2d/cocos/renderer/CCRenderer.cpp:648)
#00 pc 000000000086643c /data/app/~~6NTVdujPY23nxGpxhd_jqw==/com.bewgames.openworld-vOT0QVh5OJQjJY5xWf5nmg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libMyGame.so (offset 0x1000) (cocos2d::Scene::render(cocos2d::Renderer*, cocos2d::Mat4 const*, cocos2d::Mat4 const*, unsigned int)) (SourceCode: C:/game/openworld/cocos2d/cocos/2d/CCScene.cpp:252)
#00 pc 00000000008b0364 /data/app/~~6NTVdujPY23nxGpxhd_jqw==/com.bewgames.openworld-vOT0QVh5OJQjJY5xWf5nmg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libMyGame.so (offset 0x1000) (cocos2d::Director::drawScene()) (SourceCode: C:/game/openworld/cocos2d/cocos/base/CCDirector.cpp:295)
#00 pc 00000000008b2e04 /data/app/~~6NTVdujPY23nxGpxhd_jqw==/com.bewgames.openworld-vOT0QVh5OJQjJY5xWf5nmg==/split_config.arm64_v8a.apk!lib/arm64-v8a/libMyGame.so (offset 0x1000) (cocos2d::Director::mainLoop()) (SourceCode: C:/game/openworld/cocos2d/cocos/base/CCDirector.cpp:1475)
#00 pc 00000000000543d0 /data/app/~~6NTVdujPY23nxGpxhd_jqw==/com.bewgames.openworld-vOT0QVh5OJQjJY5xWf5nmg==/oat/arm64/base.odex (art_jni_trampoline+144)
#00 pc 00000000000a0e60 /data/app/~~6NTVdujPY23nxGpxhd_jqw==/com.bewgames.openworld-vOT0QVh5OJQjJY5xWf5nmg==/oat/arm64/base.odex (org.cocos2dx.lib.Cocos2dxRenderer.onDrawFrame+80)
#00 pc 00000000006a1328 /system/framework/arm64/boot-framework.oat (android.opengl.GLSurfaceView$GLThread.guardedRun+3992)
#00 pc 00000000006a1b70 /system/framework/arm64/boot-framework.oat (android.opengl.GLSurfaceView$GLThread.run+224)
#00 pc 0000000000134564 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548)
#00 pc 00000000001a9a78 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
#00 pc 000000000055e278 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValuesart::ArtMethod*(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+460)
#00 pc 00000000005ada3c /apex/com.android.art/lib64/libart.so (art::thread::CreateCallback(void*)+1308)
#00 pc 00000000000eb7a8 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
#00 pc 000000000008bc8c /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

I can ask engineering if they have thoughts on this.

Thanks. It would be helpful. Just an idea of the possible cause because the stack trace does not help at all figuring out what when wrong before that

It happen when call cocos2d::Renderer::drawBatchedTriangles, like built-in shader program, maybe the resource has destroy or no create success, if you can reproduce the problem, please attach the test project .