Author Topic: Player Data Error  (Read 2777 times)

Offline Twinnuke

  • Newbie
  • *
  • Posts: 7
Player Data Error
« on: September 18, 2011, 04:16:50 pm »
So me and my friend are running almost identical systems.

i7 920 @ 2.66GHZ
ATI 5850 / GTX260
6GB DDR3-1600
X58 Motherboards


We both have 2.0 MegaBytes (thats bytes 2,000 kb/s) download
and 500 kb/s + uploads

Our ping to each other is generally around 88 to 120 because he lives across the country me in Rhode Island him in Calgary Canada.

Now About every 10 minutes we get a Player Data Error even on low units and the game Performace Profile on Normal. At first we thought it was because we were moving units (unit cap high) at around 7000 units at a time. But when we turned it on low it happened when we had around 1600 units.

When he hosts he recieves a Server Data Error instead. It's rather frusterating to have to quit out of game and reload every time. It seems he gets stuck 1 tick behind (1 "turn") behind me when this happens. Whether he is hosting or not.

Any Ideas? I wish I could look at the network code, (Being a game programmer my self) but it is not open source.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Player Data Error
« Reply #1 on: September 18, 2011, 04:33:55 pm »
Actually, we use Lidgren and it is open source, but naturally the layers on top of that that are particular to our game are not.

Do you have any log files in your game's RuntimeData directory?
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Twinnuke

  • Newbie
  • *
  • Posts: 7
Re: Player Data Error
« Reply #2 on: September 18, 2011, 04:39:03 pm »
Of course, sorry.

I will attempt to put together some log files tonight when he gets home that way both of ours can be looked at together.

I forgot to mention we are using Tuungle as a VPN because somewhere along the line his hamachi adapter got corrupted and we don't feel like taking it all out of registry and playing those fun games.

Offline Twinnuke

  • Newbie
  • *
  • Posts: 7
Re: Player Data Error
« Reply #3 on: September 18, 2011, 04:50:35 pm »
Actually it appears I have nothing in my Runtime Data about recent Player Errors but Server Errors from the two times he hosted "I believe" are here.


Code: [Select]
8/6/2011 4:56:54 AM (5.014)
-----------------------------------
Server Receiving Data Error-----------------------------------
System.OutOfMemoryException: Out of memory
  at (wrapper managed-to-native) object:__icall_wrapper_mono_array_new_specific (intptr,int)
  at System.Text.Encoding.GetChars (System.Byte[] bytes, Int32 index, Int32 count) [0x00000] in <filename unknown>:0
  at System.Text.Encoding.GetString (System.Byte[] bytes, Int32 index, Int32 count) [0x00000] in <filename unknown>:0
  at System.Text.UTF8Encoding.GetString (System.Byte[] bytes, Int32 index, Int32 count) [0x00000] in <filename unknown>:0
  at System.Text.Encoding.GetString (System.Byte[] bytes) [0x00000] in <filename unknown>:0
  at Compressor.DecompressStringGZip (System.String compressedText, Boolean IsOptional) [0x00000] in <filename unknown>:0
  at Game.ServerReceivingData (Int32 ConnectionIndex, Int32 FromPlayerNumber, NetworkMessageType Type, System.String Message) [0x00000] in <filename unknown>:0

9/4/2011 5:01:17 AM (5.015)
-----------------------------------
Server Receiving Data Error-----------------------------------
System.OutOfMemoryException: Out of memory
  at (wrapper managed-to-native) object:__icall_wrapper_mono_string_alloc (intptr)
  at (wrapper managed-to-native) string:InternalAllocateStr (int)
  at System.Text.StringBuilder..ctor (System.String value, Int32 startIndex, Int32 length, Int32 capacity, Int32 maxCapacity) [0x00000] in <filename unknown>:0
  at System.Text.StringBuilder..ctor (System.String value, Int32 startIndex, Int32 length, Int32 capacity) [0x00000] in <filename unknown>:0
  at System.Text.StringBuilder..ctor (Int32 capacity) [0x00000] in <filename unknown>:0
  at Game.DoFullSync (Boolean IsForSave, Boolean SendBeginFromLobby, Int32 JustForPlayerNumber, Boolean DoCompression) [0x00000] in <filename unknown>:0
  at Game.ServerReceivingData (Int32 ConnectionIndex, Int32 FromPlayerNumber, NetworkMessageType Type, System.String Message) [0x00000] in <filename unknown>:0

