将WebRTC版本1.0.24277升级到1.0.25331时应用崩溃

时间:2018-11-13 15:10:57

标签: android webrtc

我们想将使用本地WebRTC的Android项目更新到最新版本。我们使用的版本是1.0.24277,我们正在升级到1.0.25331。

关于此升级的有趣之处在于,它不需要任何代码更改(在新版本中,任何内容均已弃用)。我以为他们改变了一些代码执行的方式。

所以我的问题是,有谁知道可能需要更改哪些本机Java webrtc代码才能使其崩溃?

仅需注意,onRenegotiationNeeded中没有任何代码,所以我不知道为什么这会导致崩溃。

2018-11-12 10:58:32.318 1400-2319/com.popinvideobanking.ttcu.demo D/FT_WebRTCPeer: 7ghYoCJtZmDxGNQ2AArv onRenegotiationNeeded
2018-11-12 10:58:32.385 1400-2324/com.popinvideobanking.ttcu.demo I/org.webrtc.Logging: CameraStatistics: Camera fps: 18.Enter one-line summary

    --------- beginning of crash
2018-11-12 10:58:32.425 2404-2318/? A/google-breakpad: Microdump skipped (uninteresting)
2018-11-12 10:58:32.446 1400-2318/com.popinvideobanking.ttcu.demo W/google-breakpad: ### ### ### ### ### ### ### ### ### ### ### ### ###
2018-11-12 10:58:32.446 1400-2318/com.popinvideobanking.ttcu.demo W/google-breakpad: Chrome build fingerprint:
2018-11-12 10:58:32.446 1400-2318/com.popinvideobanking.ttcu.demo W/google-breakpad: 68.0.3440.91
2018-11-12 10:58:32.446 1400-2318/com.popinvideobanking.ttcu.demo W/google-breakpad: 344009152
2018-11-12 10:58:32.446 1400-2318/com.popinvideobanking.ttcu.demo W/google-breakpad: ### ### ### ### ### ### ### ### ### ### ### ### ###
2018-11-12 10:58:32.447 1400-2318/com.popinvideobanking.ttcu.demo A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x6c in tid 2318 (worker_thread -), pid 1400 (nking.ttcu.demo)
2018-11-12 10:58:32.582 2410-2410/? I/crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
2018-11-12 10:58:32.583 612-612/? I//system/bin/tombstoned: received crash request for pid 1400
2018-11-12 10:58:32.584 2410-2410/? I/crash_dump64: performing dump of process 1400 (target tid = 2318)
2018-11-12 10:58:32.584 2410-2410/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2018-11-12 10:58:32.584 2410-2410/? A/DEBUG: Build fingerprint: 'google/angler/angler:8.1.0/OPM7.181105.004/5038062:user/release-keys'
2018-11-12 10:58:32.585 2410-2410/? A/DEBUG: Revision: '0'
2018-11-12 10:58:32.585 2410-2410/? A/DEBUG: ABI: 'arm64'
2018-11-12 10:58:32.585 2410-2410/? A/DEBUG: pid: 1400, tid: 2318, name: worker_thread -  >>> com.popinvideobanking.ttcu.demo <<<
2018-11-12 10:58:32.585 2410-2410/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x6c
2018-11-12 10:58:32.585 2410-2410/? A/DEBUG: Cause: null pointer dereference
2018-11-12 10:58:32.585 2410-2410/? A/DEBUG:     x0   000000774dc84ff0  x1   0000000000000000  x2   000000774d600000  x3   0000000000000003
2018-11-12 10:58:32.585 2410-2410/? A/DEBUG:     x4   00000000000000f1  x5   8000000000000000  x6   ff63646a6e756471  x7   7f7f7f7f7f7f7f7f
2018-11-12 10:58:32.585 2410-2410/? A/DEBUG:     x8   0000000000000000  x9   2bb84e7acb284ad4  x10  0000000000000000  x11  000000774dc85008
2018-11-12 10:58:32.585 2410-2410/? A/DEBUG:     x12  00000000ffffffff  x13  637273536e776f6e  x14  0000000000000000  x15  000000774d600000
2018-11-12 10:58:32.585 2410-2410/? A/DEBUG:     x16  00000077f002dca8  x17  00000077effca4b8  x18  0000000000000008  x19  000000776419f800
2018-11-12 10:58:32.585 2410-2410/? A/DEBUG:     x20  000000774a2ebf64  x21  000000774a6c5b08  x22  0000000000000000  x23  0000000000000000
2018-11-12 10:58:32.585 2410-2410/? A/DEBUG:     x24  000000776419fa10  x25  000000774a6c5739  x26  000000774a393800  x27  0000000000000048
2018-11-12 10:58:32.585 2410-2410/? A/DEBUG:     x28  00000000148952b9  x29  000000774dc85060  x30  000000774e13e58c
2018-11-12 10:58:32.585 2410-2410/? A/DEBUG:     sp   000000774dc84ff0  pc   000000774e13e594  pstate 0000000060000000
2018-11-12 10:58:32.593 2410-2410/? A/DEBUG: backtrace:
2018-11-12 10:58:32.593 2410-2410/? A/DEBUG:     #00 pc 00000000003bb594  /data/app/com.popinvideobanking.ttcu.demo-y2AwFNkfjEt_MV43YvqTnQ==/lib/arm64/libjingle_peerconnection_so.so (offset 0x228000)
2018-11-12 10:58:32.593 2410-2410/? A/DEBUG:     #01 pc 00000000003bab70  /data/app/com.popinvideobanking.ttcu.demo-y2AwFNkfjEt_MV43YvqTnQ==/lib/arm64/libjingle_peerconnection_so.so (offset 0x228000)
2018-11-12 10:58:32.593 2410-2410/? A/DEBUG:     #02 pc 000000000052fefc  /data/app/com.popinvideobanking.ttcu.demo-y2AwFNkfjEt_MV43YvqTnQ==/lib/arm64/libjingle_peerconnection_so.so (offset 0x228000)
2018-11-12 10:58:32.593 2410-2410/? A/DEBUG:     #03 pc 0000000000530674  /data/app/com.popinvideobanking.ttcu.demo-y2AwFNkfjEt_MV43YvqTnQ==/lib/arm64/libjingle_peerconnection_so.so (offset 0x228000)
2018-11-12 10:58:32.593 2410-2410/? A/DEBUG:     #04 pc 00000000002a94f4  /data/app/com.popinvideobanking.ttcu.demo-y2AwFNkfjEt_MV43YvqTnQ==/lib/arm64/libjingle_peerconnection_so.so (offset 0x228000)
2018-11-12 10:58:32.593 2410-2410/? A/DEBUG:     #05 pc 00000000002bac1c  /data/app/com.popinvideobanking.ttcu.demo-y2AwFNkfjEt_MV43YvqTnQ==/lib/arm64/libjingle_peerconnection_so.so (offset 0x228000)
2018-11-12 10:58:32.593 2410-2410/? A/DEBUG:     #06 pc 00000000002a8d54  /data/app/com.popinvideobanking.ttcu.demo-y2AwFNkfjEt_MV43YvqTnQ==/lib/arm64/libjingle_peerconnection_so.so (offset 0x228000)
2018-11-12 10:58:32.593 2410-2410/? A/DEBUG:     #07 pc 00000000002ba950  /data/app/com.popinvideobanking.ttcu.demo-y2AwFNkfjEt_MV43YvqTnQ==/lib/arm64/libjingle_peerconnection_so.so (offset 0x228000)
2018-11-12 10:58:32.593 2410-2410/? A/DEBUG:     #08 pc 00000000002ba858  /data/app/com.popinvideobanking.ttcu.demo-y2AwFNkfjEt_MV43YvqTnQ==/lib/arm64/libjingle_peerconnection_so.so (offset 0x228000)
2018-11-12 10:58:32.593 2410-2410/? A/DEBUG:     #09 pc 0000000000067d0c  /system/lib64/libc.so (__pthread_start(void*)+36)
2018-11-12 10:58:32.593 2410-2410/? A/DEBUG:     #10 pc 000000000001eba4  /system/lib64/libc.so (__start_thread+68)

