atmega32 problem

I make a robot that divides the color. The problem is when i tested servo alone with atmega32, It was working properly. But when i combine code with my robot car that i use pin OC1A and OC2 to control pwm, It was error the pwm and the robot was error condition. So what was the problem with my robot????

It is very hard to tell without seeing the code, a schematic, and the error itself.