ikcp_update报这个错,不知道为什么,请教一下高手。
我的项目是c#的,kcp是cmake直接编译成dll来使用的 . 服务端代码可以连接多kcp.在多用户运行一段时间后会出现报错,如下图
这个ikcp_update报错一般是什么原因引起的? Fatal error. System. AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Repeat 2 times: at NetLibrary. KCP. ikcp_update (NetLibrary. IKCPCB*, UInt32) at NetLibrary. KcpSocketServer+?+?.?()at Systen. Threading. ExecutionContext. RunInternal (System. Threading. ExecutionContext,
发现有时候这个ikcp_update函数就回不来了,ikcp_update内部死循环了?,这个线程CPU是满的 , 不知道是哪里的问题
同一个 kcp 对象不要多进程调用
好像是我在别的线程调用了ikcp_send , 感谢回复.
按理来说多线程需要加锁