Both the server and client are created without an error, and I can receive the data placed into e.evt.peer->data after I set it.  Are there any specific errors that I should check for?<div>By the way, the segfault happens directly on that call to <meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-family: 'Bitstream Vera Sans Mono', 'Courier New', monospace; font-size: 12px; line-height: 17px; white-space: pre; ">enet_host_service</span>.  I really don't know how that and the peer data relate but somehow they do.  The segfault happens even if I don't use the peer data or call it anywhere, only having that one line to set it to something other than NULL.  Setting it to NULL does not make the segmentation fault happen.<br>

<br><div class="gmail_quote">On Wed, Apr 27, 2011 at 3:36 PM, Jay Sprenkle <span dir="ltr"><<a href="mailto:jsprenkle@gmail.com" target="_blank">jsprenkle@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


Perhaps you should clear <span style="font-family:'Bitstream Vera Sans Mono', 'Courier New', monospace;font-size:12px;line-height:17px;white-space:pre-wrap"><span style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;line-height:1.4em">e</span><span style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;line-height:1.4em">.</span><span style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;line-height:1.4em">evt</span><span style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;line-height:1.4em">.</span><span style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;line-height:1.4em">peer</span><span style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;line-height:1.4em;font-weight:bold">-></span><span style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;line-height:1.4em">data in the case of an error?</span></span><div>



<span style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px"></span><font face="'Bitstream Vera Sans Mono', 'Courier New', monospace"><span style="font-size:12px;line-height:16px;white-space:pre-wrap">There's no way any caller could determine if the value there is valid/an error occurred.</span></font></div>



<div><font face="'Bitstream Vera Sans Mono', 'Courier New', monospace"><span style="font-size:12px;line-height:16px;white-space:pre-wrap"><br></span></font><br>
<div class="gmail_quote"><div><div></div><div>On Wed, Apr 27, 2011 at 2:20 PM, Jacob F. <span dir="ltr"><<a href="mailto:queatz@gmail.com" target="_blank">queatz@gmail.com</a>></span> wrote:<br></div></div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div>
I really need some help.  This bug has stalled me for 2 days and I am getting no where at all.<div>What happens is when I change a peer's void* I can no longer call enet_host_service() without making a segmentation fault.</div>





<div><br></div><div>I have pushed the bugged code to my repository so you can look at it.</div><div><br></div><div><a href="https://github.com/Queatz/Simple-C---Game-Engine/blob/master/engine/network.cpp" target="_blank">https://github.com/Queatz/Simple-C---Game-Engine/blob/master/engine/network.cpp</a></div>





<div><br></div><div>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.</div>





<div><br></div><div>If someone could see something I am missing I would be very grateful.</div>
<br></div></div>_______________________________________________<br>
ENet-discuss mailing list<br>
<a href="mailto:ENet-discuss@cubik.org" target="_blank">ENet-discuss@cubik.org</a><br>
<a href="http://lists.cubik.org/mailman/listinfo/enet-discuss" target="_blank">http://lists.cubik.org/mailman/listinfo/enet-discuss</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>---<br>"The great thing about Object Oriented code is that it can make small, 
simple problems look like large, complex ones."<br>
</div>
<br>_______________________________________________<br>
ENet-discuss mailing list<br>
<a href="mailto:ENet-discuss@cubik.org" target="_blank">ENet-discuss@cubik.org</a><br>
<a href="http://lists.cubik.org/mailman/listinfo/enet-discuss" target="_blank">http://lists.cubik.org/mailman/listinfo/enet-discuss</a><br>
<br></blockquote></div><br>
</div>