android SurfaceViewRenderer invalid Sharecontext

Solution for android SurfaceViewRenderer invalid Sharecontext
is Given Below:

i have a group call screen using SurfaceViewRenderer to display webrtc video.
First time im create EglBase when app started ( Application class OnCreate)


public class MeetingClient {

    private static volatile MeetingClient meetingClient;
    private final MeetingService meetingService;
    public static EglBase mRootEglBase;

   public static void init(Context context) {
        mRootEglBase = EglBase.create();

in this call screen, im init the SurfaceViewRenderer like this:

 initRenderer(local_render, MeetingClient.mRootEglBase.eglBaseContext)
 initRenderer(main_render, MeetingClient.mRootEglBase.eglBaseContext)

private fun initRenderer(renderer: SurfaceViewRenderer, baseContext: EglBase.Context) {
        renderer.init(baseContext, object :
            RendererCommon.RendererEvents {
            override fun onFirstFrameRendered() {


            override fun onFrameResolutionChanged(width: Int, height: Int, rotation: Int) {
//                Log.e(TAG, "onFrameResolutionChanged: $width - $height - $rotation ${if(renderer == local_render) "local render" else "main renderer"}")
                if (renderer == local_render) {
                    runOnUiThread { local_render.bringToFront() }

the first time open call screen, the localVideo and remoteVideo work normally, but when i closed this activity, then open again to join group call again, i got crash and this log:

  Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Invalid sharedContext
        at org.webrtc.EglBase14.createEglContext(
        at org.webrtc.EglBase14.<init>(
        at org.webrtc.EglBase.create(
        at org.webrtc.EglRenderer.lambda$init$0$EglRenderer(
        at org.webrtc.-$$Lambda$EglRenderer$ Source:6)

Can someone help me know this problem? Thanks