Sinch video call hangup crash android

Do you have any ideas regarding this problem: when I dismiss the received video call, the application crashes, giving me this error:

11-13 16:59:00.341    6531-6531/appPackage E/SinchVideoService﹕ stop
11-13 16:59:00.341    6531-6531/appPackage D/SinchClient﹕ Degub: terminate()
11-13 16:59:00.351    6531-6698/appPackage E/rtc﹕ #
    # Fatal error in ../../../talk/app/webrtc/androidvideocapturer.cc, line 195
    # Check failed: !running_
    #
    #
11-13 16:59:00.351    6531-6698/appPackage A/libc﹕ Fatal signal 6 (SIGABRT), code -6 in tid 6698 (Sinch Worker Th)

Seems like an internal sinch error, any ideas?

----- Edit ------

This happens when an action is destroyed:

    @Override
    public void onDestroy()
    {
       if (getSinchServiceInterface() != null)
       {
           getSinchServiceInterface().removeMessageClientListener(this);
           getSinchServiceInterface().stopClient();
        }
        super.onDestroy();
    }

when this method (stop ()) from the class that extends the Service is called.

    private void stop()
    {
        if (mSinchClient != null)
        {
            mSinchClient.terminate();
            mSinchClient = null;
        }
    }

- Edit ---

Here I launch my client:

    protected void onServiceConnected()
    {
        getSinchServiceInterface().setStartListener(this);
        PreferencesDataAccess prefs = new PreferencesDataAccess(this);
        getSinchServiceInterface().startClient("user-" + prefs.getCurrentUser().getUserID());
        getSinchServiceInterface().addMessageClientListener(this);
    }

and here it is initialized:

    private void start(String userName)
    {
        if (mSinchClient == null)
        {
            mUserId = userName;
            mSinchClient = Sinch.getSinchClientBuilder().context(getApplicationContext()).userId(userName)
                    .applicationKey(APP_KEY)
                    .applicationSecret(APP_SECRET)
                    .environmentHost(ENVIRONMENT).build();

            mSinchClient.setSupportCalling(true);
            mSinchClient.setSupportMessaging(true);
            mSinchClient.startListeningOnActiveConnection();

            mSinchClient.addSinchClientListener(new MySinchClientListener());
            mSinchClient.getCallClient().addCallClientListener(new SinchCallClientListener());
            mSinchClient.start();

        }
    }
+4
source share
2 answers

Use terminateGracefully()instead of Terminate. it will wait for some network events and gracefully close the client.

sinch , . synch , . , sinch: - , .

, "" , .

+1

sinchClient.stopListeningOnActiveConnection();

terminate(); , SinchClientListener.

0

Source: https://habr.com/ru/post/1615789/


All Articles