The exception thrown from the line networkGamer.GetProfile().GamerPicture is a GamerPrivilegeException. The description from VC# is: A signed in gamer profile is required to perform this operation. A Live profile may also be required. There are no profiles currently signed in, or the profile is not signed in to Live.
I'm fairly certain that GamerServicesComponent is initialized since everything works great without this one line added in. Curiously I see in the debugger that when this exception is thrown networkGamer.IsLocal is set to false but I would expect it to be true since I'm using local profiles. Perhaps I'm not understanding the local vs. Live profile.
Here are the steps to reproduce:
1.) Create a new project with the Net Rumble Windows Starter kit.
2.) Modify the method DrawPlayerData in World.cs to include this block of code after you draw the player's gamerTag (line 1143):
Texture2D tagTexture = networkGamer.GetProfile().GamerPicture;
float tagTextureScale = 0.9f * playerStringSize.Y / (float)tagTexture.Height;
Vector2 tagTexturePosition = new Vector2(playerStringPosition.X -
1.2f * playerStringSize.X / 2f -
1.1f * tagTextureScale * (float)tagTexture.Width / 2f,
playerStringPosition.Y);
spriteBatch.Draw(tagTexture, tagTexturePosition, null,
Color.White, 0f, new Vector2((float)tagTexture.Width / 2f,
(float)tagTexture.Height / 2f), tagTextureScale,
SpriteEffects.None, 0f);
3.) Build and run with two PCs. Create local profiles on each machine (that is, don't sign in to Live). One computer selects "Create System Link Session," the other computer selects: "Join System Link Session."
4.) When the second computer has joined the session the program crashes with an unhandled GamerPrivilegeException.
Thanks.