Serious problems with SDL_net and OS X

I’ve got a problem here with a game I’m working on that I have been
pounding my head against for a while now - enough to make me put the
project on hold and work on something else. I have a multiplatform
SDL/OpenGL game near completion that will compile on Linux, Windows, and
OS X without any problems, but for some reason, the SDL_net-based
multiplayer, while working 100% on Windows and Linux, -completely-
refuses to work on OS X.

During one particular phase of the game, when a series of data packets
is sent in quick sequence, on OS X these packets get mangled, seemingly
having bytes added and dropped at random. What is especially odd is
that during the previous phase of the game, where a single packet is
sent on a regular basis, the network code seems to work fine. This is
NOT a network-byte-order issue - not only does the problem occur on
Mac-to-Mac games (even with both instances of the game running on the
same computer), but the game only sends 8-bit data anyway, so byte order
is irrelevant.

It’s possible that the version of SDL_net that I built on my Mac is
somehow corrupt, and this problem wouldn’t occur on another system, but
I have tried a couple of the older SDL_net builds as well, with the same
results.

I’ve tried to research this issue, but have so far come up with nothing
even remotely useful. I’m wondering if anyone else here has had similar
experiences with SDL_net on OSX, or know of a reason why it’s giving me
problems like this?

Thank you for any help you can give me.

  • Christopher Corkum

Just to clarify, are you using UDP here (in which case packets may get
lost or arrive out-of order), or TCP (in which case they should not)?On Wed, Sep 28, 2005 at 03:46:25PM -0300, Christopher Corkum wrote:

I’ve got a problem here with a game I’m working on that I have been
pounding my head against for a while now - enough to make me put the
project on hold and work on something else. I have a multiplatform
SDL/OpenGL game near completion that will compile on Linux, Windows, and
OS X without any problems, but for some reason, the SDL_net-based
multiplayer, while working 100% on Windows and Linux, -completely-
refuses to work on OS X.

[SNIP]


Steaphan Greene
GPG public key: http://www.cs.binghamton.edu/~sgreene/gpg.key.txt
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20050928/4fc4f492/attachment.pgp

I’m using TCP - the game code is definately dependent on the packets of
data arriving for sure and in order. I’ve got a simple error
checking/correcting system in there as well, in which the recieving end
sends back a short message saying if the packet arrived intact or not.
It still doesn’t help the problems I’m having because the packets don’t
seem to -ever- get sent properly.

  • Christopher Corkum

Steaphan Greene wrote:>On Wed, Sep 28, 2005 at 03:46:25PM -0300, Christopher Corkum wrote:

I’ve got a problem here with a game I’m working on that I have been
pounding my head against for a while now - enough to make me put the
project on hold and work on something else. I have a multiplatform
SDL/OpenGL game near completion that will compile on Linux, Windows, and
OS X without any problems, but for some reason, the SDL_net-based
multiplayer, while working 100% on Windows and Linux, -completely-
refuses to work on OS X.

[SNIP]

Just to clarify, are you using UDP here (in which case packets may get
lost or arrive out-of order), or TCP (in which case they should not)?



SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

could you rip apart a small test case which illustrates this bug and post it
to the list ?
-mikeOn Wednesday 28 September 2005 07:13 pm, Christopher Corkum wrote:

I’m using TCP - the game code is definately dependent on the packets of
data arriving for sure and in order. I’ve got a simple error
checking/correcting system in there as well, in which the recieving end
sends back a short message saying if the packet arrived intact or not.
It still doesn’t help the problems I’m having because the packets don’t
seem to -ever- get sent properly.

I’ve also been having weird problems with SDL_net and OSX. Things like
recieved connections on server sockets failing on their first read, then
working afterwards for a while, then finally dying with SIGPIPE.On September 28, 2005 12:46 pm, Christopher Corkum wrote:

I’ve got a problem here with a game I’m working on that I have been
pounding my head against for a while now - enough to make me put the
project on hold and work on something else. I have a multiplatform
SDL/OpenGL game near completion that will compile on Linux, Windows, and
OS X without any problems, but for some reason, the SDL_net-based
multiplayer, while working 100% on Windows and Linux, -completely-
refuses to work on OS X.

I’m not completely clear on what you mean by ‘test case’ (sorry if this
is a common phrase I’m ignorant of). Do you want me to show a short
section of the game’s logs where the failure happens, or do you want me
to try to write a small program that triggers the same bug?

  • Christopher Corkum

Mike Frysinger wrote:>On Wednesday 28 September 2005 07:13 pm, Christopher Corkum wrote:

I’m using TCP - the game code is definately dependent on the packets of
data arriving for sure and in order. I’ve got a simple error
checking/correcting system in there as well, in which the recieving end
sends back a short message saying if the packet arrived intact or not.
It still doesn’t help the problems I’m having because the packets don’t
seem to -ever- get sent properly.

could you rip apart a small test case which illustrates this bug and post it
to the list ?
-mike


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Small program, so that others can reproduce the bug and track it down.On September 29, 2005 06:54 pm, Christopher Corkum wrote:

I’m not completely clear on what you mean by ‘test case’ (sorry if this
is a common phrase I’m ignorant of). Do you want me to show a short
section of the game’s logs where the failure happens, or do you want me
to try to write a small program that triggers the same bug?

Christopher Corkum wrote:

I’m not completely clear on what you mean by ‘test case’ (sorry if this
is a common phrase I’m ignorant of). Do you want me to show a short
section of the game’s logs where the failure happens, or do you want me
to try to write a small program that triggers the same bug?

  • Christopher Corkum

He means a piece of source code with which you can replicate the
behaviour, so that we can all take a look at it and see if we can
discern the problem, or at least replicate the problem ourselves. :slight_smile:
-Elden>Mike Frysinger wrote:

On Wednesday 28 September 2005 07:13 pm, Christopher Corkum wrote:

I’m using TCP - the game code is definately dependent on the packets of
data arriving for sure and in order. I’ve got a simple error
checking/correcting system in there as well, in which the recieving end
sends back a short message saying if the packet arrived intact or not.
It still doesn’t help the problems I’m having because the packets don’t
seem to -ever- get sent properly.

could you rip apart a small test case which illustrates this bug and post it
to the list ?
-mike


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

yes
-mikeOn Thursday 29 September 2005 08:54 pm, Christopher Corkum wrote:

do you want me
to try to write a small program that triggers the same bug?

Christopher Corkum wrote:

‘test case’

equals

a small program that triggers the same bug?

Steven