webrtc库调用某个内部方法并获取多余的\u错误。然后坠毁了
如果需要更多信息,请询问。
//代码
let iceServer = RTCICEServer(uri:URL(string: resturi), username: “***”, password: “***”)
// Enable SSL globally for WebRTC in our app
let pcFactory:RTCPeerConnectionFactory = RTCPeerConnectionFactory()
let rtcConfiguration = RTCConfiguration()
rtcConfiguration.iceServers = [iceServer!]
let pair1 = RTCPair(key: "OfferToReceiveAudio", value: "true")
let pair2 = RTCPair(key: "OfferToReceiveVideo", value: "false")
let pair3 = RTCPair(key: "DtlsSrtpKeyAgreement", value: "true")
self.mediaConstraints = RTCMediaConstraints(mandatoryConstraints: [pair1!,pair2!], optionalConstraints:[pair3!])
// Create the peer connection using the ICE server list and the current class as the delegate
let localStream:RTCMediaStream = pcFactory.mediaStream(withLabel: “12345”)
let audioTrack:RTCAudioTrack = pcFactory.audioTrack(withID: “123456”)
audioTrack.delegate = self
let status = localStream.addAudioTrack(audioTrack)
self.peerConnection = pcFactory.peerConnection(with: rtcConfiguration, constraints: self.mediaConstraints!, delegate: self)
let pstatus = self.peerConnection!.add(localStream)
print(status)
print(pstatus)
//Let’s look at how the offer is created, which initiates the call.
self.peerConnection!.createOffer(with: self, constraints: self.mediaConstraints)
我在这里喝了一口。
public func peerConnection(_ peerConnection: RTCPeerConnection!, didCreateSessionDescription sdp: RTCSessionDescription!, error: Error!)
此代理调用时发生崩溃。
func peerConnection(_ peerConnection: RTCPeerConnection!, gotICECandidate candidate: RTCICECandidate!)
事故报告
异常类型:EXC_BAD_ACCESS(SIGSEGV)异常子类型:KERN_在0x5000000000000038处的地址无效终止信号:分段错误:11终止原因:命名空间信号,代码0xb终止进程:由线程触发的EXC处理程序[0]:9
筛选的系统日志:未找到
线程0名称:调度队列:com。苹果主线程线程0:0
libsystem\u内核。dylib 0x000000018f58816c mach_msg_trap 8 1 libsystem_内核。dylib 0x000000018f587fdc mach_msg 72 2
CoreFoundation 0x0000000190585EC\uuuu CFRunLoopServiceMachPort 192 3 CoreFoundation 0x0000000190583908\uuuu CFRunLoopRun 1132 4 CoreFoundation
0x00000001904b2048 CFRunLoopRun特定444 5图形服务
0x0000000191f35198 GSEventRunModal 180 6 UIKit
0x000000019648b818-[UIApplication_run]684 7 UIKit
0x0000000196486550 UIApplicationMain 208 8 Shukran
0x0000000100080a1c 0x100007C000 18972 9 libdyld.dylib
0x000000018f4945b8开始4
线程1名称:com.apple.uikit.eventfetch线程1:0
libsystem_kernel.dylib0x000000018f58816cmach_msg_trap8 1libsystem_kernel.dylib0x000000018f587fdcmach_msg72 2
CoreFoundation 0x0000000190585cec CFRunLoopServiceMachPort 192 3 CoreFoundation 0x0000000190583908__CFRunLoopRun1132 4 CoreFoundation
0x00000001904b2048 CFRunLoopRunBY 444 5 Foundation
0x0000000190fc0b1c-[NSRunLoop(NSRunLoop)runMode: beForeDate:] 304 6 Foundation 0x0000000190fe160c-[NSRunLoop(NSRunLoop)runUntilDate:] 96 7 UIKit 0x0000000196e00e6c-[UIEventFetcher threadMain] 1368基金会0x00000001910be50c__NSThread__start1024 9
libsystem_pthread.dylib0x000000018f66b860_pthread_body240 10libsystem_pthread.dylib0x000000018f66b770_pthread_body0 11libsystem_pthread.dylib0x000000018f668dbcthread_start4
线程2名称:AVAudioSession通知线程2:0
libsystem\u内核。dylib 0x000000018f58816c mach_msg_trap 8 1 libsystem_内核。dylib 0x000000018f587fdc mach_msg 72 2
CoreFoundation 0x0000000190585EC\CFRunLoopServiceMachPort 192 3 CoreFoundation 0x0000000190583908\CFRunLoopRun 1132 4 CoreFoundation
0x00000001904b2048 CFRunLoopRun特定444 5 AVFAudio
0x00000001a9baafe8 GenericRunLoopThread::Entry(void*)164 6
AVFAudio 0x00000001a9bd0f14 CAPThread::Entry(CAPThread*)84 7 libsystem_pthread。dylib
0x000000018f66b860_pthread_body 240 8 libsystem_pthread。dylib
0x000000018f66b770_pthread_body 0 9 libsystem_pthread。动态库
0x000000018f668dbc线程\u开始4
线程3名称:com。苹果NSURLConnectionLoader线程3:0
libsystem\u内核。dylib 0x000000018f58816c mach_msg_trap 8 1 libsystem_内核。dylib 0x000000018f587fdc mach_msg 72 2
CoreFoundation 0x0000000190585EC CFRunLoopServiceMachPort 192 3 CoreFoundation 0x0000000190583908\uuuu CFRunLoopRun 1132 4 CoreFoundation
0x00000001904b2048 CFRunLoopRun特定444 5 CFNetwork
0x0000000190c9fcec[NSURLConnection(Loader)\u resourceLoadLoop:]336 6基金会0x000 000 0191950BE50CαNSTRADEXY启动1024 1024 LIB StulePThread。dylib 0x000000018f66b860_pthread_body 240 8 libsystem_pthread。dylib
0x000000018f66b770_pthread_body 0 9 libsystem_pthread。动态库
0x000000018f668dbc线程\u开始4
线程4:0 libsystem_pthread。dylib 0x000000018f668db0开始线程0
线程5:0 libsystem\u内核。dylib 0x000000018f5a6a88 uuu工作Q_u内核返回8 1 libsystem_pthread。dylib 0x000000018f669188_pthread_wqthread 968 2
libsystem_pthread。dylib 0x000000018f668db4启动线程4
线程6:0 libsystem_pthread。dylib 0x000000018f668db0开始线程0
线程7:0libsystem_kernel.dylib0x000000018f5a5e1c__psynch_cvwait8 1libsystem_pthread.dylib0x000000018f66a9d0_pthread_cond_wait640 2 Shukran
0x000000010030009c 0x10007c000 2637980 3libsystem_pthread.dylib0x0000018f66b860_pthread_body240 4<--plhd-3/>
0x000000018f66b770_pthread_body0 5libsystem_pthread.dylib
0x000000018f668dbcthread_start4
线程8:0 libsystem\u内核。dylib 0x000000018f5a623c选择1 Shukran 0x00000001003004d0 0x10007c000 2639056 2 libsystem线程。dylib
0x000000018f66b860_pthread_body 240 3 libsystem_pthread。dylib
0x000000018f66b770_pthread_body 0 4 libsystem_pthread。动态库
0x000000018f668dbc线程\u开始4
线程9名称:VoiceProcessThread 9崩溃:0 Shukran
0x00000001001956ac 0x100007C000 1152684 1 Shukran
0x000000010019569c 0x100007C000 1152668 2 Shukran
0x0000000100168688 0x100007C000 968328 3 Shukran
0x0000000100191020 0x100007C000 1134624 4 Shukran
0x000000010033BC 0x100007C000 2879932 5 Shukran
0x00000001002d906c 0x100007C000 2478188 6 Shukran
0x00000001002d8670 0x100007C000 2475632 7 Shukran
0x00000001002ca330 0x100007C000 2417456 8 Shukran
0x00000001004293F00x100007C000 3855344 9 Shukran
0x00000001002fb010 0x100007C000 2617360 10 Shukran
0x00000001002faf94 0x100007C000 2617236 11 libsystem。dylib 0x000000018f66b860_pthread_body 240 12 libsystem_pthread。dylib
0x000000018f66b770_pthread_body 0 13 libsystem_pthread。动态库
0x000000018f668dbc线程\u开始4
线程10名称:PacerThread线程10:0 libsystem\u内核。dylib
0x000000018f5a5e1c\uuuu psynch\u cvwait 8 1 libsystem\u pthread。dylib
0x000000018f66a9d0线程第二次等待6402 Shukran
0x000000010028548c 0x100007C000 2135180 3 Shukran
0x00000001002F7540x100007C000 2602308 4 Shukran
0x00000001004294F00x100007C000 3855600 5 Shukran
0x00000001002fb010 0x100007C000 2617360 6 Shukran
0x00000001002faf94 0x1000007C000 2636系统线程。dylib 0x000000018f66b860_pthread_body 240 8 libsystem_pthread。dylib
0x000000018f66b770_pthread_body 0 9 libsystem_pthread。动态库
0x000000018f668dbc线程\u开始4
线程11名称:模块进程线程11:0
libsystem\u内核。dylib 0x000000018f5a5e1c\uuuu psynch\u cvwait 8 1 libsystem\u pthread。dylib 0x000000018f66a9d0第二次等待640 2 Shukran 0x000000010028548c 0x100007C000 2135180 3 Shukran
0x00000001002f7544 0x100007C000 2602308 4 Shukran
0x00000001004294F00x100007C000 3855600 5 Shukran
0x00000001002fb010 0x100007C000 2617360 6 Shukran
0x00000001002faf94 0x100007C000 2617236。dylib 0x000000018f66b860_pthread_body 240 8 libsystem_pthread。dylib
0x000000018f66b770_pthread_body 0 9 libsystem_pthread。动态库
0x000000018f668dbc线程\u开始4
线程9在ARM线程状态下崩溃(64位):0x000000010303c100 x1:0x0000000000000000 x2:0x0000000000000000 x3:0x00000001024694e8 x4:0x0000000000000000 x5:0x0000000000000010 x6:0x0000000000000002 x7:0x000000016e54a45c x8:0x5000000000000000000000X9:0x0000000000000000000000 x10:0x000000016e54b818 x11:0x0000000000000000000000000000 x12:0x03e0fe0003e0fe00 x13:0x000000018f66b770 x14:0x000000018f668dbc x15:0x0000000000000010 x16:0x000000018f669ab8 x17:0x00000000000000001X18:0x0000000000000000000004 x20:0x0000000104082e00 x21:0x00000001702a42c0 x22:0x000000016e54a278 x23:0x00000001702a42e8 x24:0x000000016e54a240 x25:0x00000001702a42c8 x26:0x00000001702A42E02E07:0xD96031967605A
x28:0x0000000000000000 fp:0x000000016e54a1f0 lr:0x000000010019569c sp:0x000000016e549b10 pc:0x00000001001956ac cpsr:0x60000000
请检查您的iceServer
是否正常运行,我使用了以下iceServer
并解决了崩溃问题。或者您可以构建自己的STUN服务器
。这可能是你撞车的原因之一。
let iceServer1:RTCICEServer = RTCICEServer.init(uri: URL.init(string: "stun:stun.l.google.com:19302"), username: "", password: "")
或者
let iceServer2:RTCICEServer = RTCICEServer.init(uri: URL.init(string: "turn:numb.viagenie.ca"), username: "webrtc@live.com", password: "muazkh")
我想在我的应用程序中使用插屏广告,所以我实现了所有必要的委托方法。问题是,如果我使用[self Request estInterstitialAdPresent]来显示广告,只有interstitialAdddLoad:方法被调用。interstitialAdActionddFinish:方法没有被调用... 但是,如果我使用已弃用的[self.interstitialPresinFromView
1.子类扩展父类。2.子类实现Cloneable并重写clone()方法调用super。clone()3.父类既不实现Cloneable接口,也不重写clone(()方法。 输出:克隆父类和子类状态。 问题:在父类没有实现标记接口Cloneable的情况下,父类状态如何被对象类克隆?
在Kotlin中使用类委托时,可以覆盖成员。然而,关于代表团的参考页上说: 但是,请注意,以这种方式重写的成员不会从委托对象的成员中调用,委托对象只能访问其自己的接口成员实现。 我想重写委托对象的方法使用的属性,以便委托对象的方法调用此重写属性。正如文档所述,用关键字覆盖属性并不能实现这一点。有什么方法可以让我实现这种行为吗?如果不是,这是否表明我应该改用继承? 这是一个代码示例: 这段代码打印“
我使用输入和输出流实现了套接字。外部架构负责一次发送一个请求进行写入。 然而,如果任何请求没有返回no HasBytesAvailable,我需要从队列中删除该请求并通知请求超时。 对于所有其他请求,我能够正确地发送/接收数据,但如果任何一个请求超时,那么在此之后,hasspaceavable将永远不会被调用。 我的代码如下: @CCCommandSocket的实现 @合成连接TimeoutTim
问题内容: 有人可以解释何时以及何时不使用Swift中的委托指针进行“弱”分配,为什么? 我的理解是,如果您使用的协议未定义为类,则无法,也不想将您的委托指针分配给弱。 但是,当您的协议定义为类类型协议时,您是否要将委托设置为弱指针? 我对么?在Apple的快速指南中,类协议示例没有使用弱分配,但是在我的测试中,如果没有弱引用我的委托人,我会看到强参考周期。 问题答案: 通常,使类协议(如用关键字
问题内容: CLLocationManager的委托方法 didChangeAuthorizationStatus和didUpdateToLocation 没有接到电话。 位置始终使用说明键已添加到info.plist中,并且在我首次启动应用程序时也收到通知。 我能够看到谷歌地图,但是我看不到当前位置,当我更改位置时,它不会更新。基本上不会调用委托方法。 //码 问题答案: 在您的代码中,您正在使