map switch crash debugging