处置 PeerConnection WebRTC 期间的致命信号 6 [英] Fatal signal6 during disposing PeerConnection WebRTC

查看:32
本文介绍了处置 PeerConnection WebRTC 期间的致命信号 6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 WebRTC 进行语音通话,一切正常.当 Call hangUp 我在完成 Call Activity 之前按如下方式处理 PeerConnection .

I am using WebRTC for voice calling everything work fine. When Call hangUp i am disposing the PeerConnection as follows before finishing Call Activity .

 executor.execute(() -> {
        if (peerConnectionFactory != null) {
            peerConnectionFactory.dispose();
            peerConnectionFactory=null;
        }
        if (localPeer != null) {
            localPeer.dispose();
            localPeer=null;
        }
    });

我收到了致命信号 6.我已阅读 what-is-fatal-signal-6.它说不要阻塞 UI 线程,这可能会导致 SIGABRT,因为操作系统将杀死无响应的应用程序.但是我在非 Ui 线程上调用它并且仍然遇到问题.

I am getting fatal-signal-6. I have read what-is-fatal-signal-6 . Its says Do not block the UI thread, this can cause a SIGABRT as the OS will kill a non-responsive app . But i am calling it on non Ui thread and still getting the issue.

致命信号 6 (SIGABRT) 在 0x00007e2f (code=-6),线程 32390 (worker_thread)

Fatal signal 6 (SIGABRT) at 0x00007e2f (code=-6), thread 32390 (worker_thread)

请调查问题.

推荐答案

我在关闭 peerConnection 时做错了.关闭连接的正确流程如下.

I was doing wrong during closing the peerConnection . Correct flow of closing connection is below.

 executor.execute(() -> {
            if (peerConnectionFactory != null) {
                peerConnectionFactory.stopAecDump();
            }
            if (localPeer != null) {
                localPeer.dispose();
                localPeer = null;
            }
            if (peerConnectionFactory != null) {
                peerConnectionFactory.dispose();
                peerConnectionFactory = null;
            }
            PeerConnectionFactory.stopInternalTracingCapture();
            PeerConnectionFactory.shutdownInternalTracer();
        });

这篇关于处置 PeerConnection WebRTC 期间的致命信号 6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