open-webrtc-toolkit / owt-client-android

Open WebRTC Toolkit client SDK for Android applications.
https://01.org/open-webrtc-toolkit
Apache License 2.0
195 stars 96 forks source link

Attach remote stream with fakeRander lead crash #131

Open zhangyihui1 opened 5 years ago

zhangyihui1 commented 5 years ago

test in one android device 1: user1 and user2 and connect server with video codec vp9 2: user1 publish local stream to user2 3: user2 attach remoteStream with fakeRander

android device: nexus LGE AOSP (android 5.1.1)

fakeRander: public class FakeRenderer implements VideoSink { private int framesRendered = 0; private int width = 0; private int height = 0; private ArrayList<byte[]> oneFrameByte = null; private final Object lock = new Object();

public int frameWidth() {
    synchronized (lock) {
        return width;
    }
}

public int frameHeight() {
    synchronized (lock) {
        return height;
    }
}

public int getFramesRendered(int timeout) {
    SystemClock.sleep(timeout);
    synchronized (lock) {
        return framesRendered;
    }
}

public void checkLocalStreamFrame(boolean isBackFrame) {
    // TODO
}

private void checkVideoFrame(byte[] bytes, int value, boolean isblack) {
    // TODO
}

@Override
public void onFrame(VideoFrame videoFrame) {
    synchronized (lock) {
        ++framesRendered;
        width = videoFrame.getRotatedWidth();
        height = videoFrame.getRotatedHeight();
    }
    videoFrame.release();
}

}

log: 07-11 11:50:43.278 27923-28078/owt.test.conference.apitest A/libc: /usr/local/google/buildbot/src/android/ndk-release-r16/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:73: abort_message: assertion "Pure virtual function called!" failed 07-11 11:50:43.278 27923-28078/owt.test.conference.apitest A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 28078 (IncomingVideoSt) 07-11 11:50:43.331 187-187/? I/DEBUG: 07-11 11:50:43.331 187-187/? I/DEBUG: Build fingerprint: 'Android/aosp_hammerhead/hammerhead:5.1.1/LMY48I/luq09101559:userdebug/test-keys' 07-11 11:50:43.331 187-187/? I/DEBUG: Revision: '11' 07-11 11:50:43.331 187-187/? I/DEBUG: ABI: 'arm' 07-11 11:50:43.331 187-187/? I/DEBUG: pid: 27923, tid: 28078, name: IncomingVideoSt >>> owt.test.conference.apitest <<< 07-11 11:50:43.331 187-187/? I/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr -------- 07-11 11:50:43.374 187-187/? I/DEBUG: Abort message: '/usr/local/google/buildbot/src/android/ndk-release-r16/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:73: abort_message: assertion "Pure virtual function called!" failed' 07-11 11:50:43.374 187-187/? I/DEBUG: r0 00000000 r1 00006dae r2 00000006 r3 00000000 07-11 11:50:43.374 187-187/? I/DEBUG: r4 9d403db8 r5 00000006 r6 00000000 r7 0000010c 07-11 11:50:43.374 187-187/? I/DEBUG: r8 b4bf8d90 r9 a261e414 sl a261e400 fp a261e794 07-11 11:50:43.374 187-187/? I/DEBUG: ip 00006dae sp 9d403bc0 lr b6deb3c5 pc b6e0f3dc cpsr 60070010 07-11 11:50:43.374 187-187/? I/DEBUG: backtrace: 07-11 11:50:43.374 187-187/? I/DEBUG: #00 pc 0003b3dc /system/lib/libc.so (tgkill+12) 07-11 11:50:43.375 187-187/? I/DEBUG: #01 pc 000173c1 /system/lib/libc.so (pthread_kill+52) 07-11 11:50:43.375 187-187/? I/DEBUG: #02 pc 00017fd3 /system/lib/libc.so (raise+10) 07-11 11:50:43.375 187-187/? I/DEBUG: #03 pc 00014795 /system/lib/libc.so (libc_android_abort+36) 07-11 11:50:43.375 187-187/? I/DEBUG: #04 pc 00012f44 /system/lib/libc.so (abort+4) 07-11 11:50:43.375 187-187/? I/DEBUG: #05 pc 00015ab1 /system/lib/libc.so (libc_fatal+16) 07-11 11:50:43.375 187-187/? I/DEBUG: #06 pc 00014819 /system/lib/libc.so (assert2+20) 07-11 11:50:43.375 187-187/? I/DEBUG: #07 pc 002e5faf /data/app/owt.test.conference.apitest-2/lib/arm/libjingle_peerconnection_so.so 07-11 11:50:43.375 187-187/? I/DEBUG: #08 pc 002f58b3 /data/app/owt.test.conference.apitest-2/lib/arm/libjingle_peerconnection_so.so 07-11 11:50:43.376 187-187/? I/DEBUG: #09 pc 00007325 /data/app/owt.test.conference.apitest-2/lib/arm/libjingle_peerconnection_so.so 07-11 11:50:43.376 187-187/? I/DEBUG: #10 pc 00063259 /data/app/owt.test.conference.apitest-2/lib/arm/libjingle_peerconnection_so.so 07-11 11:50:43.376 187-187/? I/DEBUG: #11 pc 00126827 /data/app/owt.test.conference.apitest-2/lib/arm/libjingle_peerconnection_so.so 07-11 11:50:43.376 187-187/? I/DEBUG: #12 pc 001268a9 /data/app/owt.test.conference.apitest-2/lib/arm/libjingle_peerconnection_so.so 07-11 11:50:43.376 187-187/? I/DEBUG: #13 pc 00009515 /data/app/owt.test.conference.apitest-2/lib/arm/libjingle_peerconnection_so.so 07-11 11:50:43.377 187-187/? I/DEBUG: #14 pc 00068e13 /data/app/owt.test.conference.apitest-2/lib/arm/libjingle_peerconnection_so.so 07-11 11:50:43.377 187-187/? I/DEBUG: #15 pc 000093df /data/app/owt.test.conference.apitest-2/lib/arm/libjingle_peerconnection_so.so 07-11 11:50:43.377 187-187/? I/DEBUG: #16 pc 00005f51 /data/app/owt.test.conference.apitest-2/lib/arm/libjingle_peerconnection_so.so 07-11 11:50:43.377 187-187/? I/DEBUG: #17 pc 00016baf /system/lib/libc.so (pthread_start(void*)+30) 07-11 11:50:43.378 187-187/? I/DEBUG: #18 pc 00014af3 /system/lib/libc.so (__start_thread+6)