Memory Leak? Not allocated enough memory to a certain task? I'm actually completely sure what caused these errors but tonight I'll have his data.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Player Data Error
« Reply #4 on: September 18, 2011, 05:07:27 pm »
Hmm, that does sound like something that could happen on high caps but it's odd that you'd also see it on low.  I haven't seen an out-of-memory report in a while.

It will be interesting to see what the logs are like for the more recent games, particularly one played on low caps (preferably from a fresh start of the game; it pretty aggressively clears out all the references when clearing a game state so that the GC can do it's thing, but the mono GC in the version used by Unity is pretty suicidal in actual shortage situations, and it's only got like a 800MB heap to work with).

If you post a save where you're getting out-of-mem on low caps (or normal caps, really, it's only high where it would reasonably be able to push it that bad), I could take a look and try to figure out what sorts of strange things are going on.  Like maybe one of you is selecting 2000 ships and giving 1000 queued orders ;)  (not really, I hope)
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Twinnuke

  • Newbie
  • *
  • Posts: 7
Re: Player Data Error
« Reply #5 on: September 18, 2011, 05:32:04 pm »
I've selected about 8000 Ships at once and gave 4-5 queued orders but nothing larger than that. Alone I can run 30k + units and move them all at once (Cheats on) and I still don't get an Out Of Memory Error.

There have been times when the game has crashed to desktop which could be a memory leak / infinite loop issue where an array number is off maybe? OOB error type thing and it just infinite loops until it runs out of memory?

I know this thread isn't about this so I'm going to say Off-Topic really quick.
It'd be amazing if you could disable builders lines / tachyon lines so frame rates don't drop insanely when they are shooting massive amounts of enemies with them. This would free up a lot of processing time =]
« Last Edit: September 18, 2011, 05:34:08 pm by Twinnuke »

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Player Data Error
« Reply #6 on: September 18, 2011, 05:36:21 pm »
There have been times when the game has crashed to desktop which could be a memory leak / infinite loop issue where an array number is off maybe? OOB error type thing and it just infinite loops until it runs out of memory?
Oh, wish we'd gotten reports of those :)  To my knowledge there are no known crash bugs in the game aside from "legitimately" hitting the heap ceiling on high caps (which seems a lot rarer than it used to be).  All our array accesses are bounds-checked (C#, no unsafe), and the underlying stuff hasn't given us any trouble on that account.  If there were actually some kind of bug leading to runaway allocation or any kind of infinite loop, I assume we would have heard about it over the past 6 or so months where there haven't been many changes to the game (relatively compared to our normal rate of patches).
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Twinnuke

  • Newbie
  • *
  • Posts: 7
Re: Player Data Error
« Reply #7 on: September 18, 2011, 05:41:17 pm »
Gotta love C#, I primarily code in C++ but have been venturing into C# as of recent.

Code: [Select]
9/4/2011 3:29:47 AM (5.015)
-----------------------------------
AILoop Error-----------------------------------
System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
  at System.Collections.Generic.List`1[AIUnit].get_Item (Int32 index) [0x00000] in <filename unknown>:0
  at AILoop.RunAILoop () [0x00000] in <filename unknown>:0

There's one. But that was 14 days ago. It could have been patched already.

I see you're using an Array there with [AIUnit] and it's OOR / OOB.

Offline Nalgas

  • Hero Member
  • *****
  • Posts: 680
Re: Player Data Error
« Reply #8 on: September 18, 2011, 10:31:00 pm »
I know this thread isn't about this so I'm going to say Off-Topic really quick.
It'd be amazing if you could disable builders lines / tachyon lines so frame rates don't drop insanely when they are shooting massive amounts of enemies with them. This would free up a lot of processing time =]

I'm not at my desktop at the moment to look at which one it is (and don't feel like closing enough stuff on my laptop or listening to it swap like crazy), but last time I checked there was a setting to disable all of the lines drawn by things like that and munitions/armor boosting effects and things like that.  I've never, ever needed it on my desktop (i5 750, Radeon 4770), but it helps a little on my laptop (C2D 2.26 GHz, GeForce 9400m).  I ended up turning it back on even on the laptop, though, because it had a fairly minimal impact on performance, and it was more useful being able to see who was doing what.  You can try it out, but I'd be amazed if it has any perceptible impact on hardware like that, other than maybe in a handful of uncommon situations.

Offline Twinnuke

  • Newbie
  • *
  • Posts: 7
Re: Player Data Error
« Reply #9 on: September 18, 2011, 11:06:03 pm »
It happens when there are about 1000+ lines being drawn my frame rates drop when I am looking at it.