Surface instabilities and dislocation formation during crystal growth