kcp icon indicating copy to clipboard operation
kcp copied to clipboard

ikcp_update报这个错,不知道为什么,请教一下高手。

Open thinbug opened this issue 1 year ago • 4 comments

我的项目是c#的,kcp是cmake直接编译成dll来使用的 . 服务端代码可以连接多kcp.在多用户运行一段时间后会出现报错,如下图 image

这个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,

thinbug avatar Nov 14 '24 03:11 thinbug

image image

发现有时候这个ikcp_update函数就回不来了,ikcp_update内部死循环了?,这个线程CPU是满的 , 不知道是哪里的问题

thinbug avatar Nov 15 '24 04:11 thinbug

同一个 kcp 对象不要多进程调用

skywind3000 avatar Nov 16 '24 05:11 skywind3000

好像是我在别的线程调用了ikcp_send , 感谢回复.

thinbug avatar Nov 18 '24 02:11 thinbug

按理来说多线程需要加锁

cucumber12121 avatar May 29 '25 02:05 cucumber12121