Page 1 of 2

[SOLVED] 0.74b1 Unplayable - Dropping connections in game

Posted: 29 Nov 2006, 04:39
by lazorwolf
0.74b1 looks so good, yet I can't successfully make it more than 10 minutes in a real game without dropping a connection.

Note this is not a sync error - at least I don't get any sync related messages.

Also, high pings don't seem to be an issue. I've seen disconnects when the highest ping was 200ms.

I've tested this a number of different ways, so here's whats happening:

When my buddy hosts I lose my connection in the first 10 minutes of the game. No errors messages. My units just drift into space, no chats appear, and I can't give my units to my ally. I can click around and quit just fine. No messages appear for the host either. This leads to an awkward few minutes of the game continuing without me until they realize I'm gone. :(

When I host a small 1v1 game, everything appears to work. I played for over 12 minutes with a buddy and never had a problem.

When I host a regular 2v2 game, my buddy gets disconnected like I did before. Only this time I (the host) receive a handy "Lost connection to player" error message over and over...

Both my buddy and I have been playing successfully since 0.72b1 (or before?). I've run into this issue a couple times with 0.73b1, but probably only 1 out of 20 games. This leads me to believe that 0.74b1 is the problem as its the only thing thats changed!

This might be related to this post and mantis bug - but my build queues are not that long... I do use build queues, but probably not more than 20 items per builder and 30-60 units (max) per factory.

(However, now that I think about it, in that 1v1 game that worked I probably queued less stuff...)

Thanks to the devs, modders, and mappers for making an incredible game!

Posted: 29 Nov 2006, 04:57
by Argh
System specs, and more importantly details about your connection speed, etc., would be useful.

Posted: 29 Nov 2006, 06:04
by lazorwolf
Sorry I forgot the specs!

My setup:

System (used to work fine as long as I stayed under 6 players)
Dell Latitude D510 with a 1.3GHz Celeron
512 MB RAM
Crappy Intel graphics
Integrated Dell (really Broadcom?) WiFi (good connection strength)
Windows XP SP2 with all of the updates, no firewall, no viruses, no spyware

Nothing special or weird really... other than its slow (but my CPU usage and pings are usually fine!).

Internet
DSL - 140+ KBps down, 40+ KBps up (these are the speeds I regularly get)
Crappy Netgear router/802.11b, it works though

My Friend's Setup: (he usually hosts)
2.8 GHz P4
1 GB RAM
Some graphics card that isn't great but better than mine!
Windows XP SP2

Same DSL plan & speeds, but he has a nice new integrated modem/router/access point... 2wire maybe? Whatever SBC/Yahoo/att DSL hands out.

Let me know if there's anyway I can generate some good debugging info.

Update: It may be worth noting that my buddy and I pinged each other and a web site a lot (with 1000 byte packets) after all of the crashes. No packets were dropped and the latency was always below 200ms.

Posted: 30 Nov 2006, 22:58
by ginekolog
i notice this too somtime... i lagg out just like server would drop or my net would drop. But other continue to play and my net does not loose packets... werid.

Posted: 01 Dec 2006, 04:07
by lazorwolf
Well I'm not hitting the build queue bug -- unless its much worse than I expected.

Basically I started another test game with my friend and always kept my build queue below 5 or 6. The game crashed after 3 minutes. I don't remember doing anything special when it crashed except I had just sent a chat message.

My build queue for all builders and factories was 8. In Spring 0.73b1 I would keep multiple builders going with queues greater than 30 with no problems.

This bug doesn't appear to be lag related either as my friend forgot to stop some downloads and my initial ping was 1500ms! He shut off the downloads in the first 30 seconds, pings returned to 150ms-250ms for the next 2-3 minutes until the crash.

Finally, what does that log level setting in the Settings program do? I cranked it up all of the way, but I can't find any log files. I really want to help the devs diagnose this, but I don't know where to start.

Posted: 01 Dec 2006, 10:57
by Tobi
Hmm, it's strange. AFAIK the netcode hasn't been changed at all since 0.73b1. Also I haven't had a single midgame engine crash in a long time, but I admit I rarely play something else then XTA or NanoBlobs.

The loglevel setting in settings.exe has never been implemented in spring.

Posted: 01 Dec 2006, 17:05
by Argh
I just played a 30+ minute game of NanoBlobs, hardcore huge spam, with gigantic carnage in a 4-player FFA. While the server frequently slowed, due to sheer spam and things blowing up, nobody had any connection problems. At all...

Posted: 01 Dec 2006, 20:18
by lazorwolf
AFAIK the netcode hasn't been changed at all since 0.73b1
I was afraid of that. Seems the netcode doesn't get much attention these days since it-just-works for the majority of players.

I quickly glanced at some files in SVN, and it doesn't look like any real changes have been made to network code or sync code since September.
The loglevel setting in settings.exe has never been implemented in spring.
Damn. Any chance someone who hasn't touched C/C++ in 6 years still knows enough to sprinkle debugLog("log message", ERR_LVL_INFO); (or whatever) statements throughout the code?
...nobody had any connection problems.
Since I'm not doing anything differently from hundreds of other players, I wouldn't expect most people to be able to reproduce this bug. I have only found 6 or more other people in the Lobby or on the forums who have experienced the same thing. I haven't found any similarities yet.

So far I've only been testing AA 2.23 on Altored Divide. (I'm trying to only change 1 thing about the game each time I retest.)

