lsalzman / enet

ENet reliable UDP networking library
MIT License
2.77k stars 673 forks source link

Crash in enet_free #263

Open Evildea opened 3 months ago

Evildea commented 3 months ago

Hi,

Not sure if this is a me issue or a potential bug. When using ENet after running for a few minutes in my game I randomly get a crash at this point. image

Full stack is here: image

image

Would love some guidance. Thanks!

Evildea commented 3 months ago

I figured out the issue. It was a me issue. Basically, I missed the fact that enet_host_service() handles both receive and send messages. I assumed for whatever reason it only handled receive messages which meant I put it in a separate thread to where I was sending messages from. Obviously leading to corruption. I'll leave this up just in case anyone else encounters this issue.

bjorn commented 3 months ago

I'll leave this up just in case anyone else encounters this issue.

Since it's not an open issue with ENet, I would suggest you rather close it again. :-)