Creation of defects during the growth of semiconductor single crystals and films