Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App Crashes when upgrading WebRTC version 1.0.24277 to 1.0.25331

Tags:

android

webrtc

We wanted to update our Android project that was using the native WebRTC to the latest version. The version we were on was 1.0.24277 and we are upgrading to 1.0.25331.

The interesting this about this upgrade is that it didn't require any code changes (nothing is showing as deprecated or anything in the new version). I assume that they changed the way some code needed to be executed.

So my question is does anyone know what native Java webrtc code may need to be changed in order to make this not crash?

Just to note, I don't have any code in the onRenegotiationNeeded so I don't know why that is where it is crashing.

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)
like image 214
BrettARose Avatar asked Dec 14 '22 14:12

BrettARose


1 Answers

One of the causes we have found for this to happen is that they stopped adding the video codecs by default as you can see in these release notes here:

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

Android SDK doesn’t include video codecs by default anymore. If no video codecs are passed to createPeerConnectionFactory, no video codecs will be included. The purpose is to save binary size for clients that don't need video (e.g. audio or data only). This doesn’t affect clients that are already using injectable codecs.

The following code creates default factories to provide the peer connection factory with default video encoders and decoders.

    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();
like image 109
Tyler Dacus Avatar answered Jan 22 '23 05:01

Tyler Dacus