mediasoup-client-android: Crash related to Audio

When “WebSockets connection lost”, application crash with below ERROR log:

`No implementation found for void org.webrtc.voiceengine.WebRtcAudioTrack.nativeGetPlayoutData(int, long) (tried Java_org_webrtc_voiceengine_WebRtcAudioTrack_nativeGetPlayoutData and Java_org_webrtc_voiceengine_WebRtcAudioTrack_nativeGetPlayoutData__IJ) 03-21 14:26:08.102 3914-4000/ /AndroidRuntime: FATAL EXCEPTION: AudioTrackJavaThread Process: com.immertec.vr, PID: 3914 java.lang.Error: FATAL EXCEPTION [AudioTrackJavaThread] Unity version : 2018.4.18f1 Device model : unknown Android SDK built for x86 Device fingerprint: Android/sdk_google_phone_x86/generic_x86:6.0/MASTER/5525988:userdebug/test-keys

Caused by: java.lang.UnsatisfiedLinkError: No implementation found for void org.webrtc.voiceengine.WebRtcAudioTrack.nativeGetPlayoutData(int, long) (tried Java_org_webrtc_voiceengine_WebRtcAudioTrack_nativeGetPlayoutData and Java_org_webrtc_voiceengine_WebRtcAudioTrack_nativeGetPlayoutData__IJ)
    at org.webrtc.voiceengine.WebRtcAudioTrack.nativeGetPlayoutData(Native Method)
    at org.webrtc.voiceengine.WebRtcAudioTrack.access$400(WebRtcAudioTrack.java:28)
    at org.webrtc.voiceengine.WebRtcAudioTrack$AudioTrackThread.run(WebRtcAudioTrack.java:147)`

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 21 (2 by maintainers)

Commits related to this issue

Most upvoted comments

Base on update from haiyangwu, this is my solution:

  • Firstly, Close() both send transport and receive transport
  • Secondly, dispose() them. It looks like Webrtc has thread async issue. If dispose before closing all, it becomes the issue.

latest version still crash:

java.lang.UnsatisfiedLinkError: No implementation found for void org.webrtc.voiceengine.WebRtcAudioTrack.nativeGetPlayoutData(int, long) (tried Java_org_webrtc_voiceengine_WebRtcAudioTrack_nativeGetPlayoutData and Java_org_webrtc_voiceengine_WebRtcAudioTrack_nativeGetPlayoutData__IJ) at org.webrtc.voiceengine.WebRtcAudioTrack.nativeGetPlayoutData(Native Method)

I think I have fixed this problem. In the webrtc issues, there also have this problem. https://bugs.chromium.org/p/webrtc/issues/detail?id=7587 The reason is that only one audio device module supported on Android. In this code, when join the room, the peerConnectionFactory has been created 4 times and each time will create one audio device module.So I try to create only one peerConnectionFactory in java, and add peerconnection options params in device.cpp. Finally, it works. I hope it helps you.

Could you release a branch for us?