Q:

EXC_BAD_ACCESS code=1 when receiving data

-(void) match:(GKMatch *)match didReceiveData:(NSData *)data fromPlayer:(NSString *)playerID {
NSMutableArray* grid = (NSMutableArray*)[NSKeyedUnarchiver unarchiveObjectWithData:[data bytes]];

    _game.gameMap.grid = grid;
    [_game updateMap:_game.localPlayer.playerFleet];
    _mainGameController = [[MainGameController alloc] initMainGameControllerWithGame:_game andFrame:self.frame.size];
    [self addChild:_mainGameController.containers.overallNode];

}
-(BOOL)sendMap {
NSError* error;

NSData* packet = [NSKeyedArchiver archivedDataWithRootObject:_game.gameMap.grid];
[_game.gameCenter.match sendDataToAllPlayers: packet withDataMode:GKMatchSendDataUnreliable error:&error];
if (error != nil) {
    NSLog(@"error");
}
return false;

}
This code returns a bad access error on the following line:
NSMutableArray* grid = (NSMutableArray*)[NSKeyedUnarchiver unarchiveObjectWithData:[data bytes]];

A:

unarchiveObjectWithData: expects its argument to be an instance of NSData. That is not what [data bytes] returns. You probably just want data.

