slaeshjag / Muon

Muon is a new kind of RTS
GNU General Public License v3.0
2 stars 0 forks source link

The server works over a loopback interface, but not otherwise (segfaults when someone else joins) #118

Closed kqr closed 11 years ago

kqr commented 11 years ago

I'm sure @h4xxel can fill you out on the details, as he probably has a more clear picture of the issue than I do.

Reproduction steps on my computer:

  1. Forward a port on your router,
  2. Start a Muon server on that port,
  3. Start a second Muon client
  4. Try to connect to your server through your external IP (so you don't go via the loopback interface)
  5. Watch the glory burn
kqr commented 11 years ago

This does not happen on testmap. So far only tested on Wheel of Fortune 0.1.

h4xxel commented 11 years ago

worth noting is also that it works fine with the ip of the network card, but not the ip of the router, which is then forwarded to the machine

h4xxel commented 11 years ago

And it is actually the client that segfaults, but because of receiving bogus data from the server. The client running the server receives the MSG_JOIN correctly with the name of the joining player in one chunk. The next chunk however has an incorrect length and the following messages just contain crap, eventually making the client download a huge payload that overwrites all memory and segfaults

h4xxel commented 11 years ago

And it seems to be an issue related to the size of the map. testmap is small and works well. Wheel of fortune is slightly larger and crashes. testmap with some random large file added in the ldi will also cause a crash

kqr commented 11 years ago

This issue has been somewhat resolved by ff302b9aed. I will close this issue (it seems to work for larger maps now) and open a new one about the network code in general that will have to be resolved post release. Currently, we need features and we need features that work. This works in the sense that it doesn't destroy gameplay.