Comments (21)
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.
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.
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.
I've scribbled something here #42
from mediasoup-client-android.
Does the crash happen randomly?
Or is there a way to reproduce this issue?
from mediasoup-client-android.
@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.
@whatisor @ethand91 Has the crash been solved?
from mediasoup-client-android.
@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.
I had the same problem, and in the Demo it crashed just by switching the network
from mediasoup-client-android.
@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.
@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.
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.
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.
@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.
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.
from mediasoup-client-android.
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.
libmediasoupclient_ so.so How to compile by yourself ?
from mediasoup-client-android.
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.
waiting for new release to this problem
from mediasoup-client-android.
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)
- Crash Java_org_mediasoup_droid_Consumer_nativeGetKind HOT 1
- Crash GLException org.webrtc.GlUtil in checkNoGLES2Error
- Crash <unknown> New Issue Unhandled BusError
- Crash abort New Issue Unhandled Abort
- Crash memcmp New Issue Unhandled Segfault
- Crash android::RefBase::decStrong New Issue Unhandled BusError
- Crash mediasoupclient::Device::Load New Issue Unhandled Segfault HOT 1
- Application getting crash on VideoTrack.removeSink HOT 1
- H.264 encoder support HOT 9
- Is this project still maintained?
- Build Failed
- C/C++: ld: error: ../../../../deps/webrtc/lib/arm64-v8a/libwebrtc.a:1: unknown directive: version
- Any api for using turn?
- is:issue is:open Excuse me, erroe happened when compile the code downloaded with the zip. what should I do. thank HOT 1
- How to send customized video and audio?
- app crashing when minifyEnabled set true HOT 1
- How to use audio/WebRtcAudioRecord rather than voiceengine/WebRtcAudioRecord
- How to switch to media mode to play WebRTC audio HOT 1
- vulnerable WebRTC lib. HOT 1
- The `Producer` and `Consumer` classes do not have variables named `rtpSender` and `rtpReceiver`.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mediasoup-client-android.