Git Product home page Git Product logo

Comments (21)

whatisor avatar whatisor commented on August 15, 2024 7

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.

from mediasoup-client-android.

lusfold avatar lusfold commented on August 15, 2024 4

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)

from mediasoup-client-android.

acoderleex avatar acoderleex commented on August 15, 2024 3

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?

from mediasoup-client-android.

skgwazap avatar skgwazap commented on August 15, 2024 1

I've scribbled something here #42

from mediasoup-client-android.

ethand91 avatar ethand91 commented on August 15, 2024

Does the crash happen randomly?
Or is there a way to reproduce this issue?

from mediasoup-client-android.

whatisor avatar whatisor commented on August 15, 2024

@ethand91 ,as described, "WebSockets connection lost".
My network quality is bad, sometimes it disconnected to https://v3demo.mediasoup.org/, then it occurs

from mediasoup-client-android.

gongwj1119 avatar gongwj1119 commented on August 15, 2024

@whatisor @ethand91 Has the crash been solved?

from mediasoup-client-android.

haiyangwu avatar haiyangwu commented on August 15, 2024

@gongwj1119 @whatisor Would you try the latest version, I've modified the implementation of xx-jni.cpp and the crash never happened during my local test.

from mediasoup-client-android.

PhilanthropistBright avatar PhilanthropistBright commented on August 15, 2024

I had the same problem, and in the Demo it crashed just by switching the network

from mediasoup-client-android.

foobra avatar foobra commented on August 15, 2024

@gongwj1119 @whatisor Would you try the latest version, I've modified the implementation of xx-jni.cpp and the crash never happened during my local test.

do you push your local change to github? I didn't see any change about xx-jni.cpp during last 30days

from mediasoup-client-android.

wujianwei121 avatar wujianwei121 commented on August 15, 2024

@linsunshinecoder RoomClient->JoinImpl if (mMediasoupDevice == null) {
mMediasoupDevice = new Device();
String routerRtpCapabilities = mProtoo.syncRequest("getRouterRtpCapabilities");
mMediasoupDevice.load(routerRtpCapabilities);
}
Mmediasaupdevice was created repeatedly

from mediasoup-client-android.

pintukumarpatil avatar pintukumarpatil commented on August 15, 2024

org.mediasoup.droid.demo E/soup.droid.dem: 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)
FATAL EXCEPTION: AudioTrackJavaThread
Process: org.mediasoup.droid.demo, PID: 11162
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)

facing same issue

from mediasoup-client-android.

Ben0421 avatar Ben0421 commented on August 15, 2024

I can reproduce this error by:
1 - Creating both send and receive transports
2 - Connecting sendTransport by producing
3 - Pausing the producer
4 - Connecting recvTransport by consuming
5 - Stopping the consumer
6 - Closing the recvTransport
7 - Disposing the recvTransport <-- After disposing, app will crash soon
8 - Recreating the recvTransport in the server and than the client

App crashes after disposing of the recvTransport if the sendTransport is connected (a producer is created on this transport and has produced). The crash can be reproduced quite easily following those steps on two devices (other devices tested work as intended).

The devices where this crash happens are armeabi-v7a Android 6.0.1 device (2 different manufacturers) and a Android 5.1-v7a device. This isn't specific to armv7a as devices with v7a/Android 7.1 work as expected.

PeerConnectionFactory is created a single time and MediasoupDevice is also only created once. I am using a build with the latest commits (26 june).

Any help is appreciated!

E/ACRA: ACRA caught a UnsatisfiedLinkError for com.ex.app
java.lang.UnsatisfiedLinkError: No implementation found for void org.webrtc.voiceengine.WebRtcAudioRecord.nativeDataIsRecorded(int, long) (tried Java_org_webrtc_voiceengine_WebRtcAudioRecord_nativeDataIsRecorded and Java_org_webrtc_voiceengine_WebRtcAudioRecord_nativeDataIsRecorded__IJ)
at org.webrtc.voiceengine.WebRtcAudioRecord.nativeDataIsRecorded(Native Method)
at org.webrtc.voiceengine.WebRtcAudioRecord.access$600(WebRtcAudioRecord.java:26)
at org.webrtc.voiceengine.WebRtcAudioRecord$AudioRecordThread.run(WebRtcAudioRecord.java:166)

from mediasoup-client-android.

Ben0421 avatar Ben0421 commented on August 15, 2024

@haiyangwu 大佬好,当我运行代码 recvTransport.close()时候会出现下面这个异常。请问是什么原因呢, 是创建transport的时候要注意哪些问题还是什么原因呀? 望回复,谢谢!

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)

Did you call recvTransport.close() before or after sendTransport.close() ? Did you call .dispose() for both transports? What Android version is affected?

from mediasoup-client-android.

haitunSasa avatar haitunSasa commented on August 15, 2024

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.

from mediasoup-client-android.

wujianwei121 avatar wujianwei121 commented on August 15, 2024

from mediasoup-client-android.

Ben0421 avatar Ben0421 commented on August 15, 2024

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.

Nice catch! libmediasoup creates multiple peer connection factories by default, including when creating a Device. Did you do a commit of the patch you applied? I checked your fork of this project but unfortunately it did not include any changes. Would you be open to sharing the solution?

from mediasoup-client-android.

janus-xiao avatar janus-xiao commented on August 15, 2024

libmediasoupclient_ so.so How to compile by yourself ?

from mediasoup-client-android.

tkreknin avatar tkreknin commented on August 15, 2024

libmediasoupclient_ so.so How to compile by yourself ?

It's better to ask here https://github.com/versatica/libmediasoupclient/ as mediasoup-client-android depends on it.
But, afair, once you have all dependencies and tools downloaded (cmake, webrtc) you can build mediasoup-client-android using gradle and it will automatically build libmediasoupclient_ so.so

from mediasoup-client-android.

acoderleex avatar acoderleex commented on August 15, 2024

waiting for new release to this problem

from mediasoup-client-android.

whatisor avatar whatisor commented on August 15, 2024

If we talk about pure Java technically, does someone know why a function is possible to become unknown by some bad logic?
It should be constrained from .so binary.

from mediasoup-client-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.