1 个答案:

答案 0 :(得分:5)

我们发现发生这种情况的原因之一是,它们默认情况下已停止添加视频编解码器,如您在以下发行说明中所见:

https://groups.google.com/forum/#!msg/discuss-webrtc/6ImvPjWQvbE/AlCtGQnYBQAJ

默认情况下,Android SDK不再包含视频编解码器。如果没有视频编解码器传递给createPeerConnectionFactory,则将不包含任何视频编解码器。目的是为不需要视频(例如仅音频或数据)的客户端节省二进制大小。这不会影响已经在使用可注入编解码器的客户端。

以下代码创建默认工厂,以为对等连接工厂提供默认的视频编码器和解码器。

    PeerConnectionFactory.initialize(PeerConnectionFactory.InitializationOptions.builder(context).createInitializationOptions());
    PeerConnectionFactory.Options options = new PeerConnectionFactory.Options();

    DefaultVideoEncoderFactory defaultVideoEncoderFactory = new DefaultVideoEncoderFactory(
            eglContext,  /* enableIntelVp8Encoder */true,  /* enableH264HighProfile */true);
    DefaultVideoDecoderFactory defaultVideoDecoderFactory = new DefaultVideoDecoderFactory(eglContext);

    this.factory = PeerConnectionFactory.builder()
            .setVideoEncoderFactory(defaultVideoEncoderFactory)
            .setVideoDecoderFactory(defaultVideoDecoderFactory)
            .setOptions(options)
            .setAudioDeviceModule(createJavaAudioDevice(context))
            .createPeerConnectionFactory();