Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
thinbug opened this issue Nov 14, 2024 · 3 comments
Open

Comments

@thinbug
Copy link

thinbug commented Nov 14, 2024

我的项目是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
Copy link
Author

thinbug commented Nov 15, 2024

image
image

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

@skywind3000
Copy link
Owner

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

@thinbug
Copy link
Author

thinbug commented Nov 18, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants