Results 1 to 5 of 5

Thread: Network drops on windows?

  1. #1
    Peasant
    Join Date
    Jan 2009
    Posts
    6

    Default Network drops on windows?

    I'm working on a multiplayer sidescroller for my friends and myself, using 0.8.1, and it's coming along nicely. I've been doing a lot of the work on my nix laptop while away, and now I'm on my winxp desktop, and I've encountered new behavior.

    It's a single server model, so even when testing I have to run a server instance and then a client that connects to the localhost. My architecture communicates high-level information with netpackets, and then shares game objects via the netobject system -- all fantastic utilities, I might add. After the game gets started, it's all netobjects, and no netpackets (at this stage).

    For some reason, while connected to my localhost server, I'll get random drops. I get an error saying read_uchar8 fails. I traced it to CL_NetComputer_Generic::update_socket(), line 465 of netcomputer_generic.cpp. The first read_uchar8 after the else fails.

    Does anybody know what might be happening here? I can't imagine packets are getting lost on a localhost loop...?

    Thanks
    ~ Paul

  2. #2
    Peasant
    Join Date
    Jan 2009
    Posts
    6

    Default

    So you can get a feel for the game,
    here is a quick recording via FRAPS.

    The concept is that you are retelling a story to your friends.
    "So There We Were, Patrick and Paul, in Chinatown, when Ninjas attacked!"
    The mech is my character, the centaur is my friend's. I'll make them for my friends as I go... g/f wants a vampire that makes enemies bleed out if they already have a wound, for instance.
    You have two bars, Believability and Badassery.
    Believability goes down if you take damage or use power moves, goes up when you do nothing, and probably will go up with health packs or what not. If Believability runs out, you lose.
    Badassery goes up if you take or deal damage, and goes down (fairly quickly) when you do nothing. It establishes what moves are available to you. You might lose when Badassery runs out, but I haven't decided yet.

    You might recognize some of the sprites. It's random stuff off of existing games.

    Anyway, I'm still getting these drops. Anybody have any ideas? It seems to be at complete random.

  3. #3
    Peasant
    Join Date
    Jan 2009
    Posts
    6

    Default

    Does anybody perhaps have some advice on debugging the issue? I'm going to leap into the ClanLib source tonight, but I don't have much in the way of a toolset for monitoring packets or charting net performance.

    EDIT: I logged all of my messages fairly meticulously and found nothing surprising. I send about 4-8kb per second, which I will eventually cut down on, but it's not that substantial, and should be nothing for a local loop. Should I try updating my code-base to the newest version of ClanLib?
    Last edited by CrazyFrazee; 01-25-2009 at 05:25 AM.

  4. #4
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    It does sound like a bug in clanlib 0.8 somewhere.

    Something like that will be difficult to find, unless you can replicate the bug predictably.

    Since it's random. Try creating a function to fire off thousands of client / server messages - to see if it drops every time it's run. This "should" make it easier to find.

    Put a breakpoint at the exception where it fails. Examine the stack trace, to see if everything looks okay.

    You may find it is a speed issue - as you are connecting via localhost. for example: The server socket is partially setup when the client sends its first packet, causing confusion

  5. #5
    Peasant
    Join Date
    Jan 2009
    Posts
    6

    Default

    Okay, turns out that, one, you're right: put a 100 objects on at once, and the bug occurs within a frame or two.
    Two: this is a known bug.
    Three: I'm switching to 0.9 and ditching the network model.

    If anybody is interested in the source for this version, I'm willing to put it online. It is a good start for a network brawler.

    ~ Paul

Similar Threads

  1. Race condition in network classes
    By Niklas in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 09-22-2006, 12:11 PM
  2. Is the Dink Network down?
    By Prophet422 in forum Dink Smallwood HD
    Replies: 1
    Last Post: 11-12-2004, 03:01 AM
  3. how do i get an account with the dink network?
    By AgressiveNapkin in forum RTsoft Tavern
    Replies: 1
    Last Post: 02-12-2004, 09:15 AM
  4. Alternate link to reach the Dink Network
    By Seth in forum Dink Smallwood HD
    Replies: 2
    Last Post: 07-11-2003, 06:55 AM
  5. The Dink Network Is Down
    By redink1 in forum Dink Smallwood HD
    Replies: 6
    Last Post: 01-22-2003, 11:51 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •