Wolfram|Alpha: Systematic knowledge, immediately computable.

Monday, April 26, 2010

Pings? We Don't Need No Stinking Pings!

The popular new online FPS Battlefield Bad Company 2 has had its share of teething pains. Among those most bothersome to players is the inability to see 'pings' for servers in the online server browser. The developers, EA/DICE, have stated the solution to this issue is to run the game with elevated privileges, either by running in a full administrator account, or by using RunAs or compatibility mode changes to accomplish this.

Poppycock! The fix is to get rid of the poor coding choices that get this kind of result from my debugging traces of over a month ago:

socket: 0: Process 0xfffffa8005375060 (0x768 ), Endpoint 0xfffffa8005c49420, Family 2, Type SOCK_RAW, Protocol 1, Seq 1006, Status 0x0
(FAM: AF_Inet/IPv4) (SOCK: Raw) (PROTO: Stream)

The game is opening (or attempting to open) a Windows socket of  type (3) sock_raw. The use of raw sockets has become increasingly restricted with each new version of Windows, and for good reason.

This is the reason the BFBC2 game executable must be run as an administrator, or have its privileges elevated, for the player to see pings properly in the server browser.

Readers having this issue, either run the game from a 'real' administrative account, or right-click on the game executable and mark it for compatibility mode "Run this program as an administrator". Do note, there can be other issues such as firewall, ISP, or PC configuration that may still prevent pings showing properly.

There is no reasonable reason I can think of that an application like this game needs to use raw sockets, forcing the user to compromise the security and functionality of their system to make the application work the way it should. There are several proper solutions to accomplish the goal of getting the needed data that do not require unneeded privilege use or elevation by the user.

That this information was handed to the devs, and nothing has been done to remedy it, despite a patch in the intervening time being released, is puzzling to say the least. A lunch hour's worth of coding changes should fix this amateur mistake that should never have been made. (How hard is it to get to the server without raw sockets? See "I Scream, You Scream, We All Scream for DICE Scream!" for an answer).

Fix this, DICE!

2 comments:

  1. WTF? What kind of prgrammers do they hire now? Is this really that hard to find - and why did they do this anyway? I don't want to run the game as an administrator - breaks my mouse functions when I do.

    ReplyDelete
  2. They should read this, fix it, and give you a free game for doing their work. Oh wait, you probably wouldn't want a game made by them...OK, a gift certificate.
    Nice work.

    ReplyDelete