ISBX / apprtc-ios

A native iOS video chat app based on WebRTC
BSD 3-Clause "New" or "Revised" License
1.35k stars 413 forks source link

Thread 1: EXC_BAD_ACCESS (code=1, address=0x0) When add stream to peerconnection #145

Open bhoomesh950 opened 5 years ago

bhoomesh950 commented 5 years ago

I am not using the default iceServers.

this is my iceServers Array <__NSArrayM 0x280274000>( RTCICEServer: [stun:stun.l.google.com:19302::], RTCICEServer: [stun:stun.l.google.com:19302::], RTCICEServer: [stun:stun1.l.google.com:19302::], RTCICEServer: [stun:stun2.l.google.com:19302::], RTCICEServer: [stun:stun3.l.google.com:19302::], RTCICEServer: [stun:stun4.l.google.com:19302::], RTCICEServer: [stun:stun.ekiga.net::], RTCICEServer: [stun:stun.ideasip.com::], RTCICEServer: [stun:stun.rixtelecom.se::], RTCICEServer: [stun:stun.schlund.de::], RTCICEServer: [stun:stun.stunprotocol.org:3478::], RTCICEServer: [stun:stun.voiparound.com::], RTCICEServer: [stun:stun.voipbuster.com::], RTCICEServer: [stun:stun.voipstunt.com::], RTCICEServer: [stun:stun.voxgratia.org::], RTCICEServer: [stun:173.194.202.127:19302::], RTCICEServer: [stun:%5B2607:f8b0:400e:c00::7f%5D:19302::], RTCICEServer: [turn:108.177.98.127:19305?transport=udp:COiB/t8FEgZNXgrELHMYzc/s6OMTIICjBQ:pUsC1bsC7/pf3MVqa1fwXvShTK+I=], RTCICEServer: [turn:%5B2607:f8b0:400e:c06::7f%5D:19305?transport=udp:COiB/t8FEgZNXgrELHMYzc/s6OMTIICjBQ:pUsC1bsC7/pf3MVqa1fwXvShTK+I=], RTCICEServer: [turn:108.177.98.127:19305?transport=tcp:COiB/t8FEgZNXgrELHMYzc/s6OMTIICjBQ:pUsC1bsC7/pf3MVqa1fwXvShTK+I=], RTCICEServer: [turn:%5B2607:f8b0:400e:c06::7f%5D:19305?transport=tcp:COiB/t8FEgZNXgrELHMYzc/s6OMTIICjBQ:pUsC1bsC7/pf3MVqa1fwXvShTK+I=] )

`- (void)startSignalingIfReady { if (!_isTurnComplete || !self.isRegisteredWithRoomServer) { return; } self.state = kARDAppClientStateConnected;

// Create peer connection. RTCMediaConstraints *constraints = [self defaultPeerConnectionConstraints]; NSLog(@"iceServers : %@",_iceServers);

_peerConnection = [_factory peerConnectionWithICEServers:_iceServers constraints:constraints delegate:self]; RTCMediaStream *localStream = [self createLocalMediaStream]; [_peerConnection addStream:localStream]; if (_isInitiator) { [self sendOffer]; } else { [self waitForAnswer]; } }` iam facing the issue at "[_peerConnection addStream:localStream]" please help me what is the problem.