Any chance the disconnecting is related to AA + Altored Divide + 0.74b1?

Any advice on the best way to further diagnose this? I can run Wireshark (aka Ethereal) in the background if you think seeing network traffic might help.

Posted: 01 Dec 2006, 20:46
by Argh
It very well could be a bug in AA. Script issues, such as something running too many concurrent processes, could maybe cause a sync issue. However, we'd have probably heard of it by now- and your processor speed isn't at the very lowest end, so I kind've doubt it.

Posted: 01 Dec 2006, 21:02
by lazorwolf
Argh wrote:It very well could be a bug in AA...
You're just trying to get me to switch to NanoBlobs! :wink:

Just kidding, but I don't think the issue could possibly be processor related as my usage usually hovers around 2-8% (thats what that % in the bottom right represents right?).

Posted: 02 Dec 2006, 08:12
by lazorwolf
Tried 3 more games with interesting, yet still bad, results:

In both games my friend & I are on my home LAN.

Game 1:

Friend hosts with port forwarding. AA + Altored Divide game, 2v2. About 15 minutes into the game, both of our opponents connections drop (with the appropriate error message appearing on my friend's screen).

Game 2:

One of our opponents hosted. My friends connection is dropped after a while, but mine continues to work fine until we decide to quit & restart.

Game 3:

I restart my router (because its a cheap piece of junk), and one of our opponents hosts. Once again, 15 minutes into the game, my friend locks up with the floating away units.
I lock up a few minutes later without the floating away. Everything just freezes for me except my mouse.

So, it must be my Internet connection which has not changed (and Spring < 0.74b1 worked fine)

--or--

0.74b1 introduced some bug that only I and a few other people are experiencing for some reason.

--or a combination of the 2...

Any clues?

Posted: 02 Dec 2006, 09:19
by lazorwolf
I did a packet capture on my friends computer as he played a game and got disconnected.

The Wireshark (Ethereal) (libpcap compatible) packet capture!

Around the time he was disconnected packets were being fragmented!

In Wireshark use the search expression data contains "we're going ok" to find my friends last chat message before he was disconnected.

Use the search expression data contains "i lost it" to find the first chat message after he was disconnected.

I think this fragmentation may be the problem!

My router's MTU is set to 1492. The data portions of the IP fragments seem to always be 19.

Any guesses? I can export the packet capture in lots of formats, so let me know. I use Wireshark a lot, so I'd be more than happy to mine it for more data!

Posted: 02 Dec 2006, 23:54
by lazorwolf
Played a LAN game with my friend and it worked, so this bug has something to do with playing over the Internet (even though my LAN pings weren't a ton better than my over-the-Internet pings... 150-250ms).

Posted: 05 Dec 2006, 04:48
by Peekaboom
I'm not very technically inclined with networking, but I've noticed the same (or a very similar bug).

LAst night I was playing Balanced Annihilation, and hosted two games. I played one game to completion that lasted about 45 mim. The second game dropped the other guy about 20 minutes in. When I quit out I had been disconnected from the lobby entirely. To my dismay my entire internet connection wasn't working any more.

I still had an a valid IP from the router and could connect to it. Furthermore, the router was still getting an IP from the cable service. Yet I couldn't connect to the net at all. After releasing and renewing the router and my network adapter, and waiting about 5 minutes my connection came back.

I jumped back on spring and was talking to friend in the lobby. About 15 minutes later I got dumped from the lobby, same issue.

MY connection has been quite stable over the years, and I have not experienced this type of thing before. Its possible that the connection was buggered up (we've been having bad weather), but who knows. I will have to see how it goes in the future.

Posted: 05 Dec 2006, 05:49
by lazorwolf
Peekaboom wrote:... When I quit out I had been disconnected from the lobby entirely. To my dismay my entire internet connection wasn't working any more.

I still had an a valid IP from the router and could connect to it. Furthermore, the router was still getting an IP from the cable service. Yet I couldn't connect to the net at all. After releasing and renewing the router and my network adapter, and waiting about 5 minutes my connection came back.

I jumped back on spring and was talking to friend in the lobby. About 15 minutes later I got dumped from the lobby, same issue.
...
This sounds like a textbook case of a router crashing. Its pretty common with cheap routers, but even nicer ones need to be reset now and then because of firmware bugs or slow internal processors not being able to keep up with the zillions of UDP packets Spring throws around.

Cycle the power on your router and go back to playing happy full games friend! :) This bug kicks people within 15 minutes, not 40.

Posted: 06 Dec 2006, 02:30
by BvDorp
In older topics, the wireless connection seemed to be the problem. Prolly there was some kind of lag, or the data was just scattered, or Spring creates just this amount or kind of data that the router can't handle.

Someone experiencing the crashbug now could test with a wired connection and some better router, or just a direct LAN with a friend. That would really help out here, I think!

Posted: 06 Dec 2006, 04:57
by lazorwolf
BvDorp wrote:In older topics, the wireless connection seemed to be the problem. Prolly there was some kind of lag, or the data was just scattered, or Spring creates just this amount or kind of data that the router can't handle.

Someone experiencing the crashbug now could test with a wired connection and some better router, or just a direct LAN with a friend. That would really help out here, I think!
I've more or less already tested that. My friend was at my house and had a wired connection while I was on wireless. Sometimes he got dropped first, sometimes I did. Playing against each other on the LAN was no problem.

So I think its a problem with cheap routers and perhaps packet fragmentation. Ping/lag isn't necessarily the problem (my ping has always been ok). I think it might have to do with packet size / fragmentation, so if there's some way to get Spring to send smaller packets (but send them more often to keep the same bitrate) that might fix it.

I guess what I need to try is hooking my computer directly into my modem. Not exactly a permanent solution, but if it worked, then we'd know faulty routers are to blame.

Posted: 11 Dec 2006, 01:07
by BvDorp
... Playing against each other on the LAN was no problem.

So I think its a problem with cheap routers and perhaps packet fragmentation.
I guess what I need to try is hooking my computer directly into my modem. Not exactly a permanent solution, but if it worked, then we'd know faulty routers are to blame.
See, what I was aiming at. Have you tried some more? Thnx for the work btw!

[SOLVED] 0.74b1 Unplayable - Dropping connections in game

Posted: 03 Jan 2007, 23:43
by lazorwolf
I got a new router for Christmas, Linksys WRT54GL (Firmware 4.30.7), and Spring seems to work again!

I've only played 1 game that lasted a little over 30 minutes, but I was never able to play that long before.

For anyone else experiencing these weird connection issues I would encourage you to try bypassing your router or simply buying a new router.

Posted: 25 Feb 2007, 19:31
by Klopper
I had that problem a few days ago too although i had no router, my mtu value was configured optimally and my Windows Firewall was allowed all icmp stuff and didn't block Spring...i had, however, a second firewall running. And although it had all that stuff configured too, deactivating it (so only Windows Firewall left running) for playing Spring solved that problem for me.