Make sure the ENet header files you are including into the code and the linked 
version of the library are definitively from the same version. If they were 
not, and due to changes in the ENetPeer structure in different versions, your 
code and the library could be working off of different layouts and causing all 
sorts of nastiness.

On 04/27/2011 10:20 PM, Jacob F. wrote:
I really need some help.  This bug has stalled me for 2 days and I am getting 
no where at all.
What happens is when I change a peer's void* I can no longer call 
enet_host_service() without making a segmentation fault.

I have pushed the bugged code to my repository so you can look at it.

https://github.com/Queatz/Simple-C---Game-Engine/blob/master/engine/network.cpp

As you can see, at line 147 I assign something to the peer data if someone 
connects.  Now, just above that on line 138 you see the call to 
enet_host_service where the segmentation fault happens.  It happens 
consistently on the next call (which is of a none event type) after a client 
connects, causing that peer data to get set.  With that line (147) commented I 
get no segmentation fault at all.

If someone could see something I am missing I would be very grateful.
_______________________________________________
ENet-discuss mailing list
[email protected]
http://lists.cubik.org/mailman/listinfo/enet-discuss

Reply via email to