Linux, game run crashes due to SDL_GL_GetCurrentContext returning zero

I’m building unreal engine 4.23.1 with opengl context.

the editor runs fine, but the packaged game will crash.

I debugged it, and found out that SDL_GL_GetCurrentContext returns zero, even SDL seems to be initialized correctly.

SDL document says I need to call SDL_error() to get more information, which I did, but found nothing.

How can I investigate further?