Page MenuHomeFeedback Tracker

Steam Query Yielding Random Packet Orders
Closed, ResolvedPublic

Description

Up-on querying servers, my development team have found that dedicated servers randomly (for no apparent reason) fail to send SetGameTags.
As shown here:
https://community.bistudio.com/wiki/STEAMWORKSquery#SetGameTags_in_detail

Packet sequence is normally blank for empty servers, so we interpret that for the player count.
However it seems that SetGameTags get pushed to sequence 11 when the server is empty on query.

I've attached several outputs
PacketIncorrect.dat
PacketOK.dat
Packet-emptyserver.dat

These should be self explanatory.
Segment delimiter is 0x00, first 6/7 bytes are to be ignored.

Details

Legacy ID
1611983203
Severity
None
Resolution
Duplicate
Reproducibility
Random
Category
Dedicated Server
Steps To Reproduce

List<byte[]> serverValues = GetSubArrays(responseBytes, 0x00);

name = Encoding.Default.GetString(serverValues[0]);
map = Encoding.Default.GetString(serverValues[1]);
game = Encoding.Default.GetString(serverValues[2]);
description = Encoding.Default.GetString(serverValues[3]);

if (serverValues[6].Count() > 0)
{

  var gameTags = GetSubArrays(serverValues[10], 0x2c);

  players = serverValues[6][0];
  playersmax = serverValues[6][1];
  locked = gameTags[6][1] == 't';

}
else
{

var gameTags = GetSubArrays(serverValues[11], 0x2c);
players = 0;
playersmax = serverValues[7][0];
locked = gameTags[6][1] == 't';

}

-------------------------------------------------------------------

public List<byte[]> GetSubArrays(byte[] array, byte delimiter)
{

  if (array == null)
  return null;

  var retval = new List<byte[]>();
  var sectionStart = 6; //first 6 bytes of the response are a header, we don't need it
  var sectionEnd = 0;

  for (; sectionEnd < array.Length; sectionEnd++)
  {
    if (array[sectionEnd] != delimiter) continue;
    var tempArray = new byte[sectionEnd - sectionStart];
    Buffer.BlockCopy(array,sectionStart,tempArray,0,sectionEnd - sectionStart);
    retval.Add(tempArray); 
    sectionStart = sectionEnd + 1;
  }

  return retval;

}

Additional Information

You could create a simple application to debug the packet sequence in development then have it output servers sending packets in random orders, or not sending SetGameTags. Something like the above. Feel free to use the above for parsing data :)

Event Timeline

Inch edited Steps To Reproduce. (Show Details)Jul 3 2015, 8:13 PM
Inch edited Additional Information. (Show Details)
Inch set Category to Dedicated Server.
Inch set Reproducibility to Random.
Inch set Severity to None.
Inch set Resolution to Duplicate.
Inch set Legacy ID to 1611983203.May 8 2016, 12:19 